# \donttest{
library(grmtree)
library(hlt)
data("asti", package = "hlt")
asti$resp <- data.matrix(asti[, 1:4])
# Fit GRM tree with gender and group as partitioning variables
tree <- grmtree(resp ~ gender + group,
data = asti,
control = grmtree.control(minbucket = 30))
# Compute EAP scores for all terminal nodes
node_scores <- fscores_grmtree(tree)
# Compute MAP scores instead
node_scores_map <- fscores_grmtree(tree, method = "MAP")
# }
Run the code above in your browser using DataLab