Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/betahat_matrix.R
Estimated Regression Intercept \hat{β}_{1}
1  | intercepthat(X, y)
 | 
X | 
 
  | 
y | 
 Numeric vector of length   | 
The intercept β_1 is given by
\hat{β}_1 = \hat{μ}_y - \boldsymbol{\hat{μ}}_{\mathbf{X}} \boldsymbol{\hat{β}}_{2, \cdots, k}^{T} .
Returns the estimated intercept \hat{β}_1 of a linear regression model derived from the estimated means and the slopes ≤ft( \boldsymbol{\hat{β}}_{2, \cdots, k} \right) .
Ivan Jacob Agaloos Pesigan
Other beta-hat functions: 
.betahatnorm(),
.betahatqr(),
.betahatsvd(),
.intercepthat(),
.slopeshatprime(),
.slopeshat(),
betahat(),
slopeshatprime(),
slopeshat()
1 2 3 4 5 6 7 8 9 10 11  | # Simple regression------------------------------------------------
X <- jeksterslabRdatarepo::wages.matrix[["X"]]
X <- X[, c(1, ncol(X))]
y <- jeksterslabRdatarepo::wages.matrix[["y"]]
intercepthat(X = X, y = y)
# Multiple regression----------------------------------------------
X <- jeksterslabRdatarepo::wages.matrix[["X"]]
# age is removed
X <- X[, -ncol(X)]
intercepthat(X = X, y = y)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.