comp_reliability: Function to calculate Composite reliability

Description Usage Arguments Value Author(s) See Also Examples

View source: R/reliability_validity_measures.R

Description

This function needs a lavaan object with a model fit to work. It calculates Composite reliability for CFA models. There are two formulas inside the function and they run depending on the fit characteristics. The composite reliability or factor rho coefficient is the ratio of explained variance over total variance. With no error correlations the CR is just calculated as previously defined. A different formula is needed for when indicators share at least one error covariance. In this case the total variance is calculated by adding the sum of the unstandarized error variance multiplied by 2.

Usage

1

Arguments

x

lavaan object: The name of the model fit that was calculated from the specified CFA model with the lavaan package.

Value

The output is a data.frame specifying the latent factor in the first column and the CR in the second column.

Author(s)

Juan Carlos Saravia

See Also

Kline, R. (2016). Principles and Practice of Structural Equation Modeling. Fourth Edition. Guilford press. NY.

Raykov, T. (2004). Behavioral scale realiability and measurement invariance evaluation using latent variable modeling. Behavior therapy, 35, 299-331.

Examples

1
2
3
4
5
6
7
8
#'set.seed(123456)
data <- data.frame(replicate(10,sample(1:5,1000,rep=TRUE)))

m2 <- 'f=~ X1 + X2 + X3+X4+X5+X6+X7+X8+X9+X10'
fit2 <- lavaan::cfa(m2, data = data)
lavaan::summary(fit2, fit.measures = TRUE,
       standardized = TRUE)
comp_reliability(fit2)

jsaraviadrago/bluegrafir documentation built on July 20, 2020, 3:01 a.m.