Learn R Programming

emreliability (version 1.0.0)

cssem_polynomial: Polynomial Method for CSSEM

Description

Implement the polynomial method for computing conditional standard errors of measurement for scale scores (CSSEM). A polynomial regression of scale scores on raw scores is fit for degrees 1 through K; for each degree k, the transformation derivative is used to map raw-score CSEM values to scale-score CSSEM values.

Usage

cssem_polynomial(csemx, ct, K = 10, gra = TRUE)

Value

A list with two components:

rsquared

A matrix with one column containing the R-squared values from polynomial fits of degree k = 1, ..., K, where K is the largest successfully fitted degree.

cssempoly

A data frame containing the merged data (x, csem, ss) and, for each degree k, the additional columns:

  • fx_k1, fx_k2, ...: transformation derivatives \(f'_k(x)\) for each raw score,

  • ss_k1, ss_k2, ...: fitted (rounded) scale scores from the polynomial of degree k,

  • cssem_k1, cssem_k2, ...: CSSEM values on the scale-score metric, computed as \(f'_k(x)\,\mathrm{CSEM}_x\).

Arguments

csemx

A data frame or matrix containing raw scores and their CSEM on the raw-score metric. It must have at least the following numeric columns:

  • x: raw scores,

  • csem: conditional standard errors of measurement on the raw-score metric.

ct

A data frame or matrix containing the score conversion table. It must have at least the following numeric columns:

  • x: raw scores (matching those in csemx),

  • ss: scale scores corresponding to each raw score.

K

Integer. Highest polynomial degree to fit. Defaults to 10.

gra

Logical. If TRUE, a plot of the fitted polynomial curve and the observed conversion points is produced for each degree k.

Details

At the beginning of the function, csemx and ct are merged by the x column (inner join) to create an internal data frame . Only rows with x values present in both inputs are used. The polynomial model is then fit to ss ~ poly(x, k, raw = TRUE) for k = 1, ..., K.

Examples

Run this code
data(ct.u)
cssem_polynomial(as.data.frame(csem_lord(40)), ct.u, K = 4, gra = TRUE)

Run the code above in your browser using DataLab