Skip to contents

Confidence intervals for squared partial correlation coefficients are generated using the PCorNB() function from the betaNB package. In this example, we use the data set and the model used in betaNB: Example Using the BetaNB Function.

df <- betaNB::nas1982

Regression

Fit the regression model using the lm() function.

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = df)

Nonparametric Bootstrap

nb <- NB(object)

Squared Partial Correlation Coefficients

Normal-Theory Approach

out <- PCorNB(nb, alpha = 0.05)

Methods

summary

Summary of the results of PCorNB().

Percentile Confidence Intervals

summary(out, type = "pc")
#> Call:
#> PCorNB(object = nb, alpha = 0.05)
#> 
#> Squared partial correlations
#> type = "pc"
#>            est     se    R   2.5%  97.5%
#> NARTIC  0.4874 0.0998 5000 0.2743 0.6651
#> PCTGRT  0.3757 0.1078 5000 0.1566 0.5791
#> PCTSUPP 0.2254 0.1173 5000 0.0401 0.4839

Bias Corrected Confidence Intervals

summary(out, type = "bc")
#> Call:
#> PCorNB(object = nb, alpha = 0.05)
#> 
#> Squared partial correlations
#> type = "bc"
#>            est     se    R   2.5%  97.5%
#> NARTIC  0.4874 0.0998 5000 0.2580 0.6544
#> PCTGRT  0.3757 0.1078 5000 0.1534 0.5733
#> PCTSUPP 0.2254 0.1173 5000 0.0399 0.4835

Bias Corrected and Accelerated Confidence Intervals

summary(out, type = "bca")
#> Call:
#> PCorNB(object = nb, alpha = 0.05)
#> 
#> Squared partial correlations
#> type = "bca"
#>            est     se    R   2.5%  97.5%
#> NARTIC  0.4874 0.0998 5000 0.2586 0.6548
#> PCTGRT  0.3757 0.1078 5000 0.1609 0.5828
#> PCTSUPP 0.2254 0.1173 5000 0.0273 0.4561

coef

Return the vector of estimates.

coef(out)
#>    NARTIC    PCTGRT   PCTSUPP 
#> 0.4874382 0.3757383 0.2253739

vcov

Return the sampling covariance matrix.

vcov(out)
#>              NARTIC       PCTGRT      PCTSUPP
#> NARTIC  0.009967522 0.0017329208 0.0022688815
#> PCTGRT  0.001732921 0.0116276386 0.0009186367
#> PCTSUPP 0.002268881 0.0009186367 0.0137552045

confint

Return confidence intervals.

Percentile Confidence Intervals

confint(out, level = 0.95, type = "pc")
#>              2.5 %    97.5 %
#> NARTIC  0.27433981 0.6651419
#> PCTGRT  0.15655129 0.5791038
#> PCTSUPP 0.04014661 0.4839115

Bias Corrected Confidence Intervals

confint(out, level = 0.95, type = "bc")
#>              2.5 %    97.5 %
#> NARTIC  0.25801687 0.6544457
#> PCTGRT  0.15335989 0.5733191
#> PCTSUPP 0.03987733 0.4834947

Bias Corrected and Accelerated Confidence Intervals

confint(out, level = 0.95, type = "bca")
#>              2.5 %    97.5 %
#> NARTIC  0.25860165 0.6548238
#> PCTGRT  0.16090487 0.5828070
#> PCTSUPP 0.02727368 0.4561433

References