Learn R Programming

spTimer (version 0.8)

as.forecast.object: Conversion of spT object into forecast object

Description

This function is used to convert the spT object from the temporal prediction output of "spTimer" into forecast object of the package "forecast".

Usage

as.forecast.object(object, site=1, level=c(80,95), ...)

Arguments

object
Object of class inheriting from "spT".
site
Selection of location/site for which the time-series will convert into forecast object.
level
Confidence level for temporal prediction intervals, see details in forecast.
...
Other arguments, see details in forecast.

Value

  • An object class "forecast"
  • modelName of the fitted model.
  • methodName of the forecasting method.
  • meanMCMC mean for the temporal predictions.
  • lowerLower limits for the temporal prediction intervals obtained from the MCMC samples.
  • upperUpper limits for the temporal prediction intervals obtained from the MCMC samples.
  • levelPrediction interval limits.
  • xThe data used for model fitting in time-series format, see ts.
  • residualsResiduals of the fiited model.
  • fittedFitted MCMC mean.

See Also

spT.Gibbs, predict.spT.

Examples

Run this code
##

# 'out' is the output of spT class obtained from temporal prediction
fobj<-as.forecast.object(out) 
class(fobj)
summary(fobj) 
plot(fobj) 

##

Run the code above in your browser using DataLab