Reputation: 242
I'm doing a meta analysis on prevalence data. In each study, participants can belong to one of three mutually exclusive groups. I would like to figure out the prevalence of each group (i.e., the percent of individuals belonging to each) across all of the studies, accounting for sample size.
I am using the "meta" package to do this. I would love if someone could take a look and see if I am doing this correctly. I have attached some sample data and code.
The thing that is giving me pause is that the three prevalence estaimtes with random effects don't add up to 100. Is that normal?
require(data.table)
require(meta)
data <- data.table(Study = c("Smith", "Bond", "Francis", "Smith", "Bond", "Francis", "Smith", "Bond", "Francis"), Group = c("A", "A", "A", "B", "B", "B", "C", "C", "C"), size = c(150, 40, 30, 150, 40, 30, 150, 40, 30), members = c(140, 30, 20, 5, 5, 5, 5, 5, 5))
data$Study <- as.factor(data$Study)
data$Group <- as.factor(data$Group)
analysis <- metaprop(data = data, event = members, n = size, studlab = Study, byvar = data$Group)
To give some info on the data. Study is the name of each of the three studies. Group is which of the three groups each row refers to. Size is the sample size in a given study. Members is the number of people in the sample that belong to a given group.
Upvotes: 3
Views: 384
Reputation: 121
When I tried the same model on only the subsets of your groups I get the same results, so the effects are indeed calculated for each group seperately. This means that the groups may not add up to a prevalence of 100 exactly.
data <- data[ which(data$Group=='A'),]
I am not sure how to combine the groups for analysis (and I dont know if that is advisable). Maybe the tau.common argument can be of use. good luck anyway!
Upvotes: 2