latents reports errors, warnings and messages to communicate problems with input data, difficulties during estimation, and limitations of requested analyses. Errors indicate that an operation could not be completed. Warnings identify issues requiring attention when interpreting or using a result. Messages provide progress updates or supplementary information.
Details
This reference describes the conditions that trigger these signals and
their associated classes. In automated analyses, conditions can be handled
by class using tryCatch() or withCallingHandlers(). Class-based handling
allows scripts to respond to specific situations without depending on
message wording, which may change between versions.
Input validation
latents_bad_dataThe data frame, the indicator columns or the group column are invalid: too few rows, a duplicated or absent column name, an indicator that is not a numeric vector, an indicator that is constant or entirely unobserved, missing or non-finite values under
missing = "error", or a missing group identifier. Also raised when an outcome, covariate or variable named in an argument is not a column of the data given tothree_step(),r3step()ordescriptives(); whennewdatagiven topredict()cannot be used (latents-predict); and whenimputedgiven topool_imputations()is not a list of at least two data frames with the same columns and rows.latents_unweightable_levelThe stored sampling weights cannot be aligned with a classification level, for example in an older cross-level fit without a row-to-group mapping.
diagnostics()handles this condition internally and reports the affected checks asn/a.latents_not_a_fitA function requiring a fitted model received an unsupported object or a model from an unsupported family. The message identifies the supplied object. Also inherits from
latents_bad_argument.latents_bad_argumentAn argument has an invalid value: a scalar such as
n_profiles,n_group_classes,n_starts,max_iter,tolormin_variance; aseedorseedsthat is not a whole number accepted byset.seed(); awhatnaming a table or view the object does not have, or awhatthat isNA, not text or more than one name; an enumerated option such asmissing,boundary,select_start,acceleration,centering,scaling,variance_model,covariance_model,vcov_typeoradjustgiven a value that is not one of its choices; or an argument the function or table does not use.latents_bad_timetimeis missing, or repeats a position within a group.latents_bad_categoricalA categorical indicator cannot be encoded, or
min_probabilityis too large for its number of categories.latents_bad_startSupplied starting values lack a block the model needs, have the wrong shape, or carry labels naming an indicator or category the fit does not have.
latents_bad_fixedA
fixedrequest names a block the model does not have or thatstartdoes not supply, orstartis absent.latents_bad_stageA
measurementfit given tofit_staged()already has more than one group class; was fitted to different indicators, profiles or measurement options than the stage requests; or was fitted withweights,centering, or ordinal or count indicators.latents_bad_transitionA transition model was requested with fewer than two profiles, or with no group observed at two occasions.
latents_bad_inference_dataData supplied with a fitted model differ from the fitting data in row count, values or group ordering.
latents_no_indicator_dataA fit carries no stored indicators, so the request needs the original data.
latents_incomplete_fitA fit lacks fields the request needs, usually because it was made by an older version.
Estimation and identification
latents_unidentifiedThe requested model is not identified from the data: more profiles than distinct observed indicator rows, more group classes than groups, or more than one group class with only one profile or only singleton groups, or a known structurally unidentified short-panel transition specification. Raised as a warning, and the fit returned, for a model of complete categorical and ordinal indicators with one group class that has more free parameters than free cells of its table (negative degrees of freedom); a model with membership covariates is not judged by that count.
latents_all_starts_failedEvery EM start failed, so no fit was produced. The message gives the distinct start errors.
latents_empty_profileA profile has no observed responses for an indicator, so its response probabilities are not identified; or a group class has no effective membership, so its profile prevalences are not defined.
latents_too_few_groupsThere are too few independent groups to form the covariance of the reported quantities. Raised by robust and OPG
parameter_inference(), and bythree_step()andr3step(), whose cluster-robust contributions sum to zero at the estimate and so span at most one dimension fewer than the number of groups.latents_inseparable_classesThe classes are not separated well enough for the requested three-step correction.
latents_too_many_corescoresexceeds the machine's core count; the fit uses the machine's count instead.latents_unknown_corescoresis above one but the platform does not report its processor count (for example R in WebAssembly); the fit uses one core.latents_no_convergeA fit required by the request did not converge.
latents_vanished_densityEvery component density is zero, or one overflowed, at a point EM reached: the start is recorded as failed (
get_results(x, "starts")), and a fit whose every start fails raiseslatents_all_starts_failed.latents_boundary_fitA variance or response probability is at its bound, a mixing probability is zero, or a membership logit coefficient diverges (separation), including pooled and transition three-step membership regressions. The usual normal approximation for Wald inference does not apply at the parameter boundary, so standard errors are unavailable under the requested inference method.
latents_singular_informationThe observed information is not positive definite or is numerically singular, so no standard error can be formed.
latents_unknown_candidateThe requested profile and group-class combination was not enumerated.
latents_failed_candidateAn enumerated candidate could not be fitted. The message gives that candidate's error.
latents_no_group_classesA table, level or view that needs discrete group classes was requested from a model without them, for example
level = "groups"for a fit without group classes, or a group-level plot of a fit with fewer than two group classes.
Model comparison
latents_bad_nestingTwo models are not nested as the comparison requires, including a
bootstrap_lrt()pair whose held measurement blocks differ, are held at different values, or are held in only one of the two models.latents_singular_restrictionTwo models are nested, but the restriction is singular at the null, so the likelihood-ratio statistic has no chi-square reference: in
compare_models(test = "lrt"), a spherical covariance structure (EII, VII) within EVE, VVE, EEV or VEV. Also inherits fromlatents_bad_nesting.latents_incomparable_modelsTwo models were fitted to different data, or differ in covariance structure, centering, scaling mode or
drop_emptywhere the comparison requires them to match.latents_parallel_failureThe worker cluster could not be started, or a broken cluster's surviving processes could not be stopped safely. A process lost during fitting is otherwise retried and reported with
latents_worker_lostinstead.latents_worker_lostOne or more worker tasks returned no result, possibly because the operating system terminated them for excessive memory use. Missing results are retried once with fewer workers. The warning reports the numbers lost, recovered and still failed, and suggests fewer
cores. Persistent losses become failed starts or candidate rows, retaining other results. After a socket connection failure, the affected batch is retried and results from previously completed batches are retained.latents_suspect_categoricalA numeric indicator fitted as categorical has non-integer values or more than ten categories, so it may be continuous. Every distinct value is fitted as a category. The warning names the indicators (field
indicators) and is given once per call, including an enumeration.latents_progressA message from
enumerate_classes()withverbose = TRUE(the default whencores > 1): one as the candidates are prepared, one as their starts are fitted, and one when the grid is done. Muffle it withsuppressMessages(classes = "latents_progress")orverbose = FALSE.latents_candidate_failedA candidate of an enumeration that was fitted as one worker task lost that worker twice. It is recorded as the candidate's error, in its row of the grid, and the other candidates are returned.
latents_reversed_likelihoodThe larger nested model has a lower likelihood, indicating that at least one fit has not reached its global maximum.
latents_bad_outcomeA distal outcome given to
three_step()is a measurement indicator, varies within a group when a group-level outcome is requested (within a person, for a trajectory model), or takes a single category or value among the units analysed, so it has no distribution to compare across classes.latents_bad_covariateA predictor given to
r3step()varies within a group when group-level membership is predicted, makes the design rank deficient, or is a measurement indicator; or a predictor given tomultilpa(profile_covariates =, group_covariates =)is an indicator or the group identifier, or makes the membership design rank deficient.multilpa_indicator_reusedA measurement indicator was given as an outcome to
three_step()or as a predictor tor3step(). Raised together withlatents_bad_outcomeorlatents_bad_covariate.latents_bad_scoresScore contributions for the robust sandwich could not be formed.
Unsupported requests
These are raised when the package does not implement the requested analysis.
latents_unsupported_inferenceStandard errors are not available for this fit. Raised by
parameter_inference()for a fit made withprior(Wald method), for the cross-level families, for a covariate fit made by an older version, and for a fit recording a covariance structure code this version does not know; and byparameter_inference(method = "bootstrap")for an additive or covariate fit, a multilevel growth mixture, or a fit holding a measurement block throughfixed, or a staged fit whose measurement was estimated on different data or has unknown provenance. Also raised byvcov(scale = "unconstrained")for a bootstrap covariance.latents_unsupported_priormultilpa(prior = )was combined with an option the conjugate prior is not defined for: the VEE, EVE, VVE or EVV covariance structure (mclust defines none), categorical indicators, afixedblock, membership covariates, or missing indicator values.latents_unsupported_noisemultilpa(noise = TRUE)was combined with more than one group class, categorical indicators, afixedblock, membership covariates or missing indicator values; or a fit with a noise component was given to a function that does not support one:parameter_inference(),three_step(),r3step(),bootstrap_lrt(),starting_values(), bivariate residuals,fit_staged()or a posterior plot. Also raised bypredict()for partially observed rows when the fitted model has a noise component, because its stored hypervolume does not define the required marginal noise density.latents_bch_out_of_rangeWarning from
three_step()when the BCH weights give a categorical outcome a class probability outside[0, 1]; the probability is reported without an interval or test.latents_bad_weightsweightsdoes not name a column, or its values are missing, negative, non-finite, vary within a unit, or are positive for fewer than two units.latents_unsupported_weightsA weighted fit was given to a function or option that does not support sampling weights:
bootstrap_lrt(),enumerate_regressions(bootstrap = ),three_step(),r3step(),priorornoise; or avcov_typeother than"robust"was requested for it.latents_unsupported_indicatorordinalorcountindicators were combined with an option that does not support them: membership covariates,start,fixed,priorornoise.latents_pooling_failedA fit or its inference failed for one imputation in
pool_imputations(), or the imputations' fits report different parameters. No imputation is dropped; the message names the imputation and gives the original reason.latents_bootstrap_failedFewer than two resamples produced a usable fit. Raised by
parameter_inference(method = "bootstrap"); the message gives the first reason a resample failed.latents_no_free_parametersThe fit holds every parameter fixed, so there is no standard error to report. Raised by
parameter_inference()andvcov().latents_held_parameterA parameter named in
parmwas held fixed by the fit and has no confidence interval. Raised byconfint().latents_unsupported_sensitivitysensitivity()cannot refit the requested model or align its class labels: a membership-covariate fit, or a directly fitted fixed-measurement model whose original free starting values were not retained.latents_unsupported_three_stepthree_step()orr3step()was called on a fit the correction does not cover: a membership-covariate fit, whose classification errors depend on the predictors (the correction uses one unconditional error matrix); a multilevel growth mixture; a generallta()fit (occasion-varying, second-order or covariate transitions, occasion-specific measurement, a stayer class, or ordinal or count indicators), except thatr3step()takesinitial_covariatesandtransition_covariatesfor one with invariant measurement, one group class, no covariates and no stayer class; an additive, dispersion or cross-levelmultilpa()fit; or a mixture regression with observation classes. Also raised bythree_step(step_one = "estimated")for a transition fit, a trajectory model, a staged fit or a fit holding a measurement block fixed.latents_unsupported_bootstrapbootstrap_lrt()was called on a person-centred fit, for which raw data cannot be simulated under the null model because the group baselines were removed before estimation.latents_unsupported_tnaget_tna()orget_group_tna()was called on a general transition fit (anlta()fit with occasion-varying or covariate-dependent transitions, a second order, movers and stayers, or ordinal, count or weighted data), which has no single transition matrix; its transitions are given byget_results(x, "transitions").latents_no_plotplot(x, what = "all")was called on an object whose plot method has no views to draw.latents_no_timeA sequence table or function was requested for a fit made without
time.latents_unsupported_predictionpredict()was called on a membership-covariate fit or a latent transition fit, for which prediction is not implemented; the posterior probabilities of the fitted rows areget_results(x, "posteriors").latents_missing_packageA required package from
Suggestsis not installed. Raised by the plot functions whenggplot2is absent, byget_tna()andget_group_tna()whentnais absent, and bypool_imputations()for amidsobject whenmiceis absent; the message names the package and how to install it.
Plotting
latents_no_continuous,latents_no_categoricalThe requested panel needs indicators of a kind the fit does not have.
latents_nothing_to_describedescriptives()has no variables to describe:varsnamed none, or the frame has no numeric column outsideidandby.latents_nothing_to_plotThe requested panel has no rows to draw.
latents_inaccurate_probabilityNumerical integration for a Lo-Mendell-Rubin p-value did not meet the required accuracy, so the p-value is unavailable.
latents_no_local_dependenceget_results(fit, "local_dependence")on a fit made withoutlocal_dependence.latents_no_direct_effectsget_results(fit, "direct_effects")on a fit made withoutdirect_effects.latents_partial_pairNot raised. A row observing one item of a
local_dependencepair contributes that item, with the pair's other item summed out.latents_no_lmrget_results(x, "lmr")on a grid with no two converged candidates one profile or one group class apart. Also of classlatents_nothing_to_plot.latents_invalid_lmrThe alternative of a nested LMR comparison has a lower likelihood than the null beyond numerical roundoff. The comparison table retains its row with unavailable statistics and the reason in
note; improve the alternative's fit before comparing.latents_no_treeA tree would have fewer than two rows, or the group level of a grid with one group class was asked for. Also of class
latents_nothing_to_plot;get_results(x, "all")leaves the"tree"table out.latents_unsupported_viewA grid function (
plot_enumeration(),plot_selection(),plot_tree()orplot()of a grid) was asked for a view that this kind of grid cannot draw, such as the tree of a group-class family or regression grid. The message gives the reason and the views the grid offers;plot_views(x)lists them. Also of classlatents_bad_argument.latents_unknown_category,latents_unknown_criterionA named category or information criterion does not exist in the fit. An unknown criterion of a grid is also of class
latents_bad_argument.latents_bad_scaleAn unrecognised plotting scale was requested, or
scale = "standardized"met an indicator with zero or undefined standard deviation.
Additional errors, warnings and messages
These conditions report limitations of a returned result or an inability to complete estimation. Message-only conditions are identified explicitly.
latents_failed_startsSome, but not all, EM starts failed. The remaining starts are in
get_results(fit, "starts").latents_not_identifiedmixture_regression()with a binary outcome and one trial per class assignment, where a mixture of Bernoulli regressions is not identified; a repeated categorical mixture exceeding the distinguishable response-pattern capacity; or a growth specification whose random/residual covariance decomposition is rank deficient on the observed occasions.latents_missing_datamixture_regression()withmissing = "error"met a missing value in a variable the model uses.latents_rows_droppedmixture_regression()withmissing = "omit"dropped incomplete rows; the message states how many.latents_no_valid_startEvery
mixture_regression()start degenerated: a class emptied or its variance collapsed.latents_degenerate_startSome
mixture_regression()starts degenerated and were set aside.latents_separationA
mixture_regression()logit or log-link coefficient diverged (perfect separation); it and its standard error are unreliable.latents_em_decreaseThe
mixture_regression()EM likelihood decreased beyond rounding error. This indicates a defect and should be reported.latents_unconvergedThe selected start did not satisfy the convergence criterion before
max_iter, or an inference check found a non-negligible score. The returned estimate requires further assessment.latents_boundaryA variance, or a covariance eigenvalue, is at
min_variance, or an initial, transition or group-class probability of a transition fit is at its bound, so the fit is bound-active and its standard errors are not valid at that parameter. Also a warning fromthree_step(method = "ml")when a class probability of a categorical outcome is estimated at 0 or 1 (the estimates are reported without standard errors, intervals or tests), or when a class variance of a numeric outcome reached its lower bound.latents_atomic_groupsUnder
centering = "person"withscaling = "person", some groups have fewer than three observations of an indicator. Standardizing two values within a group makes them exactly-1/sqrt(2)and1/sqrt(2), so those rows carry only a sign pattern, and a profile can collapse onto them. The message gives the share of rows in such groups. When every group is like that, the fit is refused withlatents_bad_datainstead.latents_small_classesA profile or group class has an effective membership below one observation; or, in
three_step()with anymethod, a class is carried by a single unit (fewer than 1.5 effective carrying units, by Kish's formula), so its standard error is reported asNA.latents_cross_level_criteriaA cross-level fit has group classes. Its likelihood counts the ratings twice, so its criteria do not choose the number of group classes or the form.
latents_unweighted_descriptivesdescriptives()received a fit with sampling weights. Its table describes recorded rows without weights, including zero-weight rows, and its ICC is unweighted.latents_thin_profilesA Gaussian component with free variances of its own has posterior membership mass below the number of free parameters in its Gaussian density. This is a heuristic prompt to inspect the solution, not a proof of singularity or nonidentification. Covariances held at zero and held means are excluded, and held variances do not trigger it. Memberships use normalized sampling weights and only rows with an observed Gaussian indicator; this mass is not an independent sample count or a weight effective sample size. Transition models check occasion-specific measurement separately; cross-level models check both Gaussian levels. The estimate is returned unchanged. See
get_results(fit, "gaussian_diagnostics")for continuous covariance and support diagnostics; none supplies an automatic spike classification or an identification guarantee.latents_all_starts_boundaryboundary = "exclude"found every start with a variance atmin_variance, so none was set aside and the best start across all of them is reported.latents_weak_classmultilpa(family = "additive")only: a group class is supported by fewer than 50 effective groups (seeeffective_groupsinget_results()), because it is small, poorly separated, or both. Standard errors are reported, but intervals for class means and weights may be miscalibrated.latents_failed_replicatesSome bootstrap replicates failed validation, so the bootstrap p-value is
NA.latents_single_levelA message, not a warning:
id = NULLwas passed, so the fit has one observation per unit and no second level. Raised bymultilpa()on every such fit and once by anenumerate_classes()grid;suppressMessages()or alatents_single_levelhandler silences it.latents_single_startA message, not a warning: one or more converged candidates of an
enumerate_classes(),enumerate_lpa()orenumerate_lca()grid, fitted from two or more starts, reached their best log likelihood from one start only, so a higher maximum may exist that no start found. The message names them; refit those you consider with moren_starts. Raised once per grid.latents_bootstrap_droppedSome resamples did not produce a usable fit and were excluded from the interval. Raised by
parameter_inference(method = "bootstrap"); the message states how many.latents_sensitivity_droppedOne or more seeds did not produce a fit in
sensitivity(). Their rows areNA, and the warning states how many failed and the first reason.latents_extreme_coefficientsA membership logit coefficient is extreme after adjustment for covariate location and scale. This may indicate separation or sparse class membership and requires inspection before interpreting the coefficient or its standard error.
latents_empty_transition_rowA profile is never occupied before a final occasion, so its transition row is uniform by construction rather than estimated;
get_results(fit, "transitions", estimated = FALSE)lists such rows. The generallta()engine raises it too, for an origin profile (or pair, underorder = 2) that no move leaves: its logits are fixed at zero and markedestimated = FALSEinget_results(fit, "transitions")andparameter_inference(). In both engines such a row is not counted inn_parameters, AIC or BIC. The transition-network handoff also warns when it includes such a row.latents_weak_transition_supportA transition origin has positive but less than one expected outgoing move. Its formal parameters remain counted, but its rows are marked
supported = FALSE, their expected counts are reported, and Wald inference is refused. This diagnostic threshold signals weak information rather than structural identification.latents_unidentified_occasionAn
lta()fit withtransitions = "occasion"has an occasion at which no row observes an indicator, followed by an occasion that does. The moves into and out of the empty occasion (or, for an empty first occasion, the initial distribution and the first move) enter the likelihood only through their product, so their logits are not separately identified: the distinct parameter combinations yield the same likelihood. Their standard errors are not interpretable, although the parameter count includes them. Occasions after the last observed one are not counted and do not warn.latents_unverified_alignmentA supplied
dataframe has too little fitted information to verify row order (for example only a repeated group identifier). The result assumes the rows are in fitting order.latents_random_boundaryA growth mixture's random-effect covariance is degenerate in a class (a variance at its floor, or perfectly correlated random effects), or, with
residual_correlation, the residual variance, process variance or process rate is on its bound; the standard errors of those parameters are not reported.latents_singular_covarianceA growth mixture with correlated residuals met a marginal covariance that is numerically singular (a process variance far larger than the residual variance). During fitting this is treated as a rejected step; it reaches the caller only for parameter values supplied explicitly.
latents_unused_argumentA method that accepts
...(severalplot()methods,summary()of the fits and grids whose summary takes nolevelorvcov_type,vcov(),predict()anddescriptives()of a data frame) was given an argument it does not use, ormultilpa()orlta()was given acount_modelorcount_dispersionthat changes nothing (nocountindicator, or a dispersion option for a Poisson model). The call proceeds and the warning names the argument.latents_unused_categoryAn ordinal indicator is a factor with levels never observed in the data. Their intercepts diverge, so Wald inference is refused; call
droplevels()before fitting. It is a warning rather than an error because bootstrap refits keep the fitted categories.latents_no_standard_errorsA message, not a warning: a table that includes standard errors by default could not compute them for this fit (a bound-active or unconverged fit, singular information, or a family or noise component without inference), so they are
NAand the message gives the reason. Passingdatatoget_results(x, "profiles")or"responses"raises the underlying condition instead.
Examples
fit <- lpa(faithful, c("eruptions", "waiting"), n_profiles = 2,
n_starts = 2, seed = 1)
# A fit made without `time` has no sequences; handle that by its class.
tryCatch(get_results(fit, "sequences"),
latents_no_time = function(condition) {
"No occasion ordering was specified for this fit."
})
#> [1] "No occasion ordering was specified for this fit."
# Every condition of the package can be caught and inspected the same way.
tryCatch(three_step(fit, faithful, "eruptions"),
latents_bad_outcome = function(condition) conditionMessage(condition))
#> [1] "`eruptions` helped define the fitted classes, so it is not a distal outcome."
