Description Usage Arguments Value Author(s) References Examples
Samples from the posterior distribution of the data by means of a Gibbs sampler (derived from Lynch, 2007, p. 170-172).
1 | Gibbs.ANOVA(data,it=5000,burnin=500,seed=0)
|
data |
a data frame with a variable y and a variable g, where y is the dependent variable, and g is the grouping variable for the ANOVA. Groups are labeled consecutively, starting at 1. |
it |
the number of (post-burnin) iterations for each of the two chains. The default uses 5.000 iterations. |
burnin |
the number of iterations for the function to use for the burnin phase in each of the two chains. The default uses 500 burnin iterations. |
seed |
integer; seed value. If seed==0, no seed is set. |
posterior |
a matrix with all samples from the posterior for each parameter. |
Returns a matrix with the mean, median, and standard deviation (in columns) for the it samples from the conditional posterior distributions of the group means and pooled standard deviation (rows).
Produces traceplots of each parameter and the associated samples from the posterior distribution.
M. A. J. Zondervan-Zwijnenburg
Lynch, S. (2007). Introduction to applied Bayesian statistics and estimation for social scientists. New York, NY: Springer. doi: 10.1007/978-0-387-71265-9
Zondervan-Zwijnenburg, M.A.J., Van de Schoot, R., & Hoijtink, H. (2017). Testing ANOVA replication by means of the prior predictive p-value.
1 2 | data <- data.frame(y=ChickWeight$weight,g=ChickWeight$Diet)
Gibbs.ANOVA(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.