Evaluates the _conditional_ distribution implied by a tramME model, given by a set of covariates and random effects on a selected scale.
1 2 3 4 5 6 7 8 9
an optional data frame of observations
Random effects (either in named list format or a numeric vector) or the word "zero". See Details.
The scale on which the predictions are evaluated:
Additional arguments, passed to
newdata contains values of the response variable, prediction is only
done for those values. In this case, if random effects vector (
ranef) is not
supplied by the user, the function predicts the random effects from the model
When no response values are supplied in
newdata, the prediction is done
on a grid of values for each line of the dataset (see
for information on how to control the setup of this grid).
In this case, the user has to specify the vector of random effects to avoid ambiguities.
The linear predictor (
type = "lp") equals to the shift terms plus the random
effects terms _without the baseline transfromation function_.
The linear predictor (
type = "lp") and the conditional quantile function
type = "quantile") are special in that they do not return results evaluated
on a grid, even when the response variable in
newdata is missing. The probabilities
for the evaluation of the quantile function can be supplied with the
In the case of
type = "quantile", when the some of the requested conditonal
quantiles fall outside of the support of the response distribution
(specified when the model was set up), the inversion of the CDF cannot be done exactly
tramME returns censored values.
ranef is equal to "zero", a vector of zeros with the right size is
A numeric vector/matrix of the predicted values (depending on the inputs)
response object, when the some of the requested conditonal quantiles
fall outside of the support of the response distribution specified when the model
was set up (only can occur with
type = "quantile").
1 2 3 4 5 6 7
data("sleepstudy", package = "lme4") fit <- BoxCoxME(Reaction ~ Days + (Days | Subject), data = sleepstudy) predict(fit, type = "trafo") ## evaluate on the transformation function scale nd <- sleepstudy nd$Reaction <- NULL pr <- predict(fit, newdata = nd, ranef = ranef(fit), type = "distribution", K = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.