rasch_fit: Calculate Rasch fit statistics

Description Usage Arguments Author(s) References Examples

View source: R/rasch_fit.R

Description

This function serves as a wrapper to calculate Rasch person and item fit statistics based on the person.parameter fit functions.

Usage

1
rasch_fit(model, groups = FALSE)

Arguments

model

The object outputted by the emoxicon rasch function.

groups

Logical. Should summary fit statistics be calculated across the individual group models, if present? The default is FALSE. Running fit statistics on many models can be slow.

Author(s)

Tara Valladares <tls8vx at virginia.edu>

References

Mair, P., & Hatzinger, R. (2007). Extended Rasch modeling: The eRm package for the application of IRT models in R. Journal of Statistical Software, 20(9),1-20. doi:10.18637/jss.v020.i09

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Load the tinytrolls data
data(tinyTrolls)

# Use the emoxicon function
## Not run: 
emotions.tinytrolls <- emoxicon(text = tinyTrolls$content, lexicon = emotions)
# Recode the variables to 0 (below mean) or 1 (equal to or above mean)
emotions.rasch <- as.data.frame(apply(emotions.tinytrolls[,-c(1:2)],2,
function(x) ifelse(x<mean(x),0,1)))
# Apply the Rasch Model
rm.tinytrolls <- rasch(scores = emotions.tinytrolls)
# Use the rasch_fit function
fit.tinytrolls <- rasch_fit(rm.tinytrolls)

## End(Not run)

tvall/emoxicon documentation built on Dec. 31, 2020, 9:39 a.m.