predict.bestfit: Predict method for bestfit linear models

View source: R/predict.bestfit.R

predict.bestfitR Documentation

Predict method for bestfit linear models

Description

Predict values based on a bestfit object.

Usage

## S3 method for class 'bestfit'
predict(
  object,
  fit = 1,
  newdata = object$newdata,
  interval = c("none", "confidence", "prediction"),
  level = 0.8,
  ...
)

Arguments

object

object of class bestfit

fit

The number of the chosen model from the combinations matrix (defaults for the best R2 model)

newdata

An optional data frame in which to look for variables with which to predict. Defaults for the eventually existent "aval" data in data frame used to build the bestfit model. If omitted, the fitted values are used.

interval

Type of interval calculation. Can be abbreviated. Defaults to confidence interval

level

Tolerance/confidence level. Defaults for the standardized value in NBR-14.653-2 (80%)

...

further arguments passed to predict.lm.

Examples

dados <- st_drop_geometry(centro_2015)
best_fit <- bestfit(valor ~ .,  data = dados)
p <- predict(best_fit, interval = "confidence")
p


lfpdroubi/appraiseR documentation built on April 14, 2024, 10:27 p.m.