Defines functions Expected.R2

Documented in Expected.R2

Expected.R2 <- function(Population.R2, N, p)
if(!requireNamespace("gsl", quietly = TRUE)) stop("The package 'gsl' is needed; please install the package and try again.")  
Value <- 1 - ((N-p-1)/(N-1))*(1-Population.R2)*gsl::hyperg_2F1(1, 1, .5*(N+1), Population.R2)
Value <- max(0, Value)
Value <- min(Value, 1)

Try the MBESS package in your browser

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

MBESS documentation built on Oct. 26, 2023, 9:07 a.m.