spearman_brown: Calculate Spearman-brown coefficient

spearman_brownR Documentation

Calculate Spearman-brown coefficient

Description

Spearman-Brown reliability coefficient for doubling test length. Formula obtained from Warrens (2015) <\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11634-015-0198-6")}>

Usage

spearman_brown(x, y, fn_cor = cor, ...)

Arguments

x

(vector) a numeric vector

y

(vector) a numeric vector with compatible dimensions to x

fn_cor

(function) a function returning a correlation coefficient

...

Arguments passed to fn_cor

Value

(numeric) Spearman-Brown coefficient

See Also

Other splithalfr coefficients: angoff_feldt(), assmd(), flanagan_rulon(), sdregi(), short_icc()

Examples

# Generate two variables with different means, variances and a correlation of about 0.5
library(MASS)
vars = mvrnorm(30, mu = c(0, 2), Sigma = matrix(c(5, 2, 2, 3), ncol = 2), empirical = TRUE)
# Calculate coefficient based on Pearson correlation
spearman_brown(vars[,1], vars[,2])
# Calculate coefficient based on ICC, two-way, random effects, absolute agreement, single rater
spearman_brown(vars[,1], vars[,2], short_icc, type = "ICC1", lmer = FALSE)

splithalfr documentation built on Sept. 15, 2023, 1:08 a.m.