ecmerkle / blavaan

An R package for Bayesian structural equation modeling
https://ecmerkle.github.io/blavaan
81 stars 22 forks source link

parameterEstimates() credible interval #2

Open davidp6 opened 7 years ago

davidp6 commented 7 years ago

Dear creators,

I noticed that there are differences between summary(fit) and parameterEstimates(fit).

The parameterEstimates() function seems to be identical to its lavaan counterpart, and thus assumes Gaussian priors for all parameters. It would be very useful to convert the ci.lower and ci.upper output from this function to HPD.

Thanks, David

ecmerkle commented 7 years ago

Thanks for the report. I think this is a side-effect of using lavaan code and will look at it soon. Also, I think the assumption there is that the posteriors are normal, as opposed to the priors.

In the meantime, blavInspect() can be used to extract HPD intervals of any percentage, i.e.,

blavInspect(fit, "hpd", level=.8)

where level can be changed as desired.

Ed


From: David Phillips [notifications@github.com] Sent: Tuesday, January 17, 2017 5:20 PM To: ecmerkle/blavaan Cc: Subscribed Subject: [ecmerkle/blavaan] parameterEstimates() credible interval (#2)

Dear creators,

I noticed that there are differences between summary(fit) and parameterEstimates(fit).

The parameterEstimates() function seems to be identical to its lavaan counterpart, and thus assumes Gaussian priors for all parameters. It would be very useful to convert the ci.lower and ci.upper output from this function to HPD.

Thanks, David

� You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ecmerkle/blavaan/issues/2, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEmGwsHPsuZYwQKxhgHGYnvh36D_HLvyks5rTUyigaJpZM4LmSeV.

ecmerkle commented 7 years ago

Yves has recently set "se" to FALSE when passing non-lavaan objects to parameterEstimates(). While the Bayesian results are not (yet) included here, this at least removes the issue of somewhat-confusing results being displayed by default.

Ed

ecmerkle commented 4 years ago

Lost track of this one, but two possibilities here (more for myself than anyone else): see the boot.ci.type argument of parameterEstimates() for alternative ways of handling SEs and intervals. Alternatively, maybe change fit@Options$se to "mcmc", but it might break other lavaan commands.