## verbal aggression data from package psychotools
data("VerbalAggression", package = "psychotools")
## responses to the first other-to-blame situation (bus)
VerbalAggression$s1 <- VerbalAggression$resp[, 1:6]
## exclude subjects who only scored in the highest or the lowest categories
VerbalAggression <- subset(VerbalAggression, rowSums(s1) > 0 & rowSums(s1) < 12)
## fit rating scale tree model for the first other-to-blame situation
rst <- rstree(s1 ~ anger + gender, data = VerbalAggression)
## just print mob object
print(rst)
## show summary for terminal panel nodes
summary(rst)
## plot with default (and currently only) terminal panel function (node_effects)
plot(rst)
## extract item and category parameters
coef(rst)
## inspect parameter stability tests in all splitting nodes
sctest(rst, node = 1)
sctest(rst, node = 2)
Run the code above in your browser using DataLab