Skip to content

replacing tmvtnorm with TruncatedNormal #2621

@istfer

Description

@istfer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions