In Gelman and Hill, one finds the functions se.fixef() and se.ranef() for pulling standard errors out of a model fit by lmer(). Is there some way to get these standard errors from Stan (or, for that matter, any MCMC sample)?
s <- summary(posterior)$summary
s[,"sd"]
a[1] 2.4395695
a[2] 6.9842508
a[3] 3.3638914
a[4] 8.2936868
a[5] 7.3915319
a[6] 5.9151832
a[7] 3.1845462
a[8] 6.1735792
a[9] 6.7233317
a[10] 1.8390783
a[11] 2.4875086
a[12] 9.1757516
a[13] 3.1529689
a[14] 5.3231362
a[15] 5.7129531
a[16] 7.8969134
a[17] 8.3591933
a[18] 3.5772681
a[19] 8.3709972
a[20] 3.9758822
(Intercept)
1 2.414051
2 6.436764
3 3.279047
4 7.705084
5 7.056111
6 5.500787
7 3.071937
8 5.956278
9 6.135242
10 1.809878
11 2.437176
12 8.329476
13 3.083749
14 5.081977
15 5.500787
16 7.202888
17 7.526200
18 3.448435
19 7.526200
20 3.861101
It seems that Stan is giving me consistently larger standard deviations than lmer. The bigger deviations are in groups like 4 and 12 in which--not coincidentally, I imagine--the sample sizes are quite small (7 and 4 respectively, where several other groups are well over 100).Not sure what to make of that.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/QC4QkR6H93A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Jul 11, 2015, at 1:21 AM, Sean Raleigh <sean.r...@gmail.com> wrote:
In Gelman and Hill, one finds the functions se.fixef() and se.ranef() for pulling standard errors out of a model fit by lmer(). Is there some way to get these standard errors from Stan (or, for that matter, any MCMC sample)?
--
You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/QC4QkR6H93A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
Is this stan.regression() function something that already exists or something in development?
draws <- as.matrix(my_stan_output)
dim(draws)
colnames(draws)
# do something with draws