predict {mvMORPH}R Documentation

Predictions from (multivariate) gls or ols model fit

Description

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

Usage


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

Arguments

object

an object of class 'mvgls' obtained from a mvgls or mvols 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. For models fit by mvgls, 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 (BLUP) 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 or mvols.

Author(s)

J. Clavel

See Also

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


[Package mvMORPH version 1.1.9 Index]