ppernot
January 18, 2018, 9:13am
#1
Hi All,

I am comparing the posterior predictions for a simple non-linear regression problem k= \exp(a+b/T) , between stan and rstanarm/glm.

The prediction with rstanarm/glm is surprisingly noisy in lower part of the control variable range (see image below).

This looks like a numerical problem, but I do not know how to investigate…

Red dots are the calibration data; orange bars depict prediction 95% CI by combination of variances from the posterior.

The source code:

testArrhenius.R (2.5 KB)

Operating System: debian 9.3
Interface Version: 2.17.2
Compiler/Toolkit:

bgoodri
January 18, 2018, 3:40pm
#2
I think you are using a different prior on the standard deviation of the errors.

ppernot
January 18, 2018, 4:25pm
#3
Thanks Ben,

I reduced the scale of the normal prior to 1e-8 so that
the value of sigma is practically fixed. The error persists…

Now, I generated curves from the posterior sample of stan_glm,
as I do for stan. They are identical to the ones generated from
the stan posterior (orchid color).

The problem lies therefore in the posterior_predict() function,
or the way I interpret it…

wds15
January 19, 2018, 9:08am
#4
what exactly are u simulating from the posterior with the Stan model?

The posterior_predict function from rstanarm will give you predictions of observations and as such include the residual error term.

ppernot
January 19, 2018, 9:27am
#5
I am just propagating the parameters uncertainty.

Now, I see why the posterior_predict() levels off around 1e-5

Thanks !