predict.asreml {asreml} | R Documentation |
An instance of the generic method predict
for objects of
class asreml
. Forms a linear function of the vector of fixed
and random effects in the linear model to obtain an estimated or
predicted value.
## S3 method for class 'asreml' predict(object = NULL, classify = character(0), levels = list(), present = list(), ignore = character(0), use = character(0), except = character(0), only = character(0), associate = formula("~NULL"), average = list(), vcov = FALSE, sed = FALSE, parallel = FALSE, aliased = FALSE, design.points = list(), evaluate = TRUE, ...)
object |
An |
classify |
A character string giving the variables that define the margins of the multiway table to be predicted. Multiway tables are specified by forming an interaction type term from the classifying variables, that is, separating the variable names with the ":" operator. |
levels |
A list, named by the margins of the classifying table, of vectors
specifying the levels at which predictions are required. If
omitted, factors are predicted at each level, simple covariates are
predicted at their overall mean and covariates used as a basis for
splines or orthogonal polynomials are predicted at their design
points. Additional prediction points for spline terms should be
included in the design matrix with the |
present |
A character vector specifying which variables to include in the
If a list, there can be a maximum of two components, each a
character vector of variable names, representing non-overlapping
|
ignore |
A character vector specifying which variables to ignore in forming the predictions. |
use |
A character vector specifying which variables to add to the prediction model after the default rules have been invoked. |
except |
A character vector specifying which variables to exclude in the
prediction process. That is, the prediction model includes all
fitted model terms not in the |
only |
A character vector specifying which variables (only) form the prediction model, that is, the default rules are not invoked. |
associate |
A one-sided formula specifying terms in up to two independent
nested hierarchies. The factors in each hierarchy are written as a
compound term separated by the |
average |
A list, named by the margins of the classifying table, specifying which variables to include in the averaging set. Optionally, each component of the list is a vector specifying the weights to use in the averaging process. If omitted, equal weights are used. |
vcov |
If |
sed |
If |
parallel |
If |
aliased |
If |
design.points |
A list with named components where each component is a list or
matrix (for two dimensions), or vector (single dimension) of user
supplied prediction design points for |
evaluate |
If |
... |
Additional arguments to |
The prediction process forms a linear function of the vector of fixed and random effects in the linear model to obtain a predicted value for a quantity of interest. It is primarily used for predicting tables of adjusted means. If the table is based on a subset of the explanatory variables then the other variables need to be accounted for. It is usual to form a predicted value either at specified values of the remaining variables, or averaging over them in some way.
Prediction equations are formed just prior to the final iteration
in asreml
. The predict.asreml
method passes the list
of user specifications for the prediction design matrix to the
REML
routines through the predict
argument of
asreml
. Predicted values and standard errors are returned in
the predictions
component of the asreml
object. In
forming the predictions, predict.asreml
calls
update.asreml
to re-run the model from its previous
solution.
The full asreml
object is not returned, only the
predictions
element containing the following components:
A data frame of predicted values with class
asreml.predict
.
Optional matrix of class dspMatrix
of standard
errors of difference.
Optional variance-covariance matrix of class
dspMatrix
of the predicted values.
Summary standard error of difference.
Welham SJ, Cullis BR, Gogel BJ, Gilmour AR, Thompson R (2004). “Prediction in linear mixed models.” Australian and New Zealand Journal of Statistics, 46, 325-347.