Learn R Programming

growcurves (version 0.2.4.1)

ddpMCMCplots: generate plots of posterior samples under ddpgrow model

Description

Constructs plots for subject effects, theta, with credible intervals as well as selected trace plots. Returns a list of objects of class ggplot.

Usage

ddpMCMCplots(subjecti.u, labt = NULL, typet, numt, theta.summary, lambda.mean, pmvn.mean = NULL, taucar.summary = NULL, alphacar.summary = NULL, Taucar = NULL, Alphacar = NULL, tauind.summary = NULL, Tauind = NULL, M, Taue, Deviance)

Arguments

subjecti.u
A vector of length P, number of unique subjects, containing unique set of user input values for subject.
labt
An vector object (of the same length as typet) providing user names for each treatment. The names are used in plot objects.
typet
A numeric vector of length equal to the number of treatments that specifies prior option for each treatment. Options must be one of: 1 = "car", 2 = "mvn", 3 = "ind".
numt
A numeric vector with same length as typet where each entry counts the number of doses for that treatment.
theta.summary
A list object of q elements, each containing an P x 3 matrix of c(2.5%,50%,97.5%) quantile summaries for each subject of the applicable subject random effect parameter. P = number of subjects, q = number of random effect parameters, per subject.
lambda.mean
A q x q matrix of mean values of the polyomial order covariance matrix, Lambda, returned from ddpgrow.
pmvn.mean
A list object of length equal to the number of treatments with "mvn" %in% typetreat. Each list object contains an numt[m] x numt[m] matrix of mean elements of the "mvn" treatments covariance matrices, Pmvn, returned from ddpgrow.
taucar.summary
A numcar x 3 numeric matrix of c(2.5%,50%,97.5%) quantile summaries for the scale parameter for numcar treatments where "car" %in% typetreat.
alphacar.summary
A numcar x 3 numeric matrix of c(2.5%,50%,97.5%) quantile summaries for the strength parameter for numcar treatments where "car" %in% typetreat.
Taucar
An iter.keep x numcar matrix of posterior samples capturing the CAR precision parameter for each treatment where "car" %in% typetreat.
Alphacar
An iter.keep x numcar matrix of posterior samples capturing the CAR strength parameter for each treatment where "car" %in% typetreat.
tauind.summary
A list object of length equal to numcar, the number of treatment with "in" %in% typetreat. Each list element contains an numt[m] x 3 matrix of c(2.5%,50%,97.5%) quantile summaries for the dosage scale parameters associated to that treatment m.
Tauind
A list object of length numind, the number treatments where "car" %in% typetreat with each element holding an nkeep x numt[m] matrix of sampled by-dose precision parameters for treatment m.
M
The iter.keep x 1 matrix of posterior samples for the parameter capturing the number of clusters formed under the DP prior on the client effects.
Taue
iter.keep x 1 matrix of posterior samples capturing the precision parameter for the model error term.
Deviance
iter.keep x 1 matrix of posterior samples for the model deviance.

Value

A list of plot objects of class ggplot2 including:

See Also

ddpgrow, dpgrowmm, dpgrow, dpgrowmult