betanalpha / knitr_case_studies

Inference case studies in knitr
163 stars 94 forks source link

Typo in 'Underdetermined linear regression'? #32

Closed fweber144 closed 4 years ago

fweber144 commented 4 years ago

I am not sure if I got everything from the 'Underdetermined linear regression' case study correctly, but line 50 of linear_regression_w_proj.stan is

gamma_par = append_row(beta, alpha) - gamma_perp;

though I would have thought it should be

gamma_par = (append_row(beta, alpha) - R) - gamma_perp;

Am I getting something wrong or is this a typo?

betanalpha commented 4 years ago

No, you are correct -- because I never use gamma_par anywhere I didn't catch the offset. Thanks!