Derives the intercept \(\beta_1\) of a linear regression model from the \(p \times 1\) regression slopes \(\left( \boldsymbol{\beta}_{2, \cdots, k} \right)\), the mean of the regressand \(\left( \mu_y \right)\), and the \(p \times 1\) means of regressors \({X}_{2}, {X}_{3}, \dots, {X}_{k}\) \(\left( \boldsymbol{\mu}_{\mathbf{X}} \right)\) .

intercept(X, y)

Arguments

X

n by k numeric matrix. The data matrix \(\mathbf{X}\) (also known as design matrix, model matrix or regressor matrix) is an \(n \times k\) matrix of \(n\) observations of \(k\) regressors, which includes a regressor whose value is 1 for each observation on the first column.

y

Numeric vector of length n or n by 1 matrix. The vector \(\mathbf{y}\) is an \(n \times 1\) vector of observations on the regressand variable.

Value

Returns the intercept \(\beta_1\) of a linear regression model derived from the means and the slopes \(\left( \boldsymbol{\beta}_{2, \cdots, k} \right)\) .

Details

The intercept \(\beta_1\) is given by $$ \beta_1 = \mu_y - \boldsymbol{\mu}_{\mathbf{X}} \boldsymbol{\beta}_{2, \cdots, k}^{T} . $$

See also

Other parameter functions: .intercept(), .slopesprime(), .slopes(), sigma2epsilon(), slopesprime(), slopes()

Author

Ivan Jacob Agaloos Pesigan