Skip to contents

Confidence intervals for multiple correlation coefficients (R-squared and adjusted R-squared) are generated using the RSqMC() function from the betaMC package. In this example, we use the data set and the model used in betaMC: Example Using the BetaMC Function.

df <- betaMC::nas1982

Regression

Fit the regression model using the lm() function.

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

Monte Carlo Sampling Distribution of Parameters

Normal-Theory Approach

mvn <- MC(object, type = "mvn")

Asymptotic distribution-free Approach

adf <- MC(object, type = "adf")

Heteroskedasticity Consistent Approach (HC3)

hc3 <- MC(object, type = "hc3")

Multiple Correlation Coefficients

Normal-Theory Approach

mvn <- RSqMC(mvn)

Asymptotic distribution-free Approach

adf <- RSqMC(adf)

Heteroskedasticity Consistent Approach (HC3)

hc3 <- RSqMC(hc3)

Methods

summary

Summary of the results of RSqMC().

summary(mvn)
#> Call:
#> RSqMC(object = mvn)
#> 
#> R-squared and adjusted R-squared
#> type = "mvn"
#>        est     se     R  0.05%   0.5%   2.5%  97.5%  99.5% 99.95%
#> rsq 0.8045 0.0563 20000 0.5022 0.6078 0.6606 0.8813 0.9019 0.9298
#> adj 0.7906 0.0603 20000 0.4666 0.5798 0.6363 0.8729 0.8948 0.9248
summary(adf)
#> Call:
#> RSqMC(object = adf)
#> 
#> R-squared and adjusted R-squared
#> type = "adf"
#>        est     se     R  0.05%   0.5%   2.5%  97.5%  99.5% 99.95%
#> rsq 0.8045 0.0548 20000 0.5259 0.6117 0.6675 0.8811 0.9033 0.9292
#> adj 0.7906 0.0587 20000 0.4920 0.5840 0.6437 0.8726 0.8964 0.9241
summary(hc3)
#> Call:
#> RSqMC(object = hc3)
#> 
#> R-squared and adjusted R-squared
#> type = "hc3"
#>        est     se     R  0.05%   0.5%   2.5%  97.5%  99.5% 99.95%
#> rsq 0.8045 0.0620 20000 0.4704 0.5855 0.6466 0.8883 0.9114 0.9342
#> adj 0.7906 0.0664 20000 0.4326 0.5559 0.6214 0.8803 0.9051 0.9295

coef

Return the vector of estimates.

coef(mvn)
#>       rsq       adj 
#> 0.8045263 0.7905638
coef(adf)
#>       rsq       adj 
#> 0.8045263 0.7905638
coef(hc3)
#>       rsq       adj 
#> 0.8045263 0.7905638

vcov

Return the sampling covariance matrix.

vcov(mvn)
#>             rsq         adj
#> rsq 0.003168494 0.003394815
#> adj 0.003394815 0.003637302
vcov(adf)
#>             rsq         adj
#> rsq 0.003003755 0.003218309
#> adj 0.003218309 0.003448188
vcov(hc3)
#>             rsq         adj
#> rsq 0.003846346 0.004121085
#> adj 0.004121085 0.004415449

confint

Return confidence intervals.

confint(mvn, level = 0.95)
#>         2.5 %    97.5 %
#> rsq 0.6605772 0.8813467
#> adj 0.6363327 0.8728715
confint(adf, level = 0.95)
#>         2.5 %    97.5 %
#> rsq 0.6674670 0.8811274
#> adj 0.6437147 0.8726365
confint(hc3, level = 0.95)
#>         2.5 %    97.5 %
#> rsq 0.6466252 0.8882599
#> adj 0.6213841 0.8802784

References

Dudgeon, P. (2017). Some improvements in confidence intervals for standardized regression coefficients. Psychometrika, 82(4), 928–951. https://doi.org/10.1007/s11336-017-9563-z
Pesigan, I. J. A., & Cheung, S. F. (2023). Monte Carlo confidence intervals for the indirect effect with missing data. Behavior Research Methods. https://doi.org/10.3758/s13428-023-02114-4