Predicting with function `arima` producing NaN values in R -
i using arima function intraday forecasting. data available every 15 minute in day. in code below, working fine except few values of in loop. output displayed i=223. predict function produces nan values. have checked dataset, there no nan value there. kindly suggest me how rid of problem.
predict1=c() predict2=c() for(i in 1:456){ y1n=ts(nbl$nbp[(12385+(i-1)*4):(15356+(i-1)*4)],frequency=96) y1n[which(is.na(y1n))]=y1n[which(is.na(y1n))-96] arima1=arima(y1n,order=c(1,1,0),seasonal=c(2,1,1),method="css") predict1=predict(arima1,8) predict2[(((i-1)*4)+1):(((i-1)*4)+4)]=predict1$pred[5:8] } arima1 call: arima(x = y1n, order = c(1, 1, 0), seasonal = c(2, 1, 1), method = "css") coefficients: ar1 sar1 sar2 sma1 0.0241 -0.1122 -0.1068 -0.7830 s.e. 0.0188 0.0240 0.0224 0.0189 sigma^2 estimated 1490: part log likelihood = -14583.05 > predict1=predict(arima1,8) > predict1 $pred time series: start = c(31, 93) end = c(32, 4) frequency = 96 [1] nan nan nan nan nan nan nan nan $se time series: start = c(31, 93) end = c(32, 4) frequency = 96 [1] nan nan nan nan nan nan nan nan
Comments
Post a Comment