0
$\begingroup$

Consider the following linear regression $$Y = \beta_1X_1 + \beta_2X_2 + \epsilon$$

Can I compute a confidence interval for the estimate of the quantity ? $$\frac{\beta_1}{\beta_2}$$

# Load the mtcars dataset
data(mtcars)

# Fit a linear regression model with two predictor variables (e.g., mpg and hp)
lm_model <- lm(mpg ~ 0 + hp + wt, data = mtcars)

# Summarize the model
summary(lm_model)

Coefficients:
   Estimate Std. Error t value Pr(>|t|)   
hp -0.03394    0.03940  -0.861   0.3959   
wt  6.84045    1.89425   3.611   0.0011 **

I don't want to resort to the Delta method or bootstrap.

$\endgroup$
10
  • 3
    $\begingroup$ Do you mean confidence interval for $\beta_1 / \beta_2$ rather than $\hat{\beta}_1 / \hat{\beta}_2$? Also the example regression has an intercept, so it's $E(Y) = \beta_0 + \beta_1 x_1 + \beta_2 x_2$. Usually it makes sense to include the intercept term. $\endgroup$
    – dipetkov
    Sep 2 at 11:28
  • 4
    $\begingroup$ This is a minor variation of your previous question and can be addressed in the same manner described there. The question of how to estimate the ratio $\beta_1/\beta_2$ was recently posed at stats.stackexchange.com/questions/625150/…. For closely related threads (which likely already have answers) see this site search. $\endgroup$
    – whuber
    Sep 2 at 14:20
  • $\begingroup$ Why not use the Delta method or the bootstrap? $\endgroup$
    – jbowman
    Sep 2 at 17:53
  • 2
    $\begingroup$ @jbowman: If $\beta_2$ is close to zero, that can be imprecise, just use the profile likelihood as outlined in the post linked by whuber (and answered by me) $\endgroup$ Sep 2 at 18:42
  • 4
    $\begingroup$ The delta method leads to symmetric confidence intervals which are not realistic here. That would cause at least one of the tails to not have accurate non-coverage probability (e.g., 0.1 when you hope for 0.025 for a two-sided 0.95 CI). If you fit a Bayesian regression you simply examine all the posterior draws of the ratio and construct an exact (aside from simulation error) uncertainty interval (highest posterior density interval or credible interval). $\endgroup$ Sep 3 at 11:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.