Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: $ operator is invalid for atomic vectors #73

Open
MicheleCai opened this issue Nov 27, 2021 · 2 comments
Open

Error: $ operator is invalid for atomic vectors #73

MicheleCai opened this issue Nov 27, 2021 · 2 comments

Comments

@MicheleCai
Copy link

Hello!
This error occurred when I modeled the MSGARCH model for the logarithmic return on Brent oil futures from January 4, 2011 to December 31, 2020. I demean this logarithmic return using AR(5). This problem does not occur when I use the sequential return of Brent oil futures over the same time interval to model. How do I solve this problem?

@KhalilBelghouat
Copy link

I'm finding the same problem! Did you find a work around?

@mark0100
Copy link

mark0100 commented Mar 3, 2023

The same here.
The problem does not seem to be related to the format of the provided data to FitML() but rather to the data content.

I have lots of datasets to reproduce this problem with if someone is interested.

It looks like the problem is in line 131 of ../Package/R/FitML.R:

129 optimizer <- ctr$OptimFUN(vPw, f_nll, spec, data_, ctr$do.plm)
130
131 llk <- -optimizer$value

I suspect that the optimizer in some cases (depending on the actual data?) is returning an atomic vector and hence the error message "Error in optimizer$value : $ operator is invalid for atomic vectors".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants