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
)?
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$