Learn R Programming

mvMORPH (version 1.1.5)

predict.mvgls: Predictions from (multivariate) gls model fit

Description

Returns the prediction(s) of a linear model of class 'mvgls'.

Usage

# S3 method for mvgls
predict(object, newdata, ...)

Arguments

object

an object of class 'mvgls' obtained from a mvgls fit.

newdata

a dataframe with new observation(s). The column names must match the names of the predictors in the model fit object. The type (e.g. factors, numeric) must also match the type of the predictors in the model fit object. Note: the fitted values are simply returned if "newdata" is not provided.

...

further arguments for this generic function. If tree is provided (with tip name(s) matching rowname(s) in newdata and in the training (model fit) dataset), then the best unbiased linear prediction (BLUB) for the model is returned. Otherwise the GLS coefficients are used to predict "newdata".

Value

A matrix with the predictions for the linear model fitted by mvgls.

See Also

fitted.mvgls vcov.mvgls residuals.mvgls coef.mvgls mvgls