Predict from a rqTList
Object.
predict.rqTList.Rd
Predict from a rqTList
Object.
Arguments
- object
A
rqTList
object representing a list of regression quantile models as created by therq
function of the quantreg package.- newdata
New data frame.
- lastFullYear
Logical. If
TRUE
, only the last full year in the data used to fit the quantile regressions will be used. If the regression quantile uses only functions of the date that have the one-year periodicity, the one should uselastFullYear = TRUE
.- out
Character giving the format of the output. If
"short"
a numeric matrix is returned with the formated date as its rownames. If"long"
a data frame with columnsDate
,u
andtau
is returned. The long format is useful when ggplots areto be produced.- na.action
See
predict.rq
.- trace
Integer level of verbosity.
- ...
Further arguments passed to the
predict
method of the class"rq"
.
Caution
For now, a rqTList
object does not store
the calls to design functions used at creation time, although
these designs functions may have to be re-called on
newdata
. A quick and dirty solution is used, based on
the variables names. It works only for trigonometric bases
created by using `tsDesign` with `type = "trigo"`.
Examples
RqRennes <- rqTList(dailyMet = Rennes)
## use a matrix
pRennes <- predict(RqRennes, out = "short")
if (FALSE) {
stat <- findStationMF("bordeaux-me")
## you may here have to use `Sys.setenv(metData = xxx)`
Bordeaux <- readMet(stat)
RqBordeaux <- rqTList(dailyMet = Bordeaux)
pBordeaux <- predict(RqBordeaux, out = "short")
pBordeaux - pRennes
autoplot(as.ts(pBordeaux - pRennes)) +
ggtitle("differences in the quantiles Bordeaux - Rennes")
}