Learn R Programming

growcurves (version 0.2.4.1)

ddpEffectsplot: Plot by-subject and by-treatment posterior mean values for dossage random effects

Description

Each ddpgrow object contains posterior mean estimates for the q x T matrix of by-subject random effects that is extracted from the ddpgrow object that is input to ddpEffectsplot. This function produces a q x T.m heat map plot of posterior mean effect values for the dosages in treatment m faceted on a set of chosen subjects. The resulting plot produces a heatmap for each trt-subject combination. Both a ggplot2 plot object and a data.frame object are returned.

Usage

ddpEffectsplot(object, subjects.plot = NULL, n.plot = 3, trts.plot = NULL, x.axis.label = NULL, smoother = TRUE, re.order = TRUE, cred.intervals = TRUE, map.group = NULL, n.dose.plot = 5, orderto = NULL)

Arguments

object
A ddpgrow object.
subjects.plot
A vector of subjects for performing plots that is composed of some subset of the subject vector input for modeling. If left blank, a random subset is chosen from subject.
n.plot
An optional scalar input for number of randomly generated subjects to plot (if subjects.plot is left blank).
trts.plot
A vector of focus treatments to use for plotting.
x.axis.label
An optional scalar character entry to label the treatment(s) dosages
smoother
A scalar boolean input indicating whether to co-plot a smoother line with point values.
re.order
A scalar boolean input indicating whether to sort the plots of effects in order of increasing value.
cred.intervals
A boolean scalar indicating whether the by-subject effects plots should include credible intervals.
map.group
A matrix or data.frame object containing a grouping of subjects that will be used to produce an additional set of effect plots that aggregate subjects by the grouping structure. The first column containing subject identifiers for all subjects modeled in object. The second column contains the desired desired group identifiers that may be of type character or numeric.
n.dose.plot
Optional numeric input for number of randomly chosen doses for which to plot effects growth curves.
orderto
A numeric vector of length equal to the total number of dosages across all treatments that conveys an order to be used by-dosage growth curve plots within cluster and treatment.

Value

A list object containing a faceted set of heat maps (one per subject), a faceted set of effect point plots, and the associated data.frame objct.

See Also

ddpgrow, dpgrow, dpgrowmm, dpgrowmult