predict.mevr {mevr} | R Documentation |
TMEV prediction
Description
Takes a mevr
object where the TMEV has been fitted to rainfall data and calculates
bamlss
predictions for the distributional parameters and the model terms. Basically
a wrapper to the corresponding function predict.bamlss
Usage
## S3 method for class 'mevr'
predict(object, newdata, term, ...)
Arguments
object |
Object of class |
newdata |
A data frame with the model covariates (year, yday) at which predictions are required.
Note that depending on argument term, only covariates that are needed by the corresponding model terms need to be supplied.
If not supplied, predictions are made on the data supplied by the fitted object |
term |
Character of the model terms for which predictions shall be calculated.
Can only be |
... |
Arguments passed to prediction functions that are part of a bamlss.family object, i.e., the objects has a $predict() function that should be used instead. |
Details
See also the details of ftmev
for an explanation of the model terms used to fit the temporal trend
of the Weibull parameters. The basis dimensions yday_ti_shape_k,
yday_ti_scale_k, year_ti_shape_k, year_ti_scale_k are taken from
the fitting process, i.e. the call to ftmev
.
Value
A data.frame with the supplied covariables and the predicted parameters.
See Also
Examples
data(dailyrainfall)
# restrict for the sake of speed
idx <- which(as.POSIXlt(dailyrainfall$date)$year + 1900 < 1976)
data <- dailyrainfall[idx, ]
f <- ftmev(data, minyears = 5)
predict(f, term = "year")