-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcronbach.R
More file actions
52 lines (41 loc) · 872 Bytes
/
Copy pathcronbach.R
File metadata and controls
52 lines (41 loc) · 872 Bytes
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
# See here https://rforhr.com/cronbachsalpha.html
cronbach_mpvs_12 <- psych::alpha(
df_1[
, colnames(df_1)[str_detect(
string = colnames(df_1),
pattern = "mpvs_item_[\\d]+_12_1"
)]
]
)
cronbach_mpvs_14 <- psych::alpha(
df_1[
, colnames(df_1)[str_detect(
string = colnames(df_1),
pattern = "mpvs_item_[\\d]+_child_14_1"
)]
]
)
cronbach_mpvs_16 <- psych::alpha(
df_1[
, colnames(df_1)[str_detect(
string = colnames(df_1),
pattern = "mpvs_item_[\\d]+_16_1"
)]
]
)
cronbach_mpvs_21_phase2 <- psych::alpha(
df_1[
, colnames(df_1)[str_detect(
string = colnames(df_1),
pattern = "mpvs_item_[\\d]+_phase_2_21_1"
)]
]
)
cronbach_dcq <- psych::alpha(
df_1[
, colnames(df_1)[str_detect(
string = colnames(df_1),
pattern = "dcq_item_[\\d]+_26_1"
)]
]
)