post.pred.check {bayesanova} | R Documentation |
post.pred.check
Description
Provides a posterior predictive check for a fitted Bayesian ANOVA model.
Usage
post.pred.check(anovafit, ngroups, out, reps = 50, eta)
Arguments
anovafit |
A dataframe returned by |
ngroups |
An integer which is the number of groups used in the ANOVA |
out |
A numerical vector containing the originally observed data in all groups |
reps |
An integer which is the number of posterior predictive distributions sampled from the ANOVA models posterior distribution. Defaults to 50 sampled parameters. |
eta |
A numerical vector containing the weight values of the mixture. |
Details
Provides a posterior predictive check for a fitted Bayesian ANOVA model.
Value
Produces a plot consisting of a density estimate of the original data and posterior predictive distributions sampled from the posterior of the Bayesian ANOVA model as density overlays.
Author(s)
Riko Kelter
Examples
set.seed(700)
x1=rnorm(1000,0,1)
x2=rnorm(1000,1,1)
x3=rnorm(1000,2,2)
result=bayes.anova(n=1000,first = x1, second=x2, third=x3)
post.pred.check(result, ngroups = 3, out = c(x1,x2,x3), reps = 25, eta = c(1/3,1/3,1/3))
[Package bayesanova version 1.6 Index]