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