Trouble with function nnetar

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Trouble with function nnetar

 I was playing around with the nnetar function in the forecast package,
trying to generate a 3-year forecast (36 months), the R fit result is shown

 #Neural Nets Fitting and Forecast
> fit<-nnetar(condataset$ConPcums97)
> fit
Series: condataset$ConPcums97
Model:  NNAR(13)
Call:   nnetar(x = condataset$ConPcums97)

Average of 20 networks, each of which is
a 13-7-1 network with 106 weights
options were - linear output units

sigma^2 estimated as 5.34e+12

Now, R is sending me the following error message:

 x<-forecast(fit, h=36)
Error in predict.nnet(X[[1L]], ...) : missing values in 'x'
> forecast(fit)
Error in predict.nnet(X[[1L]], ...) : missing values in 'x'
> x<-forecast(nnetar(condataset$ConPcums97), h=36)
Error in predict.nnet(X[[1L]], ...) : missing values in 'x'

I am attaching the same data I used to try the nnetar function. Can you
give me some guidance or tell me what could be done to generate the
forecast with this function?

Best regards,


[hidden email] mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.