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

Make ei_iter sample size changeable #90

Open
aridf opened this issue Aug 18, 2020 · 0 comments
Open

Make ei_iter sample size changeable #90

aridf opened this issue Aug 18, 2020 · 0 comments

Comments

@aridf
Copy link
Collaborator

aridf commented Aug 18, 2020

Currently ei_iter() takes a fixed number of importance samples to form final estimates. The file ei_sim.R ports over all necessary functions from within the ei package and alters them to be parameterized. But when this is implemented we get different results in some instances. To replicate this problem, take this section of the ei_iter code:

eiCompare/R/ei_iter.R

Lines 183 to 194 in a65ce94

simulate = TRUE,
args_pass
)
)
})
break
# This was meant to enable parameterization of the ei importance sample
# size, but its inclusion changes results dramatically.
# utils::capture.output({
# ei_out <- suppressMessages(ei_sim(ei_out, samples))
# })
},

Uncomment lines 191-193 and switch simulate = FALSE, then compare ei_iter results to ei_est_gen. Will see large differences, especially where uncertainty is high.

This might be due to differences in the namespaces from which functions with ei_sim are drawn. The ei package is not explicit about which packages it is pulling different distribution-related functions. I have made best guesses based on the imports listed in the ei package NAMESPACE file, but these could be wrong, or they could be different versions of the same function.

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

1 participant