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(slopes = NULL, muy = NULL, muX = NULL, X, y)

Arguments

slopes

Numeric vector of length p or p by 1 matrix. \(p \times 1\) column vector of regression slopes \(\left( \boldsymbol{\beta}_{2, 3, \cdots, k} = \left\{ \beta_2, \beta_3, \cdots, \beta_k \right\} \right)\) .

muy

Numeric. Mean of the regressand variable \(\left( \mu_{\mathbf{y}} \right)\) .

muX

Numeric vector of length p or p by 1 matrix. \(p \times 1\) column vector of means of the regressors \({X}_{2}, {X}_{3}, \cdots, {X}_{k}\) \(\left( \boldsymbol{\mu}_{\mathbf{X}} \right)\) .

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: .slopesprime(), .slopes(), intercept(), sigma2epsilon(), slopesprime(), slopes()

Author

Ivan Jacob Agaloos Pesigan