Skip to contents

Estimate 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 the NB() 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 \(r_{s}\).

vcov

Sampling variance-covariance matrix of \(r_{s}\).

est

Vector of estimated \(r_{s}\).

fun

Function used ("SCorNB").

Details

The vector of semipartial correlation coefficients (\(r_{s}\)) is estimated from bootstrap samples. Confidence intervals are generated by obtaining percentiles corresponding to \(100(1 - \alpha)\%\) from the generated sampling distribution of \(r_{s}\), where \(\alpha\) is the significance level.

See also

Other Beta Nonparametric Bootstrap Functions: BetaNB(), DeltaRSqNB(), DiffBetaNB(), NB(), PCorNB(), RSqNB()

Author

Ivan Jacob Agaloos Pesigan

Examples

# Data ---------------------------------------------------------------------
data("nas1982", package = "betaNB")

# Fit Model in lm ----------------------------------------------------------
object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)

# NB -----------------------------------------------------------------------
nb <- NB(
  object,
  R = 100, # use a large value e.g., 5000L for actual research
  seed = 0508
)

# SCorNB -------------------------------------------------------------------
out <- SCorNB(nb, alpha = 0.05)

## Methods -----------------------------------------------------------------
print(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(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(out)
#>    NARTIC    PCTGRT   PCTSUPP 
#> 0.4311525 0.3430075 0.2384789 
vcov(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(out, level = 0.95)
#>              2.5 %    97.5 %
#> NARTIC  0.28216333 0.5422580
#> PCTGRT  0.19327956 0.4707667
#> PCTSUPP 0.09401164 0.3734456