Learn R Programming

classicaltest (version 0.7.5)

ctsem.alpha: Standard error of measurement (SEM)

Description

Estimates the standard error of measurement (SEM) of a scored matrix or data frame using Cronbach's alpha or the split-halves coefficient.

Usage

ctsem.alpha(x, wt = NULL, administered = NULL, maxscore = NULL)

ctsem.split( x, wt = NULL, tries = 100, seed = NA, administered = NULL, maxscore = NULL )

Value

a list.

Arguments

x

a data frame or matrix of scored data.

wt

a vector with total weights. Default is NULL.

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.

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’).

Examples

Run this code
# No weights
ex <- correct(x = dichodata, key = dichokey, navalue = NA)
ctsem.alpha(ex)
ctsem.split(ex,tries = 5)


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

Run the code above in your browser using DataLab