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 in simulation code #2

Open
felix-hof opened this issue Jun 3, 2020 · 0 comments
Open

Error in simulation code #2

felix-hof opened this issue Jun 3, 2020 · 0 comments

Comments

@felix-hof
Copy link

Hi @stefvanbuuren

I am currently studying Biostatistics and while working on a consulting project I stumbled upon your online book "Flexible Imputation of Missing Data". First of all, thanks for making this publicly available and putting in all the effort. It really helped me a lot. However, when running your simulation example in chapter 2.5, I noticed that R spits out only NaN as estimates and for the confidence interval. When looking for the reason I found that there is an error in the code in the test.impute function. The row names of "tab" are not set so per default they are just "1" and "2". Therefore accessing the second row of "tab" with tab["x", … ] does not work (at least on R version 4.0). It would probably be best to replace "x" with 2. The issue is in the fimd.R file on line 390.

Best regards,
Felix

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