data.frame
R/base_fortify_ts.R
fortify.tsmodel.Rd
Convert time series models (like AR, ARIMA) to data.frame
# S3 method for class 'tsmodel'
fortify(
model,
data = NULL,
predict = NULL,
is.date = NULL,
ts.connect = TRUE,
...
)
Time series model instance
original dataset, needed for stats::ar
, stats::Arima
Predicted stats::ts
If not provided, try to retrieve from current environment using variable name.
Logical frag indicates whether the stats::ts
is date or not.
If not provided, regard the input as date when the frequency is 4 or 12.
Logical frag indicates whether connects original time-series and predicted values
other arguments passed to methods
data.frame
if (FALSE) { # \dontrun{
fortify(stats::ar(AirPassengers))
fortify(stats::arima(UKgas))
fortify(stats::arima(UKgas), data = UKgas, is.date = TRUE)
fortify(forecast::auto.arima(austres))
fortify(forecast::arfima(AirPassengers))
fortify(forecast::nnetar(UKgas))
fortify(stats::HoltWinters(USAccDeaths))
data(LPP2005REC, package = 'timeSeries')
x = timeSeries::as.timeSeries(LPP2005REC)
d.Garch = fGarch::garchFit(LPP40 ~ garch(1, 1), data = 100 * x, trace = FALSE)
fortify(d.Garch)
} # }