Quadratic model priors

How do you choose quadratic model parameters? This is what I’ve got so far …

with pm.Model() as quad_model:

#I'd like to add sigmas to priors a,b, and c (and mu if that's reasonable) 
#but I'm not sure how to decide how big to go.. 

    a = pm.Normal('a')
    b = pm.Normal('b')
    c = pm.Normal('c')
    
    sigma = pm.HalfNormal('scatter', sd=sigm_y)
    
#this .MutableData I'm not sure I'm using correct, I'm following an
#example but my data is position not  dates/time

    t = pm.MutableData('t', bp_rp, dims='obs_time')
    mu = a*t**2 + b*t + c
    
    obs = pm.Normal('mg', mu=mu, sd=sigma, observed=y.data, dims='obs_time')

In general, the answer is something like “it depends on your data” (and your model, etc.). One way to evaluate this yourself is to do some prior predictive checking. This will allow you to evaluate the consequences of setting your priors (you can try whatever you want) in terms that might be easier to assess (e.g., do I think that’s a plausible pattern of data?).

2 Likes