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 when running x$mrtryx() #23

Open
DM087 opened this issue Aug 31, 2023 · 3 comments
Open

Error when running x$mrtryx() #23

DM087 opened this issue Aug 31, 2023 · 3 comments

Comments

@DM087
Copy link

DM087 commented Aug 31, 2023

Hi @explodecomputer @yoonsucho

Thank you for the wonderful package. I was following the 'Guide to using MR-TRYX' on this page but I get an error

https://explodecomputer.github.io/tryx/articles/guide.html

`x$mrtryx()
Using RadialMR package to detect outliers

Radial IVW

              Estimate  Std.Error   t value     Pr(>|t|)

Effect (Mod.2nd) 0.5991043 0.07718481 7.761945 8.363657e-15
Iterative 0.5991043 0.07718481 7.761945 8.363657e-15
Exact (FE) 0.6420699 0.04024276 15.954916 2.633294e-57
Exact (RE) 0.6101965 0.08849314 6.895410 5.042766e-11

Residual standard error: 1.92 on 232 degrees of freedom

F-statistic: 60.25 on 1 and 232 DF, p-value: 2.66e-13
Q-Statistic for heterogeneity: 855.6769 on 232 DF , p-value: 2.874833e-72

Outliers detected
Number of iterations = 2
Error in if (radial$outliers[1] == "No significant outliers") { :
the condition has length > 1`

Any thoughts on what could be going wrong here?

Thank you

@yoonsucho
Copy link
Collaborator

yoonsucho commented Sep 5, 2023 via email

@DM087
Copy link
Author

DM087 commented Sep 5, 2023

Hi Yoonsu,

Thank you.

I am trying to replicate the guide that you have provided here https://explodecomputer.github.io/tryx/articles/guide.html but it does not work.

In the guide it says 'Identified 11 outliers' but when I run it gives me the error

Error in if (radial$outliers[1] == "No significant outliers") { :
the condition has length > 1`

Thanks

@bluscrubs
Copy link

bluscrubs commented May 16, 2024

Also experiencing the same problem. In 'Guide to using MR-TRYX', output of x$mrtryx function reads

#> ...
#> F-statistic: 60.25 on 1 and 232 DF, p-value: 2.66e-13
#> Q-Statistic for heterogeneity: 855.6769 on 232 DF , p-value: 2.874833e-72
#> 
#>  Outliers detected 
#> Number of iterations = 2
#> **Warning in if (radial$outliers[1] == "No significant outliers") {: the condition
#> has length > 1** and only the first element will be used
#> Identified 11 outliers

However, when following the guide, I receive

library(tryx)
x <- Tryx$new(dat)
x$mrtryx()
# ...
# F-statistic: 60.25 on 1 and 232 DF, p-value: 2.66e-13
# Q-Statistic for heterogeneity: 855.6769 on 232 DF , p-value: 2.874833e-72
# 
# Outliers detected 
# Number of iterations = 2
# Error in if (radial$outliers[1] == "No significant outliers") { : 
#     the condition has length > 1

It seems the error is coming from the x$get_outliers function. Any idea how to troubleshoot?

Thank you so much for this package and your help!

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

3 participants