50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

growcurves (version 0.2.4.1)

mmIgroupDpPost: Bayesian mixed effects model with a DP prior on by-subject effects and use of group means for multiple membership effects

Description

An internal function to dpgrowmm

Usage

mmIgroupDpPost(y, X, Z, Wcase, Wsubject, M, subjects, niter, nburn, nthin, strength.mm, shapealph, ratebeta)

Arguments

y
An N x 1 response (of subject-measure cases)
X
Fixed effects design matrix
Z
Random effects design matrix. Assumed grouped by subjects
Wcase
An N x 1 multiple membership weight matrix to map supplemental random effects
Wsubject
An P.aff x S multiple membership weight matrix with rows equal to number of unique affected subjects
M
An S x G design matrix mapping (G) group means to the multiple membership effects Posterior samples are centered on each iteration to identify the global mean parameter.
subjects
An N x 1 set of subject identifiers
niter
The number of MCMC iterations
nburn
The number of MCMC burn-in iterations to discard
nthin
The step increment of MCMC samples to return
strength.mm
The shape and rate parameters for the $\Gamma$ prior on the CAR precision parameter, $\tau_{\gamma}$
shapealph
The shape parameter for the $\Gamma$ prior on the DP concentration parameter. The rate parameter is set of 1.
ratebeta
The rate parameter for the $\Gamma$ prior on the DP concentration parameter. Default value is 1.

Value

res A list object containing MCMC runs for all model parameters.

See Also

dpgrowmm