R/betahat_matrix.R
slopeshatprime.Rd
Estimates of Regression Standardized Slopes \(\boldsymbol{\hat{\beta}}_{2, \cdots, k}^{\prime}\)
slopeshatprime(X, y)
X |
|
---|---|
y | Numeric vector of length |
Returns the estimated standardized slopes \(\boldsymbol{\hat{\beta}}_{2, \cdots, k}^{\prime}\) of a linear regression model derived from the estimated correlation matrix.
Estimates of the linear regression standardized slopes are calculated using $$ \boldsymbol{\hat{\beta}}_{2, \cdots, k}^{\prime} = \mathbf{\hat{R}}_{\mathbf{X}}^{T} \mathbf{\hat{r}}_{\mathbf{y}, \mathbf{X}} $$
where
\(\mathbf{\hat{R}}_{\mathbf{X}}\) is the \(p \times p\) estimated correlation matrix of the regressor variables \(X_2, X_3, \cdots, X_k\) and
\(\mathbf{\hat{r}}_{\mathbf{y}, \mathbf{X}}\) is the \(p \times 1\) column vector of the estimated correlations between the regressand \(y\) variable and regressor variables \(X_2, X_3, \cdots, X_k\)
Other beta-hat functions:
.betahatnorm()
,
.betahatqr()
,
.betahatsvd()
,
.intercepthat()
,
.slopeshatprime()
,
.slopeshat()
,
betahat()
,
intercepthat()
,
slopeshat()
Ivan Jacob Agaloos Pesigan
# Simple regression------------------------------------------------ X <- jeksterslabRdatarepo::wages.matrix[["X"]] X <- X[, c(1, ncol(X))] y <- jeksterslabRdatarepo::wages.matrix[["y"]] slopeshatprime(X = X, y = y)#> std.slopes #> age 0.2874694# Multiple regression---------------------------------------------- X <- jeksterslabRdatarepo::wages.matrix[["X"]] # age is removed X <- X[, -ncol(X)] slopeshatprime(X = X, y = y)#> std.slopes #> gender -0.19477502 #> race -0.07135673 #> union 0.05077872 #> education 0.48829962 #> experience 0.24607631