Learn R Programming

growcurves (version 0.2.4.0)

ddp_quantiles: Produce quantile summaries of model posterior samples

Description

Inputs MCMC samples for model parameters and constructs c(2.5%,50%,97.5%) quantile summaries.

Usage

ddp_quantiles(model.output, dosemat, Nfixed, Nrandom, Nsubject, typet)

Arguments

model.output
A list vector of objects returned by MCMC sampling functions. e.g. mmCplusDpPost for option = "mmcar".
dosemat
An P x (T+1) matrix object that maps subjects to treatment dosages. The first column should be an intercept column (filled with 1's).
Nfixed
Number of total fixed effects, both time-based and nuisance.
Nrandom
Number of total random effects, both time-based and nuisance, all grouped by subject.
Nsubject
Number of unique subjects (on which repeated measures are observed).
typet
A numeric vector of length equal to the number of treatments that contains the base distribution for each treatment. 1 = "car", 2 = "mvn", 3 = "ind".

Value

A list object containing quantile summaries for all sampled model parameters.
deviance.summary
vector of length 3 summarizing quantiles for model deviance.
beta.summary
Nfixed x 3 quantile summaries of model fixed effects.
alpha.summary
quantile summary of model global intercept parameter.
theta.summary
list object of length Nrandom, each cell containing a n x 3 matrix of by-subject random effect parameter quantile summaries.
lambda.summary
Nrandom^2 x 3 quantile summaries of by-polynomial order precision parameters used in base distributions.
lambda.mean
Nrandom x Nrandom posterior means of by-polynomial order precision parameters used in base distributions.
alphacar.summary
numcar x 3 quantile summaries of proper CAR strength of correlation parameters for CAR base distribution on subject-dose random effects, where numcar <= nty="" treatments.<="" dd="">
taucar.summary
numcar x 3 quantile summaries of proper CAR precision parameters for CAR base distribution on subject-dose random effects, where numcar <= nty="" treatments.<="" dd="">
dosetrt.summary
list object of length nty, each cell containing a Nsubject*(Nrandom*numt[m]) x 3 matrix of quantile summaries for subject-dose random effects.
dosetrt.mean
list object of length nty, each cell containing a Nsubject x (Nrandom*numt[m]) matrix of posterior mean values for subject-dose random effects.
pind.summary
list object of length numind, each cell contains a numt[m] x 3 matrix of quantile summaries for precision values under IND base distribution, where numind <= nty="" treatments.<="" dd="">
pmvn.summary
list object of length nummvn, each cell containing quantile summaries for precision parameters used for MVN base distribution on subject-dose random effects, where nummvn <= nty="" treatments.<="" dd="">
pmvn.summary
list object of length nummvn, each cell containing posterior mean for numt[m] x numt[m] matrix of precision parameters used for MVN base distribution on subject-dose random effects, where nummvn <= nty="" treatments.<="" dd="">
doseint.summary
list object of length Nrandom, each cell containing a Nsubject x 3 matrix of quantile summaries for the intercept parameter in the subject-dose random effects.
taue.summary
quantile summary for model error precision parameter.
M.summary
quantile summary for number of DP posterior clusters formed.
Dbar
Model fit statistics.
pD
Model fit statistics.
pV
Model fit statistics.
DIC
Model fit statistics.
lpml
Model fit statistics.

See Also

dpgrowmm, dpgrow