# How to calculate standard error of a regression coefficient given R output

Given the following regression equation

$$mpg_i=\beta_0 + \beta_1 weight_i+ \beta_2 ln(hp_i)+ \beta_3 diesel_i + \beta_4 ln(torque_i) + \beta_5 ln(torque_i) + \beta_6 year_i+\epsilon_i$$

with the following R output:

How to calculate the standard error of the dummy variable diesel (which is 1 when the car has a diesel engine, 0 otherwise)?

I know:

$$\begin{matrix}\widehat{\text{se}}(\hat{b})=\sqrt{\frac{\hat{\sigma}^2}{\sum_i(x_i-\bar{x})^2}}\end{matrix}$$

and

$$\hat{\sigma}^2=\frac{1}{N-K}\sum_i\hat{\epsilon}_i^2$$

but neither $$\sum_i(x_i-\bar{x})^2$$ nor $$\sum_i\hat{\epsilon}_i^2$$ are given. Is there any way this is possible?

• Note that $t = \beta/\operatorname{SE}$. Jul 23, 2023 at 19:46

Got it.

Solve the t-Statistics given in the output for the standard error.

$$t-Value = 65.0 = \frac{6.5860610 - 0}{\hat{\sigma}_{diesel}} \implies \hat{\sigma}_{diesel} = \frac{6.5860610}{65.0} = 0.1013240154$$