Estimate Semipartial Correlation Coefficients and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
Source:R/betaNB-s-cor-nb.R
SCorNB.RdEstimate Semipartial Correlation Coefficients and Generate the Corresponding Sampling Distribution Using Nonparametric Bootstrapping
Usage
SCorNB(object, alpha = c(0.05, 0.01, 0.001))Arguments
- object
Object of class
nb, that is, the output of theNB()function.- alpha
Numeric vector. Significance level \(\alpha\).
Value
Returns an object
of class betanb which is a list with the following elements:
- call
Function call.
- args
Function arguments.
- thetahatstar
Sampling distribution of \(sr_{j}\).
- vcov
Sampling variance-covariance matrix of \(sr_{j}\).
- est
Vector of estimated \(sr_{j}\).
- fun
Function used ("SCorNB").
Details
The vector of semipartial correlation coefficients (\(sr_{j}\)) is estimated from bootstrap samples. Confidence intervals are generated by obtaining percentiles corresponding to \(100(1 - \alpha)\%\) from the generated sampling distribution of \(sr_{j}\), where \(\alpha\) is the significance level.
Let \(\boldsymbol{\beta}^{\ast}\) be the vector of standardized slopes,
\(\boldsymbol{R}_{x}\) the correlation matrix of the regressors,
\(r^{jj}\) the \(j\)th diagonal element of \(\boldsymbol{R}_{x}^{-1}\),
and \(R^{2} = \boldsymbol{\beta}^{\ast\prime} \boldsymbol{R}_{x}
\boldsymbol{\beta}^{\ast}\).
The semipartial correlation of regressor \(j\) is
$$sr_{j} = \beta^{\ast}_{j} / \sqrt{r^{jj}} = \beta^{\ast}_{j} \sqrt{1 -
R^{2}_{j \cdot -j}},$$
where \(R^{2}_{j \cdot -j}\) is the R-squared from regressing regressor
\(j\)
on the other regressors.
Its square, \(sr^{2}_{j}\), is the change in \(R^{2}\) when regressor
\(j\) is added last.
Because \(1 / r^{jj} = 1 - R^{2}_{j \cdot -j}\), \(sr_{j}\) shrinks
toward zero
as regressor \(j\) becomes more redundant with the other regressors.
The sign of \(sr_{j}\) follows the sign of \(\beta^{\ast}_{j}\).
Each effect size is computed from every bootstrap sample
(see NB()), and the confidence intervals are percentile-based.
See also
Other Beta Nonparametric Bootstrap Functions:
BetaNB(),
DeltaRSqNB(),
DiffBetaNB(),
FSqNB(),
NB(),
PCorNB(),
RSqNB()
Examples
# Data ---------------------------------------------------------------------
data("nas1982", package = "betaNB")
# Fit Model in lm ----------------------------------------------------------
object <- stats::lm(
formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP,
data = nas1982
)
# NB -----------------------------------------------------------------------
nb <- NB(
object = object,
R = 100, # use a large value e.g., 5000L for actual research
seed = 0508
)
# SCorNB -------------------------------------------------------------------
out <- SCorNB(object = nb, alpha = 0.05)
## Methods -----------------------------------------------------------------
print(x = out)
#> Call:
#> SCorNB(object = nb, alpha = 0.05)
#>
#> Semipartial correlations
#> type = "pc"
#> est se R 2.5% 97.5%
#> NARTIC 0.4312 0.0661 100 0.2822 0.5423
#> PCTGRT 0.3430 0.0770 100 0.1933 0.4708
#> PCTSUPP 0.2385 0.0707 100 0.0940 0.3734
summary(object = out)
#> Call:
#> SCorNB(object = nb, alpha = 0.05)
#>
#> Semipartial correlations
#> type = "pc"
#> est se R 2.5% 97.5%
#> NARTIC 0.4312 0.0661 100 0.2822 0.5423
#> PCTGRT 0.3430 0.0770 100 0.1933 0.4708
#> PCTSUPP 0.2385 0.0707 100 0.0940 0.3734
coef(object = out)
#> NARTIC PCTGRT PCTSUPP
#> 0.4311525 0.3430075 0.2384789
vcov(object = out)
#> NARTIC PCTGRT PCTSUPP
#> NARTIC 0.0043636010 0.0004196016 -0.0011696805
#> PCTGRT 0.0004196016 0.0059260665 -0.0008003066
#> PCTSUPP -0.0011696805 -0.0008003066 0.0049980295
confint(object = out, level = 0.95)
#> 2.5 % 97.5 %
#> NARTIC 0.28216333 0.5422580
#> PCTGRT 0.19327956 0.4707667
#> PCTSUPP 0.09401164 0.3734456