plot.tramME: Plotting method for tramME objects

Description Usage Arguments Details Value Examples

View source: R/predict.R

Description

Plot the conditional distribution evaluated at a grid of possible response values and a set of covariate and random effects values on a specified scale.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'tramME'
plot(
  x,
  newdata = model.frame(x),
  ranef = NULL,
  type = c("trafo", "distribution", "survivor", "density", "logdensity", "hazard",
    "loghazard", "cumhazard", "odds", "logodds", "quantile"),
  ...
)

Arguments

x

A tramME object.

newdata

an optional data frame of observations

ranef

Random effects (either in named list format or a numeric vector) or the word "zero". See Details.

type

The scale on which the predictions are evaluated:

  • trafo: The prediction evaluated on the scale of the transformation function.

  • distribution: The prediction evaluated on the scale of the conditional CDF.

  • survivor: The prediction evaluated on the scale of the (conditional) survivor function.

  • density, logdensity: The prediction evaluated on the scale of the conditional (log-)PDF.

  • hazard, loghazard, cumhazard: The prediction evaluated on the hazard/log-hazard/cumulative hazard scale.

  • odds, logodds: The prediction evaluated on the (log-)odds scale.

  • quantile: Return the quantiles of the conditional outcome distribution corresponding to newdata. For more information, see Details.

...

Additional arguments, passed to plot.mlt.

Details

When ranef is equal to "zero", a vector of zeros with the right size is substituted.

For more information on how to control the grid on which the functions are evaluated, see the documentation of predict.mlt.

Value

A numeric matrix of the predicted values invisibly.

Examples

1
2
3
data("sleepstudy", package = "lme4")
fit <- BoxCoxME(Reaction ~ Days + (Days | Subject), data = sleepstudy)
plot(fit, K = 100, type = "density")

tramME documentation built on Aug. 16, 2021, 5:08 p.m.