Run a Bayesian mixed effects model for bysubject random effects with DDP prior
Description
An internal function to ddpgrow
Usage
1 2  ddpPost(y, X, Z, subject, dosemat, numt, typet, Omega, omegaplus, n.iter,
n.burn, n.thin, shapealph, ratebeta, M.init)

Arguments
y 
An N x 1 response (of subjectmeasure cases) 
X 
Fixed effects design matrix 
Z 
Random effects design matrix. Assumed grouped by 
subject 
An N x 1 set of subject identifiers 
dosemat 
An P x T Anova or Multiple Membership design matrix linking treatment dosages to subjects where T is the total number dosages across all treatments + 1 for an intercept. This formulation assumes there is a holdout dose for each treatment. e.g. the null dosage. 
numt 
A numeric vector of length equal to the number of treatments that contains the number of dosages for each treatment. 
typet 
A numeric vector of length equal to the number of treatments that contains the base distribution for each treatment.

Omega 
A list object of length equal to the number of treatments with 
omegaplus 
A list object of length equal to the number of treatments under 
n.iter 
The number of MCMC iterations 
n.burn 
The number of MCMC burnin iterations to discard 
n.thin 
The step increment of MCMC samples to return 
shapealph 
The shape parameter for the Γ prior on the DP concentration parameter. 
ratebeta 
The rate parameter for the Γ prior on the DP concentration parameter. 
M.init 
Initial MCMC chain scalar value for number of bysubject clusters. If excluded defaults to 
Value
res A list object containing MCMC runs for all model parameters.
Note
Intended as an internal function for ddpgrow
Author(s)
Terrance Savitsky tds151@gmail.com
See Also
dpgrow
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.