predictlm: Predict method for linear model fits

Description Usage Arguments Value Examples

View source: R/predictlm.R

Description

Predicted values of a new dataset based on the fitted linear regression model.

Usage

1
predictlm(op, newdata)

Arguments

op

output of mylm function

newdata

new dataset

Value

Predicted values based on the linear model

Examples

1
2
3
model1 <- mylm( mpg~wt+gear,inputdata = mtcars, style = "nothing" )
newdata <- data.frame( wt = c(2.945, 3.130, 4.280), gear = c( 3,3,4 ) )
predictlm( model1, newdata )

ZimanJiang/mylm documentation built on Dec. 18, 2021, 9:22 p.m.