[R-meta] getting standard errors from p-values

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Tue May 26 09:15:40 CEST 2020


Hi Norman,

I am assuming we are talking about regular regression here.

The sample size is equal to the df plus the number of coefficients in the model (also counting the intercept). You can then recover the SE of the slope (regression coefficient) from the p-value and the slope. Here is an illustration:

set.seed(1234)
n <- 100
x1 <- runif(n)
x2 <- runif(n)
y  <- 0.1 * x1 + 0.2 * x2 + rnorm(n)

res <- coef(summary(lm(y ~ x1 + x2)))
res

b <- res[2,1]
b

p <- res[2,4]
p

# all you know is b, p, and the df (= n-3 in this example)
# this gives the SE of the slope for x1

abs(b) / qt(p/2, df=n-3, lower.tail=FALSE)

If b and/or p are rounded, then this will introduce some error into the back-calculation. I wouldn't worry about this unless p is given not as an 'exact' value, but for example as 'p < .05' or something like that.

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org]
>On Behalf Of Norman DAURELLE
>Sent: Tuesday, 26 May, 2020 1:28
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] getting standard errors from p-values
>
>Dear list,I have a question regarding the link between p-values and standard
>errors : two of the studies I want to use for a meta analysis using slopes
>as the effect size report an estimate of the slope but do not report either
>the variance or the standard error associated with it.The studies give the
>degrees of freedom, correlation, and p-value.I think I should be able to
>retrieve the number of observations from the degrees of freedom,but I don't
>know if I can retrieve a standard error from simply the p-value and df, and
>I have not been taught a way to do so.Is there a way for me to get a
>standard error for the slope from thesemetrics ?Thank you,Norman



More information about the R-sig-meta-analysis mailing list