plot.psf | R Documentation |
Takes an univariate time series and a vector with forecasted values.
## S3 method for class 'psf' plot(x, predictions = c(), cycle = 24, ...)
x |
The trained PSF model generated by psf() function. |
predictions |
A vector with previously computed forecasted values. |
cycle |
The number of values that conform a cycle in the time series (e.g. 24 hours per day, 12 month per year, and so on). Only used when input data is not in time series (ts) format. |
... |
Additional graphical parameters given to plot function. |
## Train a PSF model from the univariate time series 'nottem' (package:datasets). p <- psf(nottem) ## Forecast the next 12 values of such time series. pred <- predict(p, n.ahead = 12) ## Plot forecasted values. plot(p, pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.