Confidence Interval for a Regression Coefficient, Raw or Standardized
Source:R/ci_reg_coef.R
ci_reg_coef.RdThe general engine behind ci_rc (unstandardized) and
ci_src (standardized): computes a confidence interval
for a population regression coefficient by the standard
t-based approach or the noncentral t approach, in
whichever metric the inputs are supplied.
Usage
ci_reg_coef(
b_j,
SE_b_j = NULL,
s_Y = NULL,
s_X = NULL,
N,
p,
R2_Y_X = NULL,
R2_j_X_without_j = NULL,
conf_level = 0.95,
R2_Y_X_without_j = NULL,
t_value = NULL,
alpha_lower = NULL,
alpha_upper = NULL,
noncentral = FALSE,
...
)Arguments
- b_j
Value of the regression coefficient for the jth predictor variable
- SE_b_j
Standard error for the jth predictor variable
- s_Y
Standard deviation of Y, the dependent variable
- s_X
Standard deviation of \(X_j\), the predictor variable of interest
- N
Sample size
- p
The number of predictors
- R2_Y_X
The squared multiple correlation coefficient predicting
Yfrom theppredictor variables- R2_j_X_without_j
The squared multiple correlation coefficient predicting the
jth predictor variable (i.e., the predictor of interest) from the remainingp-1 predictor variables- conf_level
Desired level of confidence for the computed interval (i.e., 1 - the Type I error rate)
- R2_Y_X_without_j
The squared multiple correlation coefficient predicting
Yfrom thep-1 predictor variable with thejth predictor of interest excluded- t_value
The t-value evaluating the null hypothesis that the population regression coefficient for the
jth predictor equals zero- alpha_lower
The Type I error rate for the lower confidence interval limit
- alpha_upper
The Type I error rate for the upper confidence interval limit
- noncentral
TRUEorFALSE, specifying whether or not the noncentral approach to confidence intervals should be used- ...
Optional additional specifications for nested functions
Value
A 3-row data.frame with columns term, value,
prob_less, and prob_greater. The rows are ordered
"lower_limit", "reg_coef" (the regression coefficient point
estimate), and "upper_limit", so the point estimate sits between
its confidence limits. The lower and upper rows give the confidence limits
on the regression coefficient. The prob_less and prob_greater
columns report the achieved tail probabilities at each limit when the
noncentral t method is used (they are NA for the "reg_coef"
estimate row).
Details
For standardized variables, do not specify the standard deviation of the variables and input the standardized
regression coefficient for b_j.
When b_j is reconstructed from squared multiple correlations (that is,
from R2_Y_X, R2_Y_X_without_j, and R2_j_X_without_j
rather than a supplied b_j, SE_b_j, or t_value), only the
magnitude of the coefficient is identifiable; its sign is not. The positive
root is returned and a warning is issued. If the coefficient is negative,
negate the point estimate and swap and negate the confidence limits, or
supply b_j directly.
Note
Not all of the values need to be specified, only those that contain all of the necessary information in order to compute the confidence interval (options are thus given for the values that need to be specified).
The function ci_rc in DMAR also calculates the confidence interval
for the population (unstandardized) regression coefficient. The
function ci_src also calculates the confidence interval
for the population (standardized) regression coefficient. These two
functions perform the same tasks as ci_reg_coef does and
are preferred to it because of simpler arguments.
References
Kelley, K. (2007). Confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20(8), 1–24. doi:10.18637/jss.v020.i08
Kelley, K., & Maxwell, S. E. (2003). Sample size for multiple regression: Obtaining regression coefficients that are accurate, not simply significant. Psychological Methods, 8(3), 305–321. doi:10.1037/1082-989X.8.3.305
Kelley, K., & Maxwell, S. E. (2008). Sample size planning with applications to multiple regression: Power and accuracy for omnibus and targeted effects. In P. Alasuutari, L. Bickman, & J. Brannen (Eds.), The Sage handbook of social research methods (pp. 166–192). Sage.
Maxwell, S. E., Delaney, H. D., & Kelley, K. (2027). Designing experiments and analyzing data: A model comparison perspective (4th ed.). Routledge. (See Chapter 4 on individual comparisons of means and Chapter 6 on trend analysis.)
Smithson, M. (2003). Confidence intervals. Thousand Oaks, CA: Sage Publications.
See also
ss_aipe_reg_coef, conf_limits_nct, ci_rc, ci_src
Other confidence intervals for effect sizes:
ci_R2(),
ci_c(),
ci_c_ancova(),
ci_c_ancova_bp(),
ci_correlation,
ci_cv(),
ci_eta_squared(),
ci_eta_squared_generalized(),
ci_eta_squared_partial(),
ci_mahalanobis(),
ci_omega_squared(),
ci_pvaf(),
ci_rc(),
ci_rmsea(),
ci_sc(),
ci_sc_ancova(),
ci_sm(),
ci_smd(),
ci_smd_c(),
ci_snr(),
ci_src(),
ci_srsnr(),
contrast_adjusted(),
plot_smd()
Author
Ken Kelley kkelley@nd.edu