ddpEffectsplot: Plot by-subject and by-treatment posterior mean values for...

Description Usage Arguments Value Author(s) See Also

View source: R/ddpeffectsplot.R

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

1
2
3
4
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.

dat.se

A data.frame object used to generate the trt-subject faceted plots for effect means Fields are titled, c("order","dose","trt","subject","effects").

dat.ci

A data.frame object used to generate the trt-subject faceted plots for effect credible intervals Fields are titled, c("order","dose","trt","subject","quantile","effects").

dat.clust

A data.frame object used to generate the trt-group faceted plots for effect means Fields are titled, c("order","dose","trt","cluster","effects").

dat.clust.ci

A data.frame object used to generate the trt-group faceted plots for effect credible intervals Fields are titled, c("order","dose","trt","cluster","quantile","effects").

dat.gc

A data.frame object used to generate the by-dose growth curves (for multivariate polynomial effects) Fields are titled, c("fit","time","cluster","trt","dose").

p.hm

A ggplot2 object of heat maps for mean random effect values, faceted by trt and subject combinations.

p.pp

A ggplot2 object of point plots for mean random effect values or credible intervals, faceted by trt and subject combinations.

pc.m

A ggplot2 object of point plots for mean random effect values, faceted by trt and group combinations.

pc.ci

A ggplot2 object of point plots for credible intervals of random effect values, faceted by trt and cluster combinations.

pc.gc

A ggplot2 growth curve plots for each dose where the does effects are multivariate polynomial.

Author(s)

Terrance Savitsky tds151@gmail.com

See Also

ddpgrow, dpgrow, dpgrowmm, dpgrowmult


growcurves documentation built on May 2, 2019, 7:03 a.m.