sdregi: SD ratio of equalities or greater inequalities

sdregiR Documentation

SD ratio of equalities or greater inequalities

Description

Returns the ratio of the SDs of x and y, using the largest SD of the two as denominator. Hence, the result is always 1 (ratio of equalities) or greater than 1 (ratio of greater inequalities). If x or y have less than two elements, NA is returned.

Usage

sdregi(x, y)

Arguments

x

(vector) a numeric vector

y

(vector) a numeric vector with compatible dimensions to x

Value

(numeric) SD ratio

See Also

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

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 SD ratio of left and right variables
sdregi(vars[,1], vars[,2])
# Calculate SD ratio of right and left variables; should give same result
sdregi(vars[,1], vars[,2])

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