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

replacing tmvtnorm with TruncatedNormal #2621

Closed
istfer opened this issue Jun 2, 2020 · 0 comments · Fixed by #2622
Closed

replacing tmvtnorm with TruncatedNormal #2621

istfer opened this issue Jun 2, 2020 · 0 comments · Fixed by #2622

Comments

@istfer
Copy link
Contributor

istfer commented Jun 2, 2020

Description

I was using tmvtnorm package functions in PDA module, but I realized that it is veery veery slow. I'm planning to switch to TruncatedNormal.

Depending on the value of the B argument (number of replications for MC) in its TruncatedNormal::dtmvnorm function, it can be much faster than tmvtnorm::dtmvnorm. To be specific, the default value for B is 1e4 which makes TruncatedNormal::dtmvnorm even slower than tmvtnorm::dtmvnorm, but setting it to 1e2 is much faster. tmvtnorm::dtmvnorm is more precise than TruncatedNormal::dtmvnorm (when B=1e2), but it matters on the 2nd decimal place, which is fine for my purposes.

If there is no objection, I'm gonna replace tmvtnorm with TruncatedNormal.

@istfer istfer mentioned this issue Jun 2, 2020
12 tasks
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

Successfully merging a pull request may close this issue.

1 participant