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 using both id and byvar together (i.e. three-level meta-analysis with subgroups) #38

Closed
igelstorm opened this issue Jul 5, 2021 · 1 comment

Comments

@igelstorm
Copy link

Hi,

I get the following error when calling metagen and passing in both an id (for three-level meta-analysis) and byvar (for subgroup analysis):

Error in add.w[j, ] <- c(meta1$sign.lower.tau, meta1$sign.upper.tau) : 
  number of items to replace is not a multiple of replacement length

Any idea what might cause this, and whether it's likely a bug or a problem with how we are trying to use the function?

Here's a minimal reproducible example (the error message is the same as we get with different data and some other differing arguments):

data(Pagliaro1992)

# Add fictitious grouping variables
Pagliaro1992$region <- rep(c("Europe", "Europe", "Asia", "Asia"), times = 7)
Pagliaro1992$id <- rep(c(1, 2, 3, 4), times = 7)

m <- metagen(logOR, selogOR,
             byvar = region,
             id = id,
             data = Pagliaro1992,
             sm = "OR")

Many thanks,
Erik

@guido-s
Copy link
Owner

guido-s commented Jul 7, 2021

Erik,

Thank you for pointing out this bug. Albeit subgroup analysis was possible for a three-level model it was not fully operational. Should work now.

Best, Guido

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

2 participants