Predict values based on a bestfit
object.
# S3 method for bestfit predict(object, fit = 1, newdata = object$newdata, interval = c("none", "confidence", "prediction"), level = 0.8, ...)
object | object of class |
---|---|
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 |
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. |
best_fit <- bestfit(valor ~ ., data = centro_2015@data) p <- predict(best_fit, interval = "confidence") p#> Predictions: #> fit lwr upr AMP G.P. C.A.I. C.A.S. L.I. L.S. #> 1 650202.4 717559.8 591902.6 19.33 III 552672.1 747732.8 591902.6 717559.8 #> 2 963580.5 1021476.7 910470.5 11.52 III 819043.4 1108117.6 910470.5 1021476.7 #> 3 1035927.9 1105696.8 972560.0 12.85 III 880538.7 1191317.0 972560.0 1105696.8#> Predictions: #> fit lwr upr AMP G.P. C.A.I. C.A.S. L.I. L.S. #> 1 621254.7 684508.8 566379.8 19.01 III 528066.5 714442.9 566379.8 684508.8 #> 2 950162.3 1006655.3 898294.7 11.40 III 807637.9 1092686.6 898294.7 1006655.3 #> 3 1016841.4 1085231.4 954718.2 12.84 III 864315.2 1169367.6 954718.2 1085231.4