trtplot: Plot comparison of Mean Effects for Any Two Treatments

Description Usage Arguments Value Author(s) See Also

View source: R/trtplot.R

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

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

dat.trt

A data.frame object used to generate the fixed effects mean comparison for two chosen treatments. Fields are titled, c("Mu_diff","models","time").

p.trt

A ggplot2 object of box plots split by time point.

Author(s)

Terrance Savitsky tds151@gmail.com

See Also

dpgrowmm, dpgrow, dpgrowmult


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