Skip to contents

Confidence intervals for multiple correlation coefficients are generated using the RSqNB() 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)

Multiple Correlation Coefficients

Normal-Theory Approach

out <- RSqNB(nb, alpha = 0.05)

Methods

summary

Summary of the results of RSqNB().

Percentile Confidence Intervals

summary(out, type = "pc")
#> Call:
#> RSqNB(object = nb, alpha = 0.05)
#> 
#> R-squared and adjusted R-squared
#> type = "pc"
#>        est     se    R   2.5%  97.5%
#> rsq 0.8045 0.0529 5000 0.6941 0.8989
#> adj 0.7906 0.0567 5000 0.6722 0.8917

Bias Corrected Confidence Intervals

summary(out, type = "bc")
#> Call:
#> RSqNB(object = nb, alpha = 0.05)
#> 
#> R-squared and adjusted R-squared
#> type = "bc"
#>        est     se    R   2.5%  97.5%
#> rsq 0.8045 0.0529 5000 0.6459 0.8805
#> adj 0.7906 0.0567 5000 0.6206 0.8719

Bias Corrected and Accelerated Confidence Intervals

summary(out, type = "bca")
#> Call:
#> RSqNB(object = nb, alpha = 0.05)
#> 
#> R-squared and adjusted R-squared
#> type = "bca"
#>        est     se    R   2.5%  97.5%
#> rsq 0.8045 0.0529 5000 0.6402 0.8790
#> adj 0.7906 0.0567 5000 0.6145 0.8704

coef

Return the vector of estimates.

coef(out)
#>       rsq       adj 
#> 0.8045263 0.7905638

vcov

Return the sampling covariance matrix.

vcov(out)
#>             rsq         adj
#> rsq 0.002795797 0.002995497
#> adj 0.002995497 0.003209461

confint

Return confidence intervals.

Percentile Confidence Intervals

confint(out, level = 0.95, type = "pc")
#>         2.5 %    97.5 %
#> rsq 0.6940991 0.8989497
#> adj 0.6722490 0.8917318

Bias Corrected Confidence Intervals

confint(out, level = 0.95, type = "bc")
#>         2.5 %    97.5 %
#> rsq 0.6459249 0.8804642
#> adj 0.6206338 0.8719260

Bias Corrected and Accelerated Confidence Intervals

confint(out, level = 0.95, type = "bca")
#>         2.5 %    97.5 %
#> rsq 0.6401815 0.8790311
#> adj 0.6144802 0.8703905

References