Standardized Regression Slopes Hypothesis Test and Confidence Intervals

slopeshatprimeinference(X, y, sehatslopeshatprimetype = "textbook")

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.

sehatslopeshatprimetype

Character string. Standard errors for standardized regression slopes hypothesis test. Options are sehatslopeshatprimetype = "textbook" and sehatslopeshatprimetype = "delta".

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"]] slopeshatprimeinference(X = X, y = y)
#> coef se t p ci_0.05 ci_0.5 ci_2.5 #> [1,] 0.2874694 0.02669814 10.76739 6.019852e-26 0.1994162 0.2185974 0.2350927 #> ci_97.5 ci_99.5 ci_99.95 #> [1,] 0.339846 0.3563414 0.3755226
# Multiple regression---------------------------------------------- X <- jeksterslabRdatarepo::wages.matrix[["X"]] # age is removed X <- X[, -ncol(X)] slopeshatprimeinference(X = X, y = y)
#> coef se t p ci_0.05 ci_0.5 #> [1,] -0.19477502 0.02309626 -8.433184 8.939416e-17 -0.27094940 -0.254355676 #> [2,] -0.07135673 0.02321194 -3.074139 2.155664e-03 -0.14791263 -0.131235792 #> [3,] 0.05077872 0.02344760 2.165626 3.052356e-02 -0.02655441 -0.009708265 #> [4,] 0.48829962 0.02348462 20.792312 5.507605e-83 0.41084437 0.427717121 #> [5,] 0.24607631 0.02370209 10.382050 2.659960e-24 0.16790381 0.184932806 #> ci_2.5 ci_97.5 ci_99.5 ci_99.95 #> [1,] -0.24008560 -0.14946443 -0.13519436 -0.118600632 #> [2,] -0.11689425 -0.02581921 -0.01147766 0.005199175 #> [3,] 0.00477888 0.09677855 0.11126570 0.128111846 #> [4,] 0.44222714 0.53437211 0.54888213 0.565754879 #> [5,] 0.19957719 0.29257542 0.30721981 0.324248802