R/betahatinference.R
slopeshatprimeinference.Rd
Standardized Regression Slopes Hypothesis Test and Confidence Intervals
slopeshatprimeinference(X, y, sehatslopeshatprimetype = "textbook")
X |
|
---|---|
y | Numeric vector of length |
sehatslopeshatprimetype | Character string.
Standard errors for standardized regression slopes hypothesis test.
Options are |
Other inference functions:
.betahatinference()
,
.slopeshatprimeinference()
,
betahatinference()
Ivan Jacob Agaloos Pesigan
# 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