tests/testthat/test_deltaR2_ci.R

library(apaTables)
context("Delta R2 CI")
test_that("Test example Alf & Graf (1999) p. 73", {
     expect_equal(round(get_deltaR2_ci(R2_2=.45^2,R2_1=.433^2,n=1415,conf_level=.95)$LL,4),.0037)
     expect_equal(round(get_deltaR2_ci(R2_2=.45^2,R2_1=.433^2,n=1415,conf_level=.95)$UL,4),.0263)
     expect_equal(round(get_deltaR2_ci(R2_2=.45^2,R2_1=.433^2,n=1415,conf_level=.90)$LL,4),.0055)
     expect_equal(round(get_deltaR2_ci(R2_2=.45^2,R2_1=.433^2,n=1415,conf_level=.90)$UL,4),.0245)

})

Try the apaTables package in your browser

Any scripts or data that you put into this service are public.

apaTables documentation built on Jan. 13, 2021, 11:22 p.m.