Utility functions
rmse
computes the root mean squared error (RMSE) of two numeric vectors/matrices
freq
computes the frequency counts of a numeric or character vector
cronbach_alpha
computes the Cronbach's alpha internal consistency reliability index
spearman_brown
predicts the reliability when the current test is extended to n times longer
spearman_brown_reverse
computes how many times the current test length needs to be extended in order to reach targeted reliability
quadratic kappa
computes the quadratic weighted kappa of two numeric vectors
rmse(x1, x2) freq(x, vals = NULL, decimal = NULL) cronbach_alpha(u) spearman_brown(rho, n_len) spearman_brown_reverse(rho, target_rho) quadratic_kappa(x1, x2)
x1
: a numeric vector or matrixx2
: a numeric vector or matrixx
: a numeric or character vectorvals
: valid values, NULL
to include all valuesdecimal
: round results to n-th decimal placesu
: oberved responses, 2d matrixrho
: the reliability of the current testn_len
: extend the test to n times longertarget_rho
: the targeted reliabilityfreq
returns the frequency counts and percentages in a data.frame
rmse(rnorm(10), rnorm(10)) freq(round(runif(100, 1, 5))) cronbach_alpha(model_3pl_gendata(1000, 20)$u) spearman_brown(.70, 2) spearman_brown_reverse(.70, .85) quadratic_kappa(round(runif(100, 1, 5)), round(runif(100, 1, 5)))