alphatest {classicaltest}R Documentation

Reliability measures

Description

Estimates the Cronbach's alpha coefficients and the split-halves coefficient for a scored matrix.

Usage

alphatest(x, wt = NULL)

splithalf(
  x,
  wt = NULL,
  tries = 100,
  seed = NA,
  administered = NULL,
  maxscore = NULL
)

Arguments

x

a data frame or matrix of scored data.

wt

a vector with total weights. Default is NULL.

tries

a numeric value indicating the number of samples for the split-halves coefficient. Default is 100.

seed

a single value, interpreted as an integer, or NULL (see ‘Details’).

administered

a logical matrix indicating which items were administered. The dimensions should be the same as x. If NULL all items are considered administered.

maxscore

a numeric value indicating which is the maximum score possible per item. The minimum score is assumed to be 0. If NULL the maximum score is assumed to be derived from the maximum value found in x or 1 if x only has 0s.

Value

a list or a numeric vector.

Examples

# No weights
ex <- correct(x = dichodata, key = dichokey, navalue = NA)
alphatest(ex)
splithalf(ex, tries = 5)


# With weights
set.seed(1919)
wt <- sample(x = 1:4, size = nrow(dichodata), replace = TRUE)
alphatest(ex,wt = wt)
splithalf(ex,wt = wt, tries = 5)


[Package classicaltest version 0.7.5 Index]