effectsplot: Plot comparison of Effect parameters of a Multiple membership...

Description Usage Arguments Value Author(s) See Also

View source: R/effectsplot.R

Description

Produces an overlaid plot of multiple membership effect values under chosen prior formulations. The effect values for a focus (or all) multiple membership term(s) or group(s) may be compared under different model formulations (one vs. multiple terms, or multivariate vs. univariate) for differing prior formulations (e.g. "mmcar" vs. "mmi").

Usage

1
2
3
effectsplot(objects, mm.terms = NULL, prior.labs = NULL, center = TRUE,
  axis.labs = NULL, group.plot = NULL, smoother = FALSE, order = FALSE,
  orderto = NULL, label.mm = NULL)

Arguments

objects

A list object where each entry is an object with class within any of either dpgrowmm or dgrowmult. returned from a model run. The list length is equal to the number of models on which a comparison of multiple membership term effects is desired.

mm.terms

An optional character vector of MM term names or numeric vector of MM term positions targeted for plotting. The entries a term name for each dpgrowmult object and group name for each dpgrowmm object. If a character vector is used, names must correspond to those used in package engine functions that generated each object. Length is equal to number of objects.

prior.labs

An optional character vector providing names for the prior formulations under comparison. Length is equal to number of objects.

center

A scalar boolean input to indicate whether effect values in all objects should be centered. Defaults to TRUE.

axis.labs

An optional vector input of length 2 corresponding to x.axis and y.axis labels, respectively.

group.plot

An optional numeric vector that groups or re-groups the MM effects in each term selected in mm.terms.

smoother

A scalar boolean input indicating whether to co-plot a smoother line with point values.

order

A scalar boolean input indicating whether to sort the plots of effects in order of increasing (mean) value.

orderto

A list object of length equal to number of MM terms (for dpgrowmult objects), or groups (for dpgrowmm objects), each holding a vector of length S[n], the number of MM effects for object n that conveys a desired order for the MM effects under option order = TRUE as an alternative to ordering by increasing mean value.

label.mm

An optional list object, each containing a vector of labels for the MM random effects in each term (dpgrowmult) or each group (dpgrowmm). Used for plotting all terms or groups for input objects. The length of label.mm is equal to the number of terms or groups per object.

Value

A list object containing a plot objects and associated plot data.frames

dat.term

A data.frame object used to generate a plot comparing a specific term or group from an MM object with field titles, c("session","group","low","mean","high","prior"), where session denotes the MM effect labels, group the sub-group labels within the focus MM terms, and prior, the model identifiers.

p.term

A ggplot2 object of effect plots for chosen object terms.

p.all

A ggplot2 plots effects, by term and/or compatible group, for each object. Only renders if the number of effects in terms and/or groups are compatible between objects.

dat.all

A data.frame object used to generate p.all with field titles, c("prior","session","block","low","mean","high"), where block denotes labels for MM terms or groups included.

Author(s)

Terrance Savitsky tds151@gmail.com

See Also

dpgrowmm, dpgrowmult, ddpgrow


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