predict.diffusion | R Documentation |
Calculates the values for h future periods of a fitted diffusion curve.
## S3 method for class 'diffusion'
predict(object, h = 10, ...)
object |
|
h |
Forecast horizon. |
... |
Unused argument. |
Returns an object of class diffusion
, which contains:
type
diffusion curve type used
call
calls function fitted
w
named vector of fitted parameters
y
actuals
fit
fitted values of model
frc
forecasts for future periods.
mse
insample Mean Squared Error
prew
the w
of the previous generation
pval
p-values for w
This function populates the matrix frc of the diffusion
object used as input.
Oliver Schaer, info@oliverschaer.ch,
Nikoloas Kourentzes, nikoloas@kourentzes.com
diffusion
.
fit <- diffusion(tsChicken[, 2])
fit <- predict(fit, 20)
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.