Estimates of Regression Standardized Slopes \(\boldsymbol{\hat{\beta}}_{2, \cdots, k}^{\prime}\)

slopeshatprime(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 estimated standardized slopes \(\boldsymbol{\hat{\beta}}_{2, \cdots, k}^{\prime}\) of a linear regression model derived from the estimated correlation matrix.

Details

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\)

See also

Author

Ivan Jacob Agaloos Pesigan

Examples

# 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