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.
# S3 method for tramME
plot(
x,
newdata = model.frame(x),
ranef = NULL,
fix_smooth = TRUE,
type = c("trafo", "distribution", "survivor", "density", "logdensity", "hazard",
"loghazard", "cumhazard", "odds", "logodds", "quantile"),
...
)A numeric matrix of the predicted values invisibly.
A tramME object.
an optional data frame of observations
Random effects (either in named list format or a numeric vector) or the word "zero". See Details.
If FALSE, the random effects coefficients of the smooth
terms are refitted to newdata. It's probably not what you want to do.
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.
When ranef is equal to "zero", a vector of zeros with the right size is
substituted. For more details, see predict.tramME.
For more information on how to control the grid on which the functions are evaluated,
see the documentation of predict.mlt.
data("sleepstudy", package = "lme4")
fit <- BoxCoxME(Reaction ~ Days + (Days | Subject), data = sleepstudy)
plot(fit, K = 100, type = "density")
Run the code above in your browser using DataLab