split_coefs {splithalfr} | R Documentation |
Calculate a bivariate coefficient for each split-half replication
Description
Calculates a bivariate coefficient across participants for each split-half
replication and returns their values calculated across
replications. ds
should be a data frame as returned by
by_split
: For each unique value of the column split
in
ds
, it selects the corresponding rows in ds
, and passes the
values in the columns score_1
and score_2
as the first and
second argument to fn_coef
. Any row in ds
for which
score_1
or score_2
is NA is pairwise removed before passing the
data to fn_coef
. For averaging internal consistency coefficients,
see Feldt and Charter (2006).
Usage
split_coefs(ds, fn_coef, ...)
Arguments
ds |
(data frame) a data frame with columns |
fn_coef |
(function) a function that calculates a bivariate coefficient. |
... |
Additional arguments passed to |
Value
Coefficients per split calculated via fn_coef
.
References
Feldt, L. S., & Charter, R. A. (2006). Averaging internal consistency reliability coefficients. Educational and Psychological Measurement, 66(2), 215-227. doi:10.1177/0013164404273947
See Also
Other split aggregation functions:
split_ci()
Examples
# Generate five splits with scores that are correlated 0.00, 0.25, 0.5, 0.75, and 1.00
library(MASS)
ds_splits = data.frame(score_1 = numeric(), score_2 = numeric(), replication = numeric())
for (r in 0:4) {
vars = mvrnorm(10, mu = c(0, 0), Sigma = matrix(c(10, 3, 3, 2), ncol = 2), empirical = FALSE)
ds_splits = rbind(ds_splits, cbind(vars, r))
}
names(ds_splits) = c("score_1", "score_2", "replication")
# Pearson correlations
split_coefs(ds_splits, cor)
# Spearman-brown corrected Pearson correlations
split_coefs(ds_splits, spearman_brown)
# Flanagan-Rulon coefficient
split_coefs(ds_splits, flanagan_rulon)
# Angoff-Feldt coefficient
split_coefs(ds_splits, angoff_feldt)
# Spearman-Brown corrected ICCs
split_coefs(
ds_splits,
spearman_brown,
short_icc,
type = "ICC1",
lmer = FALSE
)