View source: R/grmtree-fscores.R
| fscores_grmtree | R Documentation |
This function calculates latent factor scores for each terminal node in a GRM tree object using specified scoring method (EAP, MAP, ML, or WLE).
fscores_grmtree(grmtree_obj, method = "EAP")
grmtree_obj |
A GRM tree object (from |
method |
Scoring method to use: "EAP" (default), "MAP", "ML", or "WLE".
See |
A named list where each element contains the factor scores for a terminal node. Names correspond to node IDs. Returns NULL for nodes where computation fails. If no scores can be computed for any node, returns NULL with a warning.
fscores for factor scoring methods,
grmtree fits a Graded Response Model Tree,
grmforest for GRM Forests, threshpar_grmtree for
extracting threshold parameters, discrpar_grmtree for
extracting discrimination parameters, itempar_grmtree for
extracting item parameters, generate_node_scores_dataset
generates combined dataset with node assignments and factor scores
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.