Question

I am looking at forecast package HoltWinters method code from this link (for code understanding purpose). I couldn't find which "R" source file has this predict function defined in to look at source code. Can some one please help me on how can trace this function to a specific source code file?

 pred <- predict(object,n.ahead=h,prediction.interval=TRUE,level=level[1]/100)

Any help would be appreciated.

Was it helpful?

Solution

It is not exported, but you can find it using the ::: operator:

forecast:::predict.HoltWinters
# function (object, n.ahead = 1, newxreg = NULL, se.fit = TRUE, ...)
#   ....

OTHER TIPS

forecast<- HoltWinters(datatimeseries, beta=FALSE, gamma=FALSE)



>forecast:-

Holt-Winters exponential smoothing without trend and without seasonal component.

Call:
HoltWinters(x = datatimeseries, beta = FALSE, gamma = FALSE)

Smoothing parameters:
 alpha: 0.02412151
 beta : FALSE
 gamma: FALSE

Coefficients:
      [,1]
a 24.67819

Try this, It works for me...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top