Error in Predict for ARMA GARCH model

Detection score: 5.5

<p>I still got a similar problem, I am trying to predict a TAR model:</p>

<pre><code> for (i in 1:(fc_length)){
tar_fit = (tar(data[(i):(cutoff+i-1),c(-1)],ARorder$K.est[1],ARorder$K.est[2],1))
predicted_value = predict(tar_fit,n.ahead = n)$fit[n]
fc_values[i] = predicted_value
}
</code></pre>

<p>and I get the same error message in the predict function</p>

<pre><code>Error in x[seq(xstart)] &lt;- xstart : 
only 0's may be mixed with negative subscripts
</code></pre>

<p>Surpirsingly the error message occurs after some loops, which does not make any sense to me!
Furhtermore on slightly bigger data sets it doesn't occur either.</p>

<p>Any suggestions how to solve the problem?</p>

<p>Thanks 
Jakob</p>
Posted 8 days ago | reported 8 days ago
Posted by mb\_jakob (1)

Caught by 4 reasons: