Computing the Cronbach alphas for multiple factors.

cronbach_alpha(
...,
data,
var_name,
group = NULL,
quite = FALSE,
return_result = FALSE
)

## Arguments

...

Items. Group each latent factors using c() with when computing Cronbach alpha for 2+ factors (see example below)

data

data.frame. Must specify

var_name

character or a vector of characters. The order of var_name must be same as the order of the ...

group

optional character. Specify this argument for computing Cronbach alpha for group separetely

quite

suppress printing output

return_result

If it is set to TRUE, it will return a dataframe object

## Value

a data.frame object if return_result is TRUE

## Examples

cronbach_alpha(
data = lavaan::HolzingerSwineford1939,
var_name = c('Visual','Textual','Speed'),
c(x1,x2,x3), # one way to pass the items of a factor is by wrapping it with c()
x4:x6, # another way to pass the items is use tidyselect syntax
x7:x9)
#> Number of categories should be increased  in order to count frequencies.
#> Number of categories should be increased  in order to count frequencies.
#> Number of categories should be increased  in order to count frequencies.
#> Number of categories should be increased  in order to count frequencies.
#> Number of categories should be increased  in order to count frequencies.
#> Number of categories should be increased  in order to count frequencies.
#>
#>
#> Model Summary
#> Model Type = Cronbach Alpha Reliability Analysis
#> Model Specification:
#>  Visual = x1 + x2 + x3
#>  Textual = x4 + x5 + x6
#>  Speed = x7 + x8 + x9
#>
#> ───────────────────────────────
#>       Var  raw_alpha  std_alpha
#> ───────────────────────────────
#>    Visual      0.626      0.627
#>   Textual      0.883      0.885
#>     Speed      0.688      0.690
#> ───────────────────────────────
#>