How do I compute the standard error if I only know the p-value, the beta (i.e., the regression coefficient from a linear regression), the sample size, and the number of regression parameters?
-
What does "beta" represent here? I'm guessing regression coefficients? – COOLSerdash Mar 27 '18 at 16:06
-
Yes it does! Regression coefficients from a linear regression. – Abdel Mar 27 '18 at 16:06
-
Then please edit your question and add this information. Short answer: No, you need the residual degrees of freedom (or sample size and number of regression parameters). Just the coefficient and the p-value is not enough. – COOLSerdash Mar 27 '18 at 16:08
-
Thank you! I will edit the question, as I actually do have the sample size, just not in the file I was looking at :) Thank you! – Abdel Mar 27 '18 at 16:09
-
As I said: The sample size alone is still not enough: You need to know how many variables were included in the regression models. – COOLSerdash Mar 27 '18 at 16:13
-
Yes I just did! :) – Abdel Mar 27 '18 at 16:14
-
The standard error of what estimate, exactly? Of the betas? $R^2$? Residual variance? Something else? – whuber Mar 27 '18 at 17:28
-
The standard error of the beta. – Abdel Mar 27 '18 at 17:31
1 Answers
In a linear regression, the $p$-value is calculated from a $t$-value, which is the coefficient divided by its standard error ($t=\hat{\beta}/\mathrm{SE}_{\hat{\beta}}$). The degrees of freedom used in the $t$-distribution for calculating the $p$-value are the residual degrees of freedom ($\mathrm{SE}_{\hat{\beta}}=\hat{\beta}/|t|$). The residual degrees of freedom, on the other hand are the total degrees of freedom of the variance $N-1$ minus the model degrees of freedom $k-1$, where $k$ is the number of parameters including the intercept. So the residual degrees of freedom are $(N-1)-(k-1) = N-k$.
From this, you can use the quantile distribution of the $t$-distribution to calculate the standard error. Example: Assume that $\hat{\beta}=5.47, p = 0.004, N = 100, k = 4$. The residual degrees of freedom are $100-4 = 96$. We assume that the $p$-value is two-sided.
Using R, the calculations are:
t_val <- qt(0.004/2, df = 96) # Calculating the t-value using quantile function
5.47/abs(t_val) # Calculating standard error
1.854659
So the standard error was 1.85.
- 30,198
-
-
1@Papayapap Sure, because $t$-tests are nothing else as regression models with categorical predictors. For a two-sample $t$-test, the predictor is binary and for the one-sample/paired $t$-test there is only an intercept. – COOLSerdash Nov 08 '21 at 09:26