BANOVA-package {BANOVA} | R Documentation |
BANOVA: Hierarchical Bayesian ANOVA Models
Description
This package includes several hierarchical Bayes Analysis of Variance models. These models are suited for the analysis of experimental designs in which both within- and between- subjects factors are manipulated, and account for a wide variety of distributions of the dependent variable. Floodlight analysis and mediation analysis basaed on these models are also provided. The package uses 'Stan' and 'JAGS' as the computational platform.
Details
Package: | BANOVA |
Type: | Package |
Version: | 1.2.1 |
Date: | 2022-06-18 |
License: | GPL (>= 2) |
Model:
where ,
is the subject id of data response
. Missing values (NAs) of
are allowed. The within-subjects factors and their interactions are indexed by
. Each index
represents a batch of
coefficients:
;
indexes subjects. Note that if the subject-level covariate is continuous,
, so that ANCOVA models are also accommodated (relaxing their "constant slope" assumption).
The population-level model allows for heterogeneity among subjects, because the subject-level coefficients are assumed to follow a multivariate normal distribution.The between-subjects factors and their interactions are indexed by
,
denotes the constant term. The population-level ANOVA can be written as:
The population-level ANCOVA model can be expressed as a linear model with a design matrix that contains all between-subjects factors and their interactions and a constant term:
where is an element of
, a
matrix of covariates.
is a hyperparameter which captures the effects of between-subjects factor
on the parameter
of within-subjects factor p. The error
is assumed to be normal:
~
. Proper, but diffuse priors are assumed:
~
, and
~
, where
are hyper-parameters. The default setting is
.
Note that missing values of independent variables are currently not allowed in the package.
Author(s)
Chen Dong; Michel Wedel
Maintainer: Chen Dong <cdong@math.umd.edu>
References
Dong, C. and Wedel, M. (2017) BANOVA: An R Package for Hierarchical Bayesian ANOVA, Journal of Statistical Software, Vol. 81, No.9, pp. 1-46.
McCullagh, P., Nelder, JA. (1989) Generalized linear models, New York, NY: Chapman and Hall.
Gelman, A. (2005) Analysis of variance-why it is more important than ever, Ann. Statist., Vol. 33, No. 1, pp. 1-53.
Rossi, P., Allenby,G., McCulloch, R. (2005) Bayesian Statistics and Marketing, John Wiley and Sons.
Gill, J. (2007) Bayesian Methods for the Social and Behavioral Sciences, Chapman and Hall, Second Edition.
Gelman, A., Carlin, J., Stern, H. and Dunson, D. (2013) Bayesian Data Analysis, London: Chapman and Hall.
Wedel, M. and Dong, C. (2016) BANOVA: Bayesian Analysis of Variance for Consumer Research. Submitted.