prepDatForPredict: Exclude rows with missing data on predictor variables

Description Usage Arguments Details Value

View source: R/method_predict.R

Description

Rows with missing values on predictor variables are excluded. An unused column for the dependent variable is added to avoid errors.

Usage

1

Arguments

formula

Model formula

newdata

data.frame containing all variables that appear in the model

Details

A column of ones for the dependent variable is added. Otherwise model.matrix tries to take it from the formula's environment, which is the original data. This usually results in an error due to unequal variable length. This column is however not used.

Value

Object of class na.exclude


BMSC documentation built on Aug. 2, 2019, 5:05 p.m.

Related to prepDatForPredict in BMSC...