Hello
Why do we get NAs in residual and fitted values of forecast() function. Below is an example
fancy <- scan("http://robjhyndman.com/tsdldata/data/fancy.dat")
souvenir_series = ts(data =log(fancy),start = 1987, frequency = 12)
souvenir_series_forecasts = HoltWinters(souvenir_series)
souvenir_series_forecasts2 = forecast(souvenir_series_forecasts,h = 48)
souvenir_series_forecasts2$residuals
Andrea
April 16, 2019, 11:06am
3
Hi!
To help us help you, could you please prepare a repr oducible ex ample (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
By executing the codes which I have given, you will be able to generate the output shown.
Let me know if I am missing something.
Andrea
April 16, 2019, 12:27pm
5
I won't, because your code doesn't load any package. Please have a look at the link I provided to see how to make a reproducible example.
system
Closed
May 7, 2019, 12:27pm
6
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.