svycralpha: Cronbach's alpha

Description Usage Arguments Value References Examples

View source: R/svycralpha.R

Description

Compute Cronbach's alpha coefficient of reliability from survey data. The formula is equation (2) of Cronbach (1951) only with design-based estimates of the variances.

Usage

1
svycralpha(formula, design, na.rm = FALSE)

Arguments

formula

One-sided formula giving the variables that make up the total score

design

survey design object

na.rm

TRUE to remove missing values

Value

A number

References

Cronbach LJ (1951). "Coefficient alpha and the internal structure of tests". Psychometrika. 16 (3): 297-334. doi:10.1007/bf02310555.

Examples

1
2
3
4
data(api)
dstrat<-svydesign(id = ~1, strata = ~stype, weights = ~pw, data = apistrat, 
    fpc = ~fpc)
svycralpha(~ell+mobility+avg.ed+emer+meals, dstrat)    

Example output

Loading required package: grid
Loading required package: Matrix
Loading required package: survival

Attaching package: 'survey'

The following object is masked from 'package:graphics':

    dotchart

  *alpha* 
0.6386731 

survey documentation built on July 19, 2021, 9:06 a.m.