View source: R/grmtree-print.R
| print.grmtree | R Documentation |
Displays a formatted summary of a GRM (Graded Response Model) tree object.
This function extends print.modelparty from the partykit package with
specialized formatting for GRM trees.
## S3 method for class 'grmtree'
print(
x,
title = "Graded Response Model Tree",
objfun = "negative log-likelihood",
...
)
x |
A GRM tree object of class 'grmtree'. |
title |
Character string specifying the title for the print output (default: "Graded Response Model Tree"). |
objfun |
Character string labeling the objective function (default: "negative log-likelihood"). |
... |
Additional arguments passed to |
The print method provides a comprehensive summary of the GRM tree, including:
Model formula used for fitting
Tree structure with node information
Item parameter estimates for each terminal node
Confidence intervals for parameters
Group parameters (mean and covariance)
Summary statistics (number of nodes, objective function value)
Invisibly returns the GRM tree object. Primarily called for its side effect of printing a formatted summary.
print.modelparty for the underlying printing
infrastructure, grmtree for creating GRM tree objects
library(grmtree)
library(hlt)
data("asti", package = "hlt")
asti$resp <- data.matrix(asti[, 1:4])
# Fit GRM tree
tree <- grmtree(resp ~ gender + group,
data = asti,
control = grmtree.control(minbucket = 30))
# Print the tree summary
print(tree)
# Alternative syntax (automatically calls print.grmtree)
tree
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.