Skip to main content
added 4 characters in body
Source Link
AdamO
  • 64.8k
  • 6
  • 135
  • 273

The reason why the intercept is omitted is because you have to manually create the "weighted" intercept analogue. As you have said yourself, this is the vector given by the constant term multiplied by the root of the weights vector. To additionally adjust for the intercept would correspond to a different model.

In other words, a weighted linear regression maximizes the likelihood:

$$ \mathcal{L}_{\alpha, \beta, \sigma}(X, Y, w) = \prod_{i=1}^{n} \phi(Y_i - \alpha - \beta X_i)^{w_i}$$

Where $\phi$ is the normal density.

$$\begin{eqnarray} \phi(Y_i - \alpha - \beta X_i)^{w_i} &\propto& \exp \left(-\frac{1}{2} \left( \frac{Y_i - \alpha -\beta X_i}{\sigma}\right)^2\right) ^{w_i} \\ &=& \exp\left(-\frac{w_i}{2}\left(\frac{Y_i - \alpha -\beta X_i}{\sigma} \right)\right) \\ &=& \exp\left(-\frac{1}{2}\left(\frac{\sqrt{w_i}Y_i - \alpha \sqrt{w_i} -\beta \sqrt{w_i}X_i}{\sigma} \right)\right) \\ \end{eqnarray} $$$$\begin{eqnarray} \phi(Y_i - \alpha - \beta X_i)^{w_i} &\propto& \exp \left(-\frac{1}{2} \left( \frac{Y_i - \alpha -\beta X_i}{\sigma}\right)^2\right) ^{w_i} \\ &=& \exp\left(-\frac{w_i}{2}\left(\frac{Y_i - \alpha -\beta X_i}{\sigma} \right)^2\right) \\ &=& \exp\left(-\frac{1}{2}\left(\frac{\sqrt{w_i}Y_i - \alpha \sqrt{w_i} -\beta \sqrt{w_i}X_i}{\sigma} \right)^2\right) \\ \end{eqnarray} $$

Which is immediately recognizable as the mean model for an OLS regression omitting the intercept and treating the root of the weight vector as the leading covariate, followed by the X_i scaled by the root of the weight vector as the covariable corresponding to the $\beta$ parameter, and Y_i scaled by the root of the weights vector as the response.

The reason why the intercept is omitted is because you have to manually create the "weighted" intercept analogue. As you have said yourself, this is the vector given by the constant term multiplied by the root of the weights vector. To additionally adjust for the intercept would correspond to a different model.

In other words, a weighted linear regression maximizes the likelihood:

$$ \mathcal{L}_{\alpha, \beta, \sigma}(X, Y, w) = \prod_{i=1}^{n} \phi(Y_i - \alpha - \beta X_i)^{w_i}$$

Where $\phi$ is the normal density.

$$\begin{eqnarray} \phi(Y_i - \alpha - \beta X_i)^{w_i} &\propto& \exp \left(-\frac{1}{2} \left( \frac{Y_i - \alpha -\beta X_i}{\sigma}\right)^2\right) ^{w_i} \\ &=& \exp\left(-\frac{w_i}{2}\left(\frac{Y_i - \alpha -\beta X_i}{\sigma} \right)\right) \\ &=& \exp\left(-\frac{1}{2}\left(\frac{\sqrt{w_i}Y_i - \alpha \sqrt{w_i} -\beta \sqrt{w_i}X_i}{\sigma} \right)\right) \\ \end{eqnarray} $$

Which is immediately recognizable as the mean model for an OLS regression omitting the intercept and treating the root of the weight vector as the leading covariate, followed by the X_i scaled by the root of the weight vector as the covariable corresponding to the $\beta$ parameter, and Y_i scaled by the root of the weights vector as the response.

The reason why the intercept is omitted is because you have to manually create the "weighted" intercept analogue. As you have said yourself, this is the vector given by the constant term multiplied by the root of the weights vector. To additionally adjust for the intercept would correspond to a different model.

In other words, a weighted linear regression maximizes the likelihood:

$$ \mathcal{L}_{\alpha, \beta, \sigma}(X, Y, w) = \prod_{i=1}^{n} \phi(Y_i - \alpha - \beta X_i)^{w_i}$$

Where $\phi$ is the normal density.

$$\begin{eqnarray} \phi(Y_i - \alpha - \beta X_i)^{w_i} &\propto& \exp \left(-\frac{1}{2} \left( \frac{Y_i - \alpha -\beta X_i}{\sigma}\right)^2\right) ^{w_i} \\ &=& \exp\left(-\frac{w_i}{2}\left(\frac{Y_i - \alpha -\beta X_i}{\sigma} \right)^2\right) \\ &=& \exp\left(-\frac{1}{2}\left(\frac{\sqrt{w_i}Y_i - \alpha \sqrt{w_i} -\beta \sqrt{w_i}X_i}{\sigma} \right)^2\right) \\ \end{eqnarray} $$

Which is immediately recognizable as the mean model for an OLS regression omitting the intercept and treating the root of the weight vector as the leading covariate, followed by the X_i scaled by the root of the weight vector as the covariable corresponding to the $\beta$ parameter, and Y_i scaled by the root of the weights vector as the response.

added 317 characters in body
Source Link
AdamO
  • 64.8k
  • 6
  • 135
  • 273

Your "multiplication method" for handling weights only works for linear regression. Virtually every software inThe reason why the world should handle weights to linear regression. Ifintercept is omitted is because you wanthave to trick your software into fitting this "weight-multiplied" model for you, you must suppress anmanually create the "weighted" intercept termanalogue. That's because when As you supply ahave said yourself, this is the vector given by the constant term multiplied by the root of the weights as a covariate tovector. To additionally adjust for the regression model, your software isn't smart enoughintercept would correspond to know this should be a "quasi-intercept term": the first column of thedifferent model matrix.

In other words, so the software by default adds a constant term anyway, and this results in a different estimate ofweighted linear regression maximizes the other coefficientslikelihood:

$$ \mathcal{L}_{\alpha, \beta, \sigma}(X, Y, w) = \prod_{i=1}^{n} \phi(Y_i - \alpha - \beta X_i)^{w_i}$$

Where $\phi$ is the normal density.

What$$\begin{eqnarray} \phi(Y_i - \alpha - \beta X_i)^{w_i} &\propto& \exp \left(-\frac{1}{2} \left( \frac{Y_i - \alpha -\beta X_i}{\sigma}\right)^2\right) ^{w_i} \\ &=& \exp\left(-\frac{w_i}{2}\left(\frac{Y_i - \alpha -\beta X_i}{\sigma} \right)\right) \\ &=& \exp\left(-\frac{1}{2}\left(\frac{\sqrt{w_i}Y_i - \alpha \sqrt{w_i} -\beta \sqrt{w_i}X_i}{\sigma} \right)\right) \\ \end{eqnarray} $$

Which is nominally calledimmediately recognizable as the mean model for an OLS regression omitting the intercept term and a coefficient in a model is pretty inconsequential, computationally,treating the intercept is just a variable of "all ones". As a matterroot of conveniencethe weight vector as the leading covariate, most software automatically adds it. You have to go through separate stepsfollowed by the X_i scaled by the root of the weight vector as the covariable corresponding to remove itthe (or equivalently to add something else in it's place)$\beta$ parameter, and Y_i scaled by the root of the weights vector as the response.

Your "multiplication method" for handling weights only works for linear regression. Virtually every software in the world should handle weights to linear regression. If you want to trick your software into fitting this "weight-multiplied" model for you, you must suppress an intercept term. That's because when you supply a vector of weights as a covariate to the regression model, your software isn't smart enough to know this should be a "quasi-intercept term": the first column of the model matrix, so the software by default adds a constant term anyway, and this results in a different estimate of the other coefficients.

What is nominally called an intercept term and a coefficient in a model is pretty inconsequential, computationally, the intercept is just a variable of "all ones". As a matter of convenience, most software automatically adds it. You have to go through separate steps to remove it (or equivalently to add something else in it's place).

The reason why the intercept is omitted is because you have to manually create the "weighted" intercept analogue. As you have said yourself, this is the vector given by the constant term multiplied by the root of the weights vector. To additionally adjust for the intercept would correspond to a different model.

In other words, a weighted linear regression maximizes the likelihood:

$$ \mathcal{L}_{\alpha, \beta, \sigma}(X, Y, w) = \prod_{i=1}^{n} \phi(Y_i - \alpha - \beta X_i)^{w_i}$$

Where $\phi$ is the normal density.

$$\begin{eqnarray} \phi(Y_i - \alpha - \beta X_i)^{w_i} &\propto& \exp \left(-\frac{1}{2} \left( \frac{Y_i - \alpha -\beta X_i}{\sigma}\right)^2\right) ^{w_i} \\ &=& \exp\left(-\frac{w_i}{2}\left(\frac{Y_i - \alpha -\beta X_i}{\sigma} \right)\right) \\ &=& \exp\left(-\frac{1}{2}\left(\frac{\sqrt{w_i}Y_i - \alpha \sqrt{w_i} -\beta \sqrt{w_i}X_i}{\sigma} \right)\right) \\ \end{eqnarray} $$

Which is immediately recognizable as the mean model for an OLS regression omitting the intercept and treating the root of the weight vector as the leading covariate, followed by the X_i scaled by the root of the weight vector as the covariable corresponding to the $\beta$ parameter, and Y_i scaled by the root of the weights vector as the response.

added 58 characters in body
Source Link
AdamO
  • 64.8k
  • 6
  • 135
  • 273

Your "multiplication method" for handling weights only works for linear regression. Virtually every software in the world should handle weights to linear regression. If you want to trick your software into fitting this "weight-multiplied" model for you, you must suppress an intercept term. That's because when you supply a vector of weights as a covariate to the regression model, your software isn't smart enough to know this should be a "quasi-intercept term": the first column of the regressormodel matrix, so you addthe software by default adds a constant term anyway, and this results in a different estimate of the other coefficients.

What is nominally called an intercept term and a coefficient in a model is pretty inconsequential, computationally, the intercept is just a variable of "all ones". As a matter of convenience, most software automatically adds it. You have to go through separate steps to remove it (or equivalently to add something else in it's place).

Your "multiplication method" for handling weights only works for linear regression. Virtually every software in the world should handle weights to linear regression. If you want to trick your software into fitting this "weight-multiplied" model for you, you must suppress an intercept term. That's because when you supply a vector of weights to the regression model, your software isn't smart enough to know this should be the first column of the regressor matrix, so you add a constant term anyway, and this results in a different estimate of the other coefficients.

What is nominally called an intercept term and a coefficient in a model is pretty inconsequential, computationally, the intercept is just a variable of "all ones". As a matter of convenience, most software automatically adds it. You have to go through separate steps to remove it (or equivalently to add something else in it's place).

Your "multiplication method" for handling weights only works for linear regression. Virtually every software in the world should handle weights to linear regression. If you want to trick your software into fitting this "weight-multiplied" model for you, you must suppress an intercept term. That's because when you supply a vector of weights as a covariate to the regression model, your software isn't smart enough to know this should be a "quasi-intercept term": the first column of the model matrix, so the software by default adds a constant term anyway, and this results in a different estimate of the other coefficients.

What is nominally called an intercept term and a coefficient in a model is pretty inconsequential, computationally, the intercept is just a variable of "all ones". As a matter of convenience, most software automatically adds it. You have to go through separate steps to remove it (or equivalently to add something else in it's place).

Post Undeleted by AdamO
deleted 1529 characters in body
Source Link
AdamO
  • 64.8k
  • 6
  • 135
  • 273
Loading
Post Deleted by AdamO
Source Link
AdamO
  • 64.8k
  • 6
  • 135
  • 273
Loading