Learn R Programming

diffusion (version 0.4.0)

predict.diffusion: Predict future periods of a fitted diffusion curve.

Description

Calculates the values for h future periods of a fitted diffusion curve.

Usage

# S3 method for diffusion
predict(object, h = 10, ...)

Value

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

Arguments

object

diffusion object, produced using diffusion.

h

Forecast horizon.

...

Unused argument.

Author

Oliver Schaer, info@oliverschaer.ch,

Nikoloas Kourentzes, nikoloas@kourentzes.com

See Also

diffusion.

Examples

Run this code
 fit <- diffusion(tsChicken[, 2])
 fit <- predict(fit, 20)
 plot(fit)

Run the code above in your browser using DataLab