Predict from the results of a linear model
Usage
# S3 method for ModelLm
predict(object, newdata, ...)
Arguments
- object
a linear model of class
ModelLm
- newdata
data of class
data.frame
orDataset
- ...
additional arguments
Examples
cars.data <- Dataset(data = cars, target = "dist")
inducer <- InducerLm()
lmfit <- fit.InducerLm(.inducer = inducer, .data = cars.data)
#> Error in fit.InducerLm(.inducer = inducer, .data = cars.data): could not find function "fit.InducerLm"
predict.ModelLm(object = lmfit, newdata = data.frame(speed = 10))
#> Error in predict.ModelLm(object = lmfit, newdata = data.frame(speed = 10)): could not find function "predict.ModelLm"
predict.ModelLm(object = lmfit, newdata = cars.data[c(1, 2, 3, 4), ])
#> Error in predict.ModelLm(object = lmfit, newdata = cars.data[c(1, 2, 3, 4), ]): could not find function "predict.ModelLm"