Learn R Programming

growcurves (version 0.2.3.7)

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.summaryvector of length 3 summarizing quantiles for model deviance.
  • beta.summaryNfixed x 3 quantile summaries of model fixed effects.
  • alpha.summaryquantile summary of model global intercept parameter.
  • theta.summarylist object of length Nrandom, each cell containing a n x 3 matrix of by-subject random effect parameter quantile summaries.
  • lambda.summaryNrandom^2 x 3 quantile summaries of by-polynomial order precision parameters used in base distributions.
  • lambda.meanNrandom x Nrandom posterior means of by-polynomial order precision parameters used in base distributions.
  • alphacar.summarynumcar x 3 quantile summaries of proper CAR strength of correlation parameters for CAR base distribution on subject-dose random effects, where numcar <= nty="" treatments.<="" description="">
  • taucar.summarynumcar x 3 quantile summaries of proper CAR precision parameters for CAR base distribution on subject-dose random effects, where numcar <= nty="" treatments.<="" description="">
  • dosetrt.summarylist object of length nty, each cell containing a Nsubject*(Nrandom*numt[m]) x 3 matrix of quantile summaries for subject-dose random effects.
  • dosetrt.meanlist object of length nty, each cell containing a Nsubject x (Nrandom*numt[m]) matrix of posterior mean values for subject-dose random effects.
  • pind.summarylist 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.<="" description="">
  • pmvn.summarylist 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.<="" description="">
  • pmvn.summarylist 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.<="" description="">
  • doseint.summarylist 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.summaryquantile summary for model error precision parameter.
  • M.summaryquantile summary for number of DP posterior clusters formed.
  • DbarModel fit statistics.
  • pDModel fit statistics.
  • pVModel fit statistics.
  • DICModel fit statistics.
  • lpmlModel fit statistics.

See Also

dpgrowmm, dpgrow