-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contrast from posterior estimates #68
Comments
Yes, you can do this. Note though: if you just care about the contrasts, you don't need to add the mean back in, because if you're going to just subtract them then the mean just subtracts right back out. You just need the difference between the effects themselves. |
When using the random option in lmBF, can I also use the same approach for interactions? |
I'm not sure what you mean. |
When there is an interaction, can I subtract posterior estimates of the interactions to determine the difference between interactions. |
You mean, eg, if there is a three-way interaction, can you take the (say) two two-way interactions and subtract them? |
Yes. As an aside, I will be starting graduate school this fall at UC Davis where I will be focusing on the neuroendocrinology of social bonding in prarie voles and titi monkeys. As an undergraduate, I completed a minor in statistics, all NHST, but am attempting to train myself in Bayesian methods. I guess my main concern is that, although I have been reading extensively about Bayesian statistics (DBDA and Rethinking), my adviser and most people in my field have not. As such, ensuring what I am doing is correct is very, very important. Thank you for the responses and I am sure that I will figure it all out soon! |
The three-way interaction parameters itself contain the information, don't they? Unless I'm misunderstanding what you want. |
Although I find the Bayes factor interesting, I am most interested in uncertainty and effect size. When using the lmBF function for the following code: bayesBF <- lmBF(len ~ dose, iterations = 10000, data = toothgrowth), the output does does not tell me which groups differ, by how much, and the uncertainty (credible intervals). I notice that I have mu and estimates for all of the levels of dose. Can I add the posterior estimates for dose to mu to get the mcmc mean for each level of dose. Then can I subtract these means, for example, dose.5 - dose.1 to get the contrasts?
When obtaining 10000 posterior estimates, I get the following from the methods I described.
variable, empirical mean, mcmc mean
Dose 0.5, 10.61, 10.78
Dose 1.0, 19.73, 19.72
Does 2.0, 26.1, 25.92
at all levels of Dose: empirical 18.813, mu = 18.812
Lastly, I saw the post about order constraints, but that still does not make it clear how I can calculate contrasts for specific comparisons.
Thanks in advance,
Donny
The text was updated successfully, but these errors were encountered: