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:

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.
"start" "starting_values" The starting values (chapter 6).
"se" "std_err", "standard_errors" 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).

Keyword Aliases Returns
"sampstat" "obs", "observed", "samp", "sample", "samplestatistics" Observed sample means, (co)variances, thresholds.
"sampstat_std" "obs_std", "observed_std", "samp_std", "sample_std", "samplestatistics_std" The same, with the covariance matrix rescaled to a correlation matrix.
"wls_obs" The observed statistics stacked into a single vector (the WLS “observed” vector).
"var" "sampstat_var" The observed variances: the diagonal of the "sampstat" covariance matrix.
"res_var" The residual variances (conditional_x = TRUE).
"icov" "sampstat_icov" The inverse of the sample covariance matrix; "res_icov" for the residual one.
"cov_log_det" "sampstat_cov_log_det" The log-determinant of the sample covariance matrix; "res_cov_log_det" for the residual one.
"res_th_nox" "th_nox" Sample thresholds of the ordered variables ignoring the exogenous covariates.
"wls_v" The weight matrix used in (D)WLS estimation (Section 7.4).
"wls_vd" The diagonal of "wls_v" as a vector: the weights actually used by DWLS and ULS.
"gamma" "sampstat_nacov" The matrix \boldsymbol{\Gamma}: N times the asymptotic covariance matrix of the sample statistics (Section 5.6.2).
"sampstat_2l" "sampstat_twolevel", "sampstat_cluster" The intermediate two-level sample statistics (pooled within-cluster covariance, cluster means, per-cluster-size moments, level-1 crossproduct).
"group_w" "group_weights" The observed group weights: the log of the (effective) number of observations per group.
"logl" "loglik" The loglikelihood of the fitted model, per group.
"h1_logl" "h1_loglik", "logl_h1" The loglikelihood of the unrestricted (\mathsf{H}_1) model, per group; sums to unrestricted.logl.

G.5 Model-implied statistics

Keyword Aliases Returns
"implied" "fitted", "expected", "exp" The model-implied summary statistics.
"resid" "res", "residual", "residuals" Observed minus model-implied statistics (raw residuals; Section 10.8).
"cov_ov" Model-implied covariance matrix of the observed variables.
"cor_ov" Model-implied correlation matrix of the observed variables.
"mean_ov" Model-implied mean vector of the observed variables.
"cov_lv" "veta" Model-implied covariance matrix of the latent variables.
"cor_lv" Model-implied correlation matrix of the latent variables.
"mean_lv" "eeta" Model-implied mean vector of the latent variables.
"cov_all" Model-implied covariance of observed and latent variables jointly.
"cor_all" The corresponding joint correlation matrix.
"th" Model-implied thresholds (categorical data, chapter 14).
"theta_cor" The residual correlation matrix.
"vy" Model-implied unconditional variances of the observed variables.
"wls_est" The model-implied statistics stacked into the WLS “estimated” vector.
"rsquare" "r2", "r-square" R^2 for each endogenous variable.

G.6 Reliability and factor-score quality

See chapter 13.

Keyword Aliases Returns
"fs_determinacy" "fs_det", "fs_determin" Factor-score determinacies (regression method).
"fs_reliability" "fs_rel", "fs_reliabilities" Factor-score reliabilities (regression method).
"fs_determinacy_bartlett" "fs_det_bartlett", "fs_determin_bartlett", "fs_determinacies_bartlett" Factor-score determinacies (Bartlett method).
"fs_reliability_bartlett" "fs_rel_bartlett", "fs_reliabilities_bartlett" Factor-score reliabilities (Bartlett method).

G.7 Casewise diagnostics

Keyword Aliases Returns
"ranef" 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).

G.10 Derivatives and information matrices

See Section 8.4 and Section 8.2.1. All return unit information unless noted.

Keyword Aliases Returns
"gradient" First derivatives of the discrepancy function.
"gradient_logl" First derivatives of the log-likelihood.
"optim_gradient" First derivatives of the optimizer’s objective.
"hessian" Second derivatives of the discrepancy function.
"information" Observed or expected information (per the fit’s information option).
"information_expected" Expected information.
"information_observed" Observed information.
"information_first_order" "first_order" First-order (outer-product-of-gradients) information.
"h1_information" Information of the unrestricted \mathsf{H}_1 model (observed/expected/first-order per option).
"h1_information_expected" \mathsf{H}_1 expected information.
"h1_information_observed" \mathsf{H}_1 observed information.
"h1_information_first_order" "h1_first_order" \mathsf{H}_1 first-order information.
"augmented_information" Augmented (bordered) information; only relevant with constraints (Section 8.2.5).
"augmented_information_expected" Expected augmented information.
"augmented_information_observed" Observed augmented information.
"augmented_information_first_order" First-order augmented information.
"inverted_information" Inverse of the information matrix (observed/expected per option).
"inverted_information_expected" Inverse of the expected information.
"inverted_information_observed" Inverse of the observed information.
"inverted_information_first_order" Inverse of the first-order information.

G.11 Variance–covariance of the parameters

See Section 9.5 and Section 8.4.14. The _std_* suffixes select the standardization; the _def* variants concern user-defined (:=) parameters.

Keyword Returns
"vcov" VCOV of the estimated model parameters.
"vcov_std_all" / "vcov_std_lv" / "vcov_std_nox" VCOV of the standardized parameters (all / latent-only / no-x).
"vcov_def" VCOV of the defined (:=) parameters.
"vcov_def_std_all" / "vcov_def_std_lv" / "vcov_def_std_nox" VCOV of the standardized defined parameters.
"vcov_def_joint" Joint VCOV of the model and defined parameters.
"vcov_def_joint_std_all" / "vcov_def_joint_std_lv" / "vcov_def_joint_std_nox" Joint VCOV, standardized.

G.12 Constraints

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.

Keyword Aliases Returns
"test" The full test-statistic list (Section 8.5).
"baseline_test" The test list of the baseline model.
"baseline_partable" 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.

G.15 Estimator-specific and miscellaneous

Keyword Aliases Returns
"iv" "ivs", "miiv", "miivs", "instr", "instruments" Per-equation instrumental variables (estimator "IV"; Section 17.3).
"eqs" 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.
"parameterization" "delta" or "theta" (categorical data).
"options" The resolved option list (appendix F).
"call" The matched call, as a list.
"timing" Per-subprocedure timing (milliseconds).
"version" The lavaan version that produced the object.

G.17 Enumerating the keywords programmatically

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")
[1] 6
lavInspect(fit, "converged")
[1] TRUE