cronbach: Calculate Cronbach's alpha for sets of psychometric scale...

Description Usage Arguments Value Examples

View source: R/psychometrics.R

Description

This function calculates the Cronbach alpha for one or more sets of psychometric scale items. Each item is a variable in a data frame. Each set of items is defined by a tidy selection of a set of items.

Usage

1
cronbach(.data, ..., .ci = 0.95)

Arguments

.data

A data frame with columns that are psychometric items.

...

A set of comma separated tidy selectors that selects sets of columns from .data. For each set of columns, the Cronbach's alpha is computed.

.ci

The value of the confidence interval to calculate.

Value

A data frame whose rows are psychometric scales and for each scale, we have the Cronbach's alpha, and the lower and upper bound of the confidence interval on alpha.

Examples

1
2
3
4
5
6
 # Return the Cronbach alpha and 95% ci for two scales.
 # The first scale, named `x`, is identified by all items beginning with `x_`.
 # The second scale, named `y`, is identified by the consecutive items from `y_1` to `y_10`.
 cronbach(test_psychometrics,
          x = starts_with('x'),
          y = y_1:y_10)

psyntur documentation built on Sept. 15, 2021, 5:07 p.m.