Mirrors the C# LinearRegression.Predict/PredictionIntervals methods.
Usage
# S3 method for class 'corehydro_lm'
predict(object, newdata, interval = FALSE, level = 0.9, ...)Arguments
- object
a
corehydro_lmfromlinear_regression().- newdata
a numeric matrix of predictors with the same number of columns as the
xthe model was fitted with (an intercept column, if any, is added internally), or a numeric vector for a single-predictor model.- interval
if
TRUE, also return thelevelprediction interval (a Student-t interval around the mean response, mirroringPredictionIntervals). DefaultFALSE.- level
prediction interval level, between 0 and 1. Default
0.90, matchingPredictionIntervals's ownalpha = 0.1default.- ...
unused; present for generic consistency.
Value
with interval = FALSE, a numeric vector of predicted values, one per row of
newdata. With interval = TRUE, a matrix with columns lower, upper, mean.