Skip to content
Back to formatted view

Raw Message

Message-ID: <EF8296F5-B9C2-49CC-B476-6E684C5266C3@icloud.com>
Date: 2023-06-21T14:09:37Z
From: Massimo Baudo
Subject: [R-meta] Help with estimate adjustment
In-Reply-To: <C5C9BEF5-607C-4C2F-9EC2-6A0B851868B6@uniklinik-freiburg.de>

Thank you Guido for your precious and valuable answer.

Best,
Massimo

> Il giorno 21 giu 2023, alle ore 15:57, Dr. Guido Schwarzer <guido.schwarzer at uniklinik-freiburg.de> ha scritto:
> 
> Massimo,
> 
> You could either conduct a subgroup analysis (if your covariate has few different values) or a meta-regression. Here is a fictitious example.
> 
> library(meta)
> 
> dat <- data.frame(n = rep(100, 6), mean = 1:6, sd = rep(1, 6), age = runif(6, 40, 60))
> dat$age.c <- dat$age - mean(dat$age)
> dat$agecat <- factor(dat$age > 50, levels = c(FALSE, TRUE), labels = c("<= 50 years", "> 50 years"))
> 
> m <- metamean(n, mean, sd, data = dat)
> m
> 
> # Subgroup analysis
> update(m, subgroup = agecat)
> 
> # Subgroup analysis assuming a common between-study variance in subgroups
> update(m, subgroup = agecat, tau.common = TRUE)
> metareg(m, ~ agecat) # same result
> 
> # Meta-regression using continuous covariate
> metareg(m, ~ age.c)
> 
> 
> Best,
> Guido
>