Predictions Based on Linear Models

Share:

Description

Function to predict a vector of full length (number of observations), where predictions according to missing explanatory values are replaced by NA.

Usage

1
mypredict.lm(object, newdata)

Arguments

object

an object of class lm.

newdata

matrix or data frame to be predicted according to object.

Value

Vector of predicted values.

Note

predict.lm delivers a vector of reduced length, i.e. rows where explanatory variables are missing are omitted. The full length of the predicted observation vector is necessary in the indirect classification approach (predict.inclass).

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.