Compute per-scale internal-consistency reliability — Cronbach's alpha and
McDonald's omega — for the HiTOP Brief-Report (45 items). Reliability is
estimated on the item responses for each of the scales that score_hitopbr()
outputs (the HiTOP-BR has no reverse-keyed items).
Usage
reliability_hitopbr(data, items, srange = c(1, 4), alpha = TRUE, omega = TRUE)Arguments
- data
A data frame containing all HiTOP-BR items (numerically coded).
- items
A vector of column names (as strings) or numbers (as integers) corresponding to the 45 HiTOP-BR items in order. Items must be supplied in instrument order; duplicated entries are an error. Each column must be numeric or logical, or character holding only numbers (blank cells and
NAvalues count as missing, but the text"NA"is refused). A haven labelled column is read as its plain values. Any other column, such as the choice text of an online export or a factor, is an error of classhitop_nonnumeric_items. So is a 64-bit integer (integer64) column, and, in a UTF-8 session, a column holding text that is not valid UTF-8 (text marked Latin-1 is read as its text); convert such text withiconv(). So is an SPSS column (haven_labelled_spss) that holds a value it declares missing; turn those codes intoNAwithhaven::zap_missing()first. A declared value that is blank is not refused, since blank cells count as missing. The SPSS class of haven before 2.0 (labelled_spss) is refused the same way, buthaven::zap_missing()leaves it unchanged, so set the values itsna_valuesorna_rangeattribute declares toNAfirst.- srange
An optional numeric vector specifying the minimum and maximum values of the HiTOP-BR items, used for reverse-coding. (default =
c(1, 4))- alpha
Optional logical; if
TRUE, include a column of Cronbach's alpha per scale. (default =TRUE)- omega
Optional logical; if
TRUE, include a column of McDonald's omega (total) per scale, estimated via a one-factor CFA (requires the lavaan package). (default =TRUE)
Value
A tibble with one row per scale and columns Scale
(the scale's canonical display name, as the instrument's keying table spells
it), camelCase (the stem that names the scale's column in the matching
score_*() output, read from the same keying-table row), nItems
(integer), and (when requested) alpha and omega.
Details
Alpha is computed by calc_alpha() (covariance-based, pairwise
deletion) and omega by calc_omega() (one-factor lavaan CFA, FIML). A scale
whose estimate cannot be computed (e.g. too few items or, for omega, a
non-converging CFA or an uninstalled lavaan) is returned as NA
rather than aborting the call. Omega needs at least 3 items: for a scale
with fewer, no model is fitted and omega is NA. The overlapping externalizing and pFactor
scales are included alongside the six base spectra.
Examples
# Per-scale alpha for the HiTOP-BR
reliability_hitopbr(sim_hitopbr, items = 1:45, omega = FALSE)
#> # A tibble: 8 × 4
#> Scale camelCase nItems alpha
#> <chr> <chr> <int> <dbl>
#> 1 Antagonism antagonism 9 -0.160
#> 2 Detachment detachment 5 0.00188
#> 3 Disinhibition disinhibition 9 0.145
#> 4 Internalizing internalizing 8 0.0892
#> 5 Somatoform somatoform 8 0.0527
#> 6 Thought Disorder thoughtDisorder 6 0.00754
#> 7 Externalizing externalizing 10 0.145
#> 8 p-Factor pFactor 12 -0.111
