Provides user-friendly, formatted console output for objects generated by the LCPA package.
This generic function dispatches to class-specific methods that display concise summaries of model results,
simulated datasets, fit indices, model comparisons, and standard errors. Designed for interactive use
and quick diagnostic inspection.
# S3 method for LCA
print(x, ...)# S3 method for summary.LCA
print(x, ...)
# S3 method for LPA
print(x, ...)
# S3 method for summary.LPA
print(x, ...)
# S3 method for LTA
print(x, ...)
# S3 method for summary.LTA
print(x, ...)
# S3 method for LCPA
print(x, ...)
# S3 method for summary.LCPA
print(x, ...)
# S3 method for sim.LCA
print(x, ...)
# S3 method for summary.sim.LCA
print(x, ...)
# S3 method for sim.LPA
print(x, ...)
# S3 method for summary.sim.LPA
print(x, ...)
# S3 method for sim.LTA
print(x, ...)
# S3 method for summary.sim.LTA
print(x, ...)
# S3 method for fit.index
print(x, ...)
# S3 method for summary.fit.index
print(x, ...)
# S3 method for compare.model
print(x, ...)
# S3 method for summary.compare.model
print(x, ...)
# S3 method for SE
print(x, digits = 4, I.max = 5, L.max = 3, ...)
# S3 method for summary.SE
print(x, ...)
Invisibly returns the input object x. No data is modified.
An object of one of the following classes:
Model objects: LCA, LPA,
LCPA, LTA
Simulation objects: sim.LCA, sim.LPA,
sim.LTA
Fit/comparison objects: get.fit.index, compare.model
Standard error objects: get.SE
Summary objects: summary.LCA, summary.LPA, summary.LCPA,
summary.LTA, summary.sim.LCA, summary.sim.LPA, summary.sim.LTA,
summary.fit.index, summary.compare.model, summary.SE
Additional arguments passed to methods (currently ignored in most cases).
Number of decimal places for numeric output (default: varies by method, often 4).
Used by: print.SE, print.summary.fit.index, print.summary.sim.LCA/LPA/LTA,
print.summary.SE.
Maximum number of variables/items to display before truncation (default: varies, e.g., 5).
Used by: print.SE, print.summary.sim.LCA/LPA/LTA.
Maximum number of latent classes/profiles to display before truncation (default: varies, e.g., 3).
Used by: print.SE, print.summary.sim.LTA.
print(LCA): Print method for LCA objects
print(summary.LCA): Print method for summary.LCA objects
print(LPA): Print method for LPA objects
print(summary.LPA): Print method for summary.LPA objects
print(LTA): Print method for LTA objects
print(summary.LTA): Print method for summary.LTA objects
print(LCPA): Print method for LCPA objects
print(summary.LCPA): Print method for summary.LCPA objects
print(sim.LCA): Print method for sim.LCA objects
print(summary.sim.LCA): Print method for summary.sim.LCA objects
print(sim.LPA): Print method for sim.LPA objects
print(summary.sim.LPA): Print method for summary.sim.LPA objects
print(sim.LTA): Print method for sim.LTA objects
print(summary.sim.LTA): Print method for summary.sim.LTA objects
print(fit.index): Print method for fit.index objects
print(summary.fit.index): Print method for summary.fit.index objects
print(compare.model): Print method for compare.model objects
print(summary.compare.model): Print method for summary.compare.model objects
print(SE): Print method for SE objects
print(summary.SE): Print method for summary.SE objects
Numeric values are typically rounded to 4 decimal places unless overridden by digits.
Large matrices (e.g., item parameters, transition coefficients) are truncated with clear messages.
Significance markers: *** (<0.001), ** (<0.01), * (<0.05), . (<0.1).
95% confidence intervals computed as: Estimate ± 1.96 × Std_Error.
Reference classes (for multinomial models) are explicitly stated.
Warnings appear for unstable SEs (high condition number) or incomplete Bootstrap runs.
Each method produces a structured, human-readable summary optimized for its object type:
LCA/LPA/LCPA/LTA)Invokes summary() internally and prints comprehensive output including:
Model call and configuration (method, constraints, reference class)
Data characteristics (N, I, time points, distribution)
Fit statistics (LogLik, AIC, BIC, entropy, npar)
Class/profile prior probabilities and frequencies
Item-response probabilities (LCA) or profile means (LPA)
For LCPA/LTA: regression coefficients with significance markers and 95% CIs
Convergence diagnostics (iterations, tolerance, hardware)
Replication details (if nrep > 1)
sim.LCA/sim.LPA/sim.LTA)Displays simulation design and true parameter structure:
Configuration (N, I, L, times, constraint, distribution)
True class/profile proportions and observed frequencies
For sim.LCA: item category structure and conditional probabilities
For sim.LPA: covariance constraint description and mean ranges
For sim.LTA: transition mode (fixed/covariate), initial/transition coefficients
Output is truncated for high-dimensional structures using I.max and L.max.
fit.index)Presents a clean table of model fit criteria:
Header with dimensions (N, I, L, npar)
Formatted table: AIC, BIC, SABIC, CAIC, AWE, -2LL, SIC
Interpretation note: “Lower values preferred for ICs”
Values rounded to digits decimal places
compare.model)Compares two nested models with statistical tests:
Comparative fit table (npar, LogLik, AIC, BIC, entropy)
Classification quality (AvePP per class, overall entropy)
Bayes Factor with interpretive guidance
Likelihood ratio tests (standard, VLMR, Bootstrap) with p-values and significance codes
Clear section headers and visual separators
SE)Displays uncertainty estimates for model parameters:
Class probability SEs (always fully shown)
Profile means SEs (LPA) or item-response SEs (LCA), truncated by L.max/I.max
Covariance SE summary (non-zero count only; full access via extract())
Diagnostics: Bootstrap completion % or Hessian condition number with stability warnings
All summary.* methods are called internally by their corresponding print.* methods.
They pre-compute and structure output for consistent formatting. Direct calls are also supported.