knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-" )
An R
package for reliability coefficients and factor scores for the linear
factor model.
library("attenuation") knitr::opts_chunk$set(echo = TRUE) knitr::opts_chunk$set(out.width='750px', dpi=200)
From inside R
, use the following command:
# install.packages("devtools") devtools::install_github("JonasMoss/reliable")
Use lavaan
to fit a linear factor model.
library("reliable") model = ' visual =~ x1 + x2 + x3 textual =~ x4 + x5 + x6 speed =~ x7 + x8 + x9 ' object = lavaan::cfa(model = model, data = lavaan::HolzingerSwineford1939)
Now you we can find the sum-score reliability and the associated factor scores.
reliability(object, type = "sumscore")
And we can find the linear reliability and the associated factor scores.
reliability(object, type = "linear")
If you encounter a bug, have a feature request or need some help, open a Github issue. Create a pull requests to contribute. This project follows a Contributor Code of Conduct.
The logo is adapted from AutoDraw and licensed under CC BY 4.0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.