I'm using rugarch::ugarchforecast to do a 1 step ahead rolling forecast. I keep getting the error message $ operator is invalid for atomic vector, but I'm not using the $ operator, nor am I using an atomic vector. Why do I get this error and how do I fix it?
Asked
Active
Viewed 40 times
-2
-
Can you tell us what you ARE using? – Sotos May 13 '22 at 12:53
-
I'm using RStudio – ameliedc May 13 '22 at 13:01
-
or did you mean the code: aapl_forecast=ugarchforecast(spec_f, data=aapl_4477 , n.ahead=1, n.roll=200, out.sample=200) – ameliedc May 13 '22 at 13:01
-
1ameliedc, questions on SO (especially in R) do much better if they are reproducible and self-contained. By that I mean including attempted code (please be explicit about non-base packages), sample representative data (perhaps via `dput(head(x))` or building data programmatically (e.g., `data.frame(...)`), possibly stochastically), perhaps actual output (with verbatim errors/warnings) versus intended output. Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans May 13 '22 at 13:21