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

Select mvn_method when running fitted_samples() #279

Closed
stefgehrig opened this issue Apr 15, 2024 · 1 comment
Closed

Select mvn_method when running fitted_samples() #279

stefgehrig opened this issue Apr 15, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@stefgehrig
Copy link

stefgehrig commented Apr 15, 2024

While post_draws() contains the possibility to set mvn_mehod (the package/method to simulate form the multivariate normal implied by the fitted vcov matrix), this option is not available in fitted_samples.gam(), which calls post_draws().

Is there a reson for this? It would be handy to switch to mvn_method = "mgcv" from the default mvn_method = "mvnfast" when using method = "gaussian" with fitted_samples.gam(). In my case, the cholesky decomposition used by mvnfast failed, so I needed to switch to the (slower) implementation.

A very easy fix would be to add the default mvn_method = "mvnfast" explicitly to the signature of fitted_samples.gam(), and the signature mvn_method = mvn_method to the call to post_draws() within fitted_samples.gam.

@gavinsimpson gavinsimpson added bug Something isn't working enhancement New feature or request labels Apr 17, 2024
@gavinsimpson
Copy link
Owner

Quite right: weirdly, one of the other methods for models fitted by scam() did allow this and I think I must have gotten distracted after adding it to that method and never got round to adding to all the other methods as well.

I'm just checking some fixes for this, which should be on GitHub soon.

gavinsimpson added a commit that referenced this issue Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants