2
$\begingroup$

Can anyone help with the set up of a multiple variable regression function that does not have an intercept (no beta hat 0)? I've tried to figure it out based on class notes for one variable regression without an intercept and multiple variable regression with an intercept but my answers seem way way off.

This is the specific question: enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ Do you mean, in some kind of software? Mathematically? $\endgroup$ Commented Oct 27, 2022 at 19:41
  • $\begingroup$ Either excel or mathematically. For my econometrics class $\endgroup$
    – Braden
    Commented Oct 27, 2022 at 19:47
  • $\begingroup$ Preferably mathematically, but either works $\endgroup$
    – Braden
    Commented Oct 27, 2022 at 20:05
  • 1
    $\begingroup$ If mathematically, just leave out the $\beta_0$ in the regression function. $\endgroup$
    – jbowman
    Commented Oct 27, 2022 at 20:08
  • $\begingroup$ Regression is about fitting data to a line, and lines must intercept the axes. $\endgroup$
    – Ben
    Commented Oct 27, 2022 at 20:09

1 Answer 1

6
$\begingroup$

Ditch the intercept term and fit as usual. Unlike in regression with an intercept, the model matrix (typically denoted by $X$) will not have a column of $1$s. However, if you make a matrix $X$ with each vector of variable values as a column, then the usual equation works: $\hat\beta=(X^TX)^{-1}X^Ty$.

At least in R software, the reported $R^2$ sneakily uses a different formula than usual. While this choice can be defended, it is worth knowing that it does this and that other software might, too. Their $R^2$ in this situation is:

$$ R^2=1-\dfrac{\sum\left( y_i-\hat y_i \right)^2}{ \sum y_i^2 } $$

$\endgroup$
1
  • $\begingroup$ You may also want to point out explicitly how exactly this $R^2$ differs from the usual one. $\endgroup$ Commented Oct 28, 2022 at 6:47

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.