-
Notifications
You must be signed in to change notification settings - Fork 0
/
CronbachsAlpha.qmd
56 lines (50 loc) · 1.23 KB
/
CronbachsAlpha.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: "Cronbach's Alpha"
format: html
author:
- Melanie Viola Partsch
- Katharina Groskurth
- Matthias Blümke
- Isabelle Schmidt
keywords:
- Survey Data
- Measurement
- Validity
license: "CC BY-NC 4.0"
citation:
type: "document"
title: |
R Code for the Development and Validation of Measurement Instruments in the Social Sciences: Psychometric Analyses (Dimensionality, Reliability, Measurement Invariance)
container-title: GESIS, Cologne. Data File Version 1.0.0,
author:
- Melanie Viola Partsch
- Katharina Groskurth
- Matthias Blümke
- Isabelle Schmidt
doi: 10.7802/1.1982
issued: 2020
---
Load the required packages
```{r}
#| label: setup
library(rio)
library(dplyr)
library(psych)
packageVersion("rio")
packageVersion("dplyr")
packageVersion("psych")
```
Read the example data.
```{r}
#| label: read_data
example1 <- rio::import("example1.sav")
```
Compute Cronbach's alpha
```{r}
alpha <- psych::alpha(select(example1, bfi2_1, bfi2_16R, bfi2_31R, bfi2_46),
n.iter = 1000
)
alpha # print standard output
round(alpha[["total"]][["raw_alpha"]], digits = 3) # print alpha value
round(alpha[["boot.ci"]], digits = 3) # print bootstrapped confidence intervals
```