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.0524 5000 0.6946 0.8982
#> adj 0.7906 0.0562 5000 0.6728 0.8910

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.0524 5000 0.6303 0.8778
#> adj 0.7906 0.0562 5000 0.6038 0.8691

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.0524 5000 0.6182 0.8764
#> adj 0.7906 0.0562 5000 0.5909 0.8676

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.002748618 0.002944948
#> adj 0.002944948 0.003155301

confint

Return confidence intervals.

Percentile Confidence Intervals

confint(out, level = 0.95, type = "pc")
#>         2.5 %    97.5 %
#> rsq 0.6946256 0.8982323
#> adj 0.6728131 0.8909631

Bias Corrected Confidence Intervals

confint(out, level = 0.95, type = "bc")
#>         2.5 %    97.5 %
#> rsq 0.6302568 0.8777898
#> adj 0.6038466 0.8690605

Bias Corrected and Accelerated Confidence Intervals

confint(out, level = 0.95, type = "bca")
#>         2.5 %    97.5 %
#> rsq 0.6181667 0.8763956
#> adj 0.5908928 0.8675667

References