I am attempting to fit a model to my data for meta-analysis I'm working on. The response is binary (0 or 1), and I want to specify a binomial distribution with logit link function. The 2-3 (depending on the model) explanatory variables are all categorical. metafor provides rma.glmm, but this doesn't appear to support the use case when you already have a single response variable column, but instead supports a number of cases that don't fit this one (e.g, 2 x 2 contingency tables, etc.). I do have weights for the model as well. The weights are based on sample sizes.

The first six rows of the data look like this:

    subject     type          weight      response
1         c  abiotic            12.0             0
2         c temporal            18.0             1
3         p temporal            40.0             0
4         p temporal             4.0             0
5         m  spatial           105.5             1
6         c temporal            70.0             1

Where response is the response variable, weight is the weight, and subject and type are two categorical moderator variables.

Does metafor actually support my use case, or any other R packages (e.g., meta)?

  • $\begingroup$ I would like to help, but I am not sure I understand the type of data that you have. Can you post (a subset of) your data? $\endgroup$
    – Wolfgang
    Dec 9 '13 at 23:09
  • $\begingroup$ Yes, sorry about not including more detail. I will edit the question above. Okay, sample data added $\endgroup$
    – sckott
    Dec 10 '13 at 0:26
  • $\begingroup$ Two more questions: Can the rows of your dataset be assumed to be independent? And what do those weights reflect? $\endgroup$
    – Wolfgang
    Dec 10 '13 at 0:35
  • 1
    $\begingroup$ 1) Rows are independent. Each row is a study. We had replicates within studies, but removed those so we didn't have to worry about non-independence due to study. 2) Weights are based on sample sizes from within a study. We are using an unusual effect size, so we went with sample size instead of variance (which we do have). So we would use the weight column as is in the model as studies with larger sample size should be weighted more. $\endgroup$
    – sckott
    Dec 10 '13 at 0:39
  • 1
    $\begingroup$ The binary outcome response column is a 1 if the vector of effect sizes measuring species interaction outcomes (of at least length 2) included values of mixed sign (- and +, - and zero, zero and +), and a value of 0 if the vector did not change in sign (e.g., a vector of all positive effect sizes). The actually variables measured to generate the effect sizes were things like plant biomass, abundance of organisms, etc. $\endgroup$
    – sckott
    Dec 10 '13 at 1:04

This is certainly not your usual meta-analysis and neither meta, metafor, or any other standard meta-analytic package will handle this type of analysis. I think a sort of multinomial model can be used here. You may want to check out chapter 7 in:

Venables, W. N. & Ripley, B. D. (2003). Modern applied statistics with S (4th ed.). Springer.

In particular, take a look at sections 7.3 on "Poisson and Multinomial Models". A model along the lines of:

res <- multinom(response ~ subject*type, weights=weight, data=dat)

may give you a starting point.

  • $\begingroup$ I haven't completely thought this through, so take my suggestion with a grain of salt. If you do come up with some further insights based on the usefulness of such an approach, I would love to hear about it. $\endgroup$
    – Wolfgang
    Dec 10 '13 at 1:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.