0

Want to study the regime switching of a time series using MSGARCH package in Rstudio. After specifying the model, tried to fit the model using data of series using FitML function.I have used the following code to fit data.

msgarch_fit=FitML(msgarch_spec,data="log_ret") ## I have found the log return of the series and saved it in the vector named "log_ret". 

But the following error is displayed.

"Error in f_check_y(data) : y must be numeric"

Being a beginner I can't understand the meaning of it. It would be of great help if someone can explain.

I tried to execute the code but error was displayed.

I was expecting to get the summary output.

Thank you

m0nhawk
  • 22,980
  • 9
  • 45
  • 73
manik
  • 1
  • 1
  • This error is literal, `y` isn't numeric. Since your question isn't reproducible, I'm going to guess that passing a string as `data` is the first problem. Is there data named `log_ret`? If so, is it an object in your environment? If yes, then remove the quotation marks. It looks like you're new to SO; welcome to the community! If you want great answers quickly, it's best to make your question reproducible. This includes sample data like the output from `dput()` or `reprex::reprex()` and any libraries used. Check it out: [making R reproducible questions](https://stackoverflow.com/q/5963269). – Kat Jan 07 '23 at 17:09

0 Answers0