milkha / Splines_in_Stan

Implementation of B-Splines in Stan
52 stars 21 forks source link

Bug in prior for a[1]? #6

Closed jeffpollock9 closed 7 years ago

jeffpollock9 commented 7 years ago

Hello,

Just wondering if there is a bug in b_spline_penalized.stan? It is written in the doc that:

a_1 ~ N(0, tau)

but in the stan code:

a[1] = a_raw[1];

with a_raw[1] ~ normal(0, 1);. Should this be:

a[1] = a_raw[1] * tau;

Thanks!

milkha commented 7 years ago

Thanks for pointing this out. Actually, the code is right and the text had to be edited. We allow the first coefficient to has a N(0,1) prior, and then other coefficients have small variations with respect to previous ones.

jeffpollock9 commented 7 years ago

@milkha many thanks!