Learn R Programming

growcurves (version 0.2.3.8)

effectsplot: Plot comparison of Effect parameters of a Multiple membership (MM) term under varied prior formulations

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

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 member
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
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 tha
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 la

Value

  • A list object containing a plot objects and associated plot data.frames
  • dat.termA 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.termA ggplot2 object of effect plots for chosen object terms.
  • p.allA 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.allA 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.

See Also

dpgrowmm, dpgrowmult, ddpgrow