Learn R Programming

growcurves (version 0.2.4.1)

trtplot: Plot comparison of Mean Effects for Any Two Treatments

Description

Produces a set of box plots of the posterior distributions of the fixed effects mean difference between any 2 chosen treatments across a chosen subset models (priors) at each of a selection of time points. Each box plot spans the 95

Usage

trtplot(run.objects, run.models, trt.labs, time.points, y.label = NULL, time.labels = NULL, n.thin = 10)

Arguments

run.objects
A list object where each entry is either a dpgrow, dgrowmm or dpgrowmult object returned from a model run. The list length is equal to the number of models on which a treatment comparison is desired.
run.models
A character vector supplying the names of models to compare of the same length as the number of elements in run.objects.
trt.labs
A vector of exactly 2-elements that contains the labels (used in modeling) for the two treatments desired to compare.
time.points
A numeric vector of data time points on which to compare the fixed effects treatment means.
y.label
An optional character scalar for label for the y axis.
time.labels
An optional character vector of labels for time.points to use in plotting.
n.thin
Gap between successive MCMC sampling iterations on fixed effects parameters to use for generating distribution for each treatment-time. Defaults to n.thin = 10. Higher values produces faster plot generation.

Value

A list object containing quantile summaries for all sampled model parameters.

See Also

dpgrowmm, dpgrow, dpgrowmult