Description Usage Arguments Details Author(s) References See Also Examples
Runs a Rasch model using the emotion scores from emoxicon
.
If the data is not already dichotomous, a mean split will be performed.
1 |
scores |
A dataframe containing the emotion scores |
groups |
An optional vector of group identifers the same length as |
return_models |
Logical. Should the model for each group be returned? Default is TRUE. Setting this value to FALSE will reduce object size, but only the category orders will be returned. |
... |
Additional arguments to be passed to |
When the data is generated using emoxicon
and the default emotions lexicon,
the entire emoxicon object can be entered.
Tara Valladares <tls8vx at virginia.edu>, Hudson F. Golino <hfg9s at virginia.edu>
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
emoxicon
, where the emotion scores are generated and rasch_fit
to calculate Rasch fit statistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.