Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brunomontezano/hclpsychometrics
📊 Contains code used to analyze data about HCL-32 instrument (Hypomania Checklist). Functions related to confirmatory factor analysis and internal consistency.
https://github.com/brunomontezano/hclpsychometrics
bipolar-disorder cfa confirmatory-factor-analysis cronbach-alpha factor-analysis open-source psychology psychometrics public-code r
Last synced: 9 days ago
JSON representation
📊 Contains code used to analyze data about HCL-32 instrument (Hypomania Checklist). Functions related to confirmatory factor analysis and internal consistency.
- Host: GitHub
- URL: https://github.com/brunomontezano/hclpsychometrics
- Owner: brunomontezano
- License: gpl-3.0
- Created: 2021-09-18T14:49:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-28T18:40:32.000Z (over 3 years ago)
- Last Synced: 2024-11-12T15:27:28.673Z (2 months ago)
- Topics: bipolar-disorder, cfa, confirmatory-factor-analysis, cronbach-alpha, factor-analysis, open-source, psychology, psychometrics, public-code, r
- Language: R
- Homepage:
- Size: 203 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# HCL-32 Psychometric Properties
[![R-CMD-check](https://github.com/brunomontezano/HCLpsychometrics/workflows/R-CMD-check/badge.svg)](https://github.com/brunomontezano/HCLpsychometrics/actions)
The objective of `HCLpsychometrics` is to provide functions to perform the analyzes used in a study on the factor structure of the HCL-32 instrument in a population sample. The package has functions for executing routines for confirmatory factor analysis and Cronbach's alpha
coefficient estimation.#### Note
This repository is not intended to be used by others. It is a package aggregating several tools used to replicate the specific analysis of an article. The dataset named `hcl` inside the package contains an example tibble (10% of the original sample) to check the proper functioning and give an idea on how the package works.
## Installation
The current version can be installed from
[GitHub](https://github.com/) with:``` r
# install.packages("remotes")
remotes::install_github("brunomontezano/HCLpsychometrics")
```## Examples
### Confirmatory Factor Analysis
```{r}
library(HCLpsychometrics)# First, the models to be tested are created
created_models <- create_models()# Then, we can fit these models on given dataset
# that contains yX as variable names, X being numbers from 1 to 32
fitted_models <- fit_models(
data = hcl,
models = created_models
)# Finally, I could for example, summarize the parameters
# (In this case, I just printed the first 3 rows to save space)
summarize_parameters(
fits = fitted_models
) %>% purrr::map(head, 3)
```As can be seen from the output of the functions, they work in order to fit three models for CFA: a model by Bech et al. (2011), another by Forty et al. (2010) and a third model called HCL-28, developed by the authors of the paper.
Note that the `summarize_fit` and `summarize_parameters` functions' outputs are returned as an R list, facilitating the individual check of the results of each model through the elements in this list.
### Cronbach's Alpha
```{r}
# The alpha_hcl28 function can be used to calculate Cronbach's
# alpha based on the HCL-28 model in the input dataset
HCLpsychometrics::alpha_hcl28(hcl)
```As you can see from the output, the `alpha_hcl28` function generates
Cronbach's alpha for the structure (HCL-28) as a whole, and separately
by factor.## Acknowledgement
I would like to thank designer [Guilherme Bueno](https://guilhermebuenodesign.github.io/) for creating the repository logo.
Logo icon adapted from [Freepik](https://www.freepik.com/).
## Contact
Feel free to contact me here on [GitHub](https://github.com/brunomontezano) or [ResearchGate](https://www.researchgate.net/profile/Bruno-Braga-Montezano).