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

[BUG]: Can't generate leaveoneout plots and forest plots #475

Open
iikkalord opened this issue Mar 3, 2024 · 1 comment
Open

[BUG]: Can't generate leaveoneout plots and forest plots #475

iikkalord opened this issue Mar 3, 2024 · 1 comment
Labels

Comments

@iikkalord
Copy link

iikkalord commented Mar 3, 2024

Please make sure that this is a bug! If you have questions about how to use TwoSampleMR please use the Discussions function instead.

Describe the bug (required)

An error fails when I try to generate leaveoneout plots and forest plots.

Describe the current behaviour you observe (required)

res_single <- mr_singlesnp(
har_data,
parameters = default_parameters(),
single_method = "mr_wald_ratio",
all_method = c("mr_ivw", "mr_egger_regression")
)
mr_forest_plot(res_single, exponentiate = FALSE)
Error in levels<-(*tmp*, value = as.character(levels)) :
factor level [145] is duplicated
res_loo <- mr_leaveoneout(har_data, parameters = default_parameters(), method = mr_ivw)
mr_leaveoneout_plot(res_loo)
Error in levels<-(*tmp*, value = as.character(levels)) :
factor level [13] is duplicated*

Describe the behaviour you expect (required)

Multiple forest maps or leaveoneout maps should be generated normally.

R code to reproduce the issue (required)

res_single <- mr_singlesnp(har_data)
mr_forest_plot(res_single)
res_loo <- mr_leaveoneout(har_data)
mr_leaveoneout_plot(res_loo)

System information

R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

Additional context

I am single exposure data to multiple outcome data

@iikkalord iikkalord added the bug label Mar 3, 2024
@remlapmot
Copy link
Contributor

We need to know what your dataset looks like otherwise we cannot help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants