Appendix G — The lavInspect() / lavTech() keyword catalog
This appendix is a complete reference to the what= keywords accepted by lavInspect() and lavTech() (Section 9.12). The two functions recognize the same keywords and differ only in the form of the result: lavInspect() formats the result (attaches row/column labels, adds print classes, and drops the group list layer for single-group models), whereas lavTech() returns the bare quantity (add_labels = FALSE, add_class = FALSE, drop_list_single_group = FALSE). For programmatic use, where the shape of the result should not depend on the number of groups, lavTech() is usually the safer choice. The deprecated inspect() is a two-argument shorthand for lavInspect().
The catalog below is organized by theme. Each row lists the primary keyword, its accepted aliases, and what is returned. Keywords are matched without regard to case, and dots and underscores are interchangeable: "cov_lv", "cov.lv", and "COV_LV" select the same result. The catalog shows the snake_case spelling used on the help page; a chapter pointer is given where the quantity is discussed in depth. The authoritative list, which takes precedence if this appendix and the software ever disagree, is the ?lavInspect help page, which mirrors the dispatch source named in the implementation notes of chapter 9 (Section 9.13).
A few conventions recur throughout:
Per-group / per-block lists: anything described as “a list of model matrices” or “per group” is returned as a list with one element per group (and, for multilevel models, one sub-element per level). With lavInspect() and a single group, the outer list is dropped; with lavTech() it is kept.
Model matrices follow the LISREL naming of chapter 4 (lambda, theta, psi, beta, nu, alpha, …): the entries of the returned matrix are the quantities that the keyword selects (free-parameter indices, estimates, standard errors, …).
Unit vs total information: the information keywords return unit information (per observation), not total (N\times) information, unless stated otherwise.
G.1 Model matrices
Each of these returns a list of model matrices, one per group/block, whose entries are filled according to the keyword.
Keyword
Aliases
Returns
"free"
Non-zero integers mark the free parameters, numbered by their position in the parameter vector (the order of coef(), vcov()).
"partable"
Non-zero integers mark all parameter-table entries, fixed and free (Section 9.4).
"est"
"estimates", "x"
The estimated parameter values.
"est_unrotated"
The estimates before rotation (EFA/ESEM, chapter 15); identical to "est" when no rotation was used.
The standard errors; parameters constrained equal share one value.
"se_std"
"std_se"
Standard errors of the completely standardized parameters.
"std"
"std_all", "est_std", "std_est", "standardized"
Completely standardized estimates (observed and latent variances set to one; Section 12.1).
"std_lv"
Standardized estimates, latent variables only.
"std_nox"
Completely standardized, but exogenous observed covariates keep their metric.
"dx_free"
Gradient of the discrepancy function with respect to the free parameters, laid out in the matrices.
"dx_all"
First derivative with respect to every matrix element (ML/GLS only).
Three keywords extract a single named matrix from the internal list of model matrices (the bare aliases without the "mm_" prefix remain accepted):
Keyword
Aliases
Returns
"mm_lambda"
"lambda"
The estimated factor-loading matrix \boldsymbol{\Lambda}, per group.
"mm_theta"
"theta", "theta_cov"
The residual (co)variance matrix \boldsymbol{\Theta}, per group.
"mm_delta"
The scaling matrix \boldsymbol{\Delta} (categorical data or correlation structures); the delta model matrix, not the delta Jacobian returned by "delta".
G.2 Data structure
Keyword
Aliases
Returns
"data"
The observed data matrix used in the fit (no dimnames; rows follow "case_idx").
"ordered"
Character vector of the ordered (categorical) variables.
"nobs"
Effective sample size per group (sum of weights, if any); matches nobs().
"norig"
Original number of rows per group.
"ntotal"
Total effective sample size across groups.
"case_idx"
Row numbers of the cases used (per group).
"empty_idx"
Row numbers of cases that were entirely missing on the model variables.
"patterns"
"pattern"
Binary missing-data pattern matrix (per group).
"patterns_freq"
"pattern_freq"
Number of cases per missing-data pattern, in the row order of "patterns".
"patterns_stats"
"pattern_stats", "missing_stats"
Per-pattern sample statistics used by FIML and two-stage estimation (cov, mean, freq, var_idx); missing = "ml" family only.
"response_patterns"
"resp_patterns"
Response patterns of the ordered variables (pat), their frequencies, and the number of possible and unobserved patterns.
"sampling_weights"
"weights"
The normalized sampling weights, one per case (order of "case_idx"); only if weights were used.
"coverage"
Pairwise-coverage matrix: proportion of jointly observed cases per variable pair.
"th_idx"
For categorical data, the observed variable each threshold belongs to.
"group"
The grouping variable name.
"ngroups"
Number of groups.
"group_label"
The group labels.
G.3 Levels and clusters (multilevel)
See chapter 16. For multigroup multilevel models these return a list over groups.
Keyword
Aliases
Returns
"cluster"
The cluster variable name(s).
"level_label"
The level labels.
"nlevels"
Number of levels.
"nclusters"
Number of clusters used.
"ncluster_size"
Number of distinct cluster sizes.
"cluster_size"
Number of observations within each cluster.
"cluster_sizes"
The distinct cluster sizes.
"average_cluster_size"
The (harmonic-style) average cluster size.
"cluster_id"
Cluster IDs.
"cluster_idx"
Cluster index (1…nclusters) for each observation.
"cluster_label"
Cluster ID for each observation.
"icc"
Intraclass correlation coefficients of the clustered observed variables.
G.4 Observed sample statistics
See chapter 5. The "sampstat" family reads from the \mathsf{H}_1 slot when available (so FIML/EM moments are returned for incomplete continuous data).
Empirical-Bayes predictions of the random effects (multilevel; chapter 16).
"loglik_casewise"
Casewise log-likelihood contributions (ML only).
"mdist_fs"
Mahalanobis distances of the (Bartlett) factor scores (Section 13.4).
"mdist2_fs"
The squared version (for ordered data, \mathrm{E}(d^2), not the square of "mdist_fs").
"mdist_resid"
Mahalanobis distances of the casewise residuals.
"mdist2_resid"
The squared version.
G.8 Optimizer information
Keyword
Aliases
Returns
"converged"
Logical: whether the optimizer converged.
"iterations"
"iter", "niter"
Number of optimizer iterations.
"optim"
The full optimizer result list.
"npar"
Number of free parameters (ignoring constraints).
G.9 Rotation information
Only available when the model contains EFA blocks and a rotation was applied (chapter 15). Each keyword returns a list with one element per block (group or level); with a single block the outer list is dropped.
Keyword
Aliases
Returns
"rotation"
"rotation_info"
Per EFA block (keyed by its label): factor and indicator names, method, orthogonal or oblique, row weights, algorithm, convergence flag, number of iterations, criterion value, rotation matrix, factor covariance matrix, column permutation, and the random starts; with mg_agreement = TRUE also the per-group criterion values, convergence flags and iterations of the starting rotation (Section 15.5.1, Section 15.9.3); for an aligned confirmatory model (alignment =), the aligned variances and means, the loss value and the random starts per group (Section 15.9.5).
"rotation_matrix"
"rot"
The rotation matrix \mathbf{H} of the block (identity for latent variables outside the EFA blocks), with sign reflections, column permutation and, under mg_agreement = TRUE, the rescaling of the factors folded in (Section 15.5.7).
"lv_order"
"rotation_order"
The column permutation applied after rotation: element m is the column of the rotated solution placed in position m (Section 15.5.5).
"rotation_criterion"
"rotation_value"
The value of the rotation criterion at the solution, one per EFA block.
"rotation_converged"
Whether the rotation algorithm converged, one per EFA block.
"rotation_starts"
"rotation_rstarts"
Per EFA block, the criterion value, iterations, convergence flag and rotation matrix of every random start; NULL when no random starts were used (Section 15.5.3).
See Section 8.2.5. Everything is reconstructed from the fitted model (constraint functions evaluated at the estimates) and labeled with one row per constraint, one column per free parameter.
Keyword
Aliases
Returns
"constraints"
"con"
A list with all constraint information: ceq.jac, ceq.rhs, ceq.resid, ceq.rank, ceq.lambda, cin.jac, cin.rhs, cin.slack, cin.active, cin.lambda, k, k0, ceq_simple.
"constraints_jacobian"
"con_jac"
The stacked equality-over-inequality constraint Jacobian; attribute "active" flags binding rows.
"constraints_nullspace"
"constraints_k", "eq_constraints_k", "con_k"
Orthonormal basis \mathbf{Z}_{\text{eq}} of the equality-Jacobian null space (identity if no equality constraints); the information matrix is pre- and post-multiplied by \mathbf{Z}_{\text{eq}} to obtain its reduced form.
G.13 Tests, fit, and delegating keywords
Some keywords return the same object as a dedicated function; they are conveniences, not separate computations.
The parameter table of the internal baseline model.
"fit"
"fitmeasures", "fit_measures", "fit_indices"
The fit measures; same as fitMeasures().
"mi"
"modindices", "modification_indices"
The modification indices; same as modindices().
"list"
The parameter table; same as parTable().
"list_unmoderated"
"partable_unmoderated"
For models with data-defined (:~) parameters: the parameter table of the model without the definitions (component rows removed, moderated parameters free again; Section 2.9). Unchanged otherwise.
"post_check"
"post"
Admissibility check of the solution (negative variances, non-PD matrices; Section 7.11.3).
G.14 Robust-test internals
See Section 8.5.4. These expose the ingredients of the scaled/robust tests.
Keyword
Aliases
Returns
"delta"
The delta Jacobian: \partial(model-implied statistics)/\partial(free parameters), per group; this is the matrix used in the delta method.
"delta_rownames"
The row labels of "delta" (the names of the summary statistics).
"ugamma"
"ug", "u_gamma"
The product \mathbf{U}\boldsymbol{\Gamma} of the Satorra–Bentler correction; \mathrm{tr}(\mathbf{U}\boldsymbol{\Gamma})/\mathrm{df} is the scaling factor.
"ufromugamma"
"u"
The \mathbf{U} matrix of the Satorra–Bentler correction.
The internal (MI)IV equation list, with instruments, coefficients, and per-equation Sargan tests.
"sargan"
"hansen"
Per-equation overidentification tests (the classical Sargan statistic for continuous data; the robust Browne/Hansen statistic, columns browne.stat and browne.pval, for categorical data or with test = "browne.residual.adf"; with iv_method = "LIML" or "Fuller", the Anderson–Rubin likelihood ratio statistic, columns lr.stat and lr.pval, see Section 17.3.5).
"sam_struc_fit_object"
"sam_struc"
The step-2 structural lavaan object of a local sam() fit (chapter 18).
"sam_attenuation"
"sam_atten"
For a local sam() fit: the predicted small-sample attenuation of the latent correlations (block terms, estimated correlations, predicted relative and absolute bias; with the correction factors and corrected correlations when bias_correction = "plugin" was applied; Section 18.9.3).
"coef_boot"
"boot", "bootstrap", "boot_coef"
The bootstrap parameter draws (when bootstrapping was used; Section 8.4.12).
"rstarts"
"random_starts", "x_rstarts"
The random-start runs (when rstarts > 0 was used; Section 6.3): one element per run, with attributes converged, fx, and start.
"monte_carlo"
"mc", "mc_coef", "coef_mc"
The Monte Carlo parameter draws for defined-parameter CIs (Section 8.4.14).
"zero_cell_tables"
Bivariate frequency tables containing an empty cell (categorical data).
G.16 Model features and metadata
Keyword
Returns
"meanstructure"
Logical: whether the model includes a mean structure.
"categorical"
Logical: whether there are categorical endogenous variables.
"fixed_x"
Logical: whether the exogenous covariates are treated as fixed.
There is no single exported vector of all keywords. The ?lavInspect help page lists every keyword with its description, and the source file behind the dispatch is named in the implementation notes of chapter 9 (Section 9.13). A keyword can also be tried on a small fitted model: if it is not recognized, lavInspect() raises an error that names the what= value. Keywords never modify the object, so such a trial has no side effects.
fit <-cfa('visual =~ x1 + x2 + x3', data = HolzingerSwineford1939)lavInspect(fit, "npar")