exametrika 2.3.0

New: rank-up odds and RankUpShift for the ordinal Ranklustering

The ordinal Biclustering(method = "R") (isotonic and GTM) now returns in Students the rank-up and rank-down odds that the binary and rated Ranklustering and LRA() already gave: the membership of the next rank up (down) over that of the estimated rank, NA at the top (bottom) rank. The columns are appended after Estimate, with the same names as in the binary fit; plain Biclustering (method = "B") is unchanged.

RankUpShift is new: for each step from rank c to c + 1, each field and each category boundary b, the increase of P(X >= b) in the field reference profile. It shows which boundary of which field moves when a respondent goes up one rank. Under the isotonic estimation it is non-negative (values within the solver’s tolerance of 1e-6 below zero are set to 0); under GTM a negative entry is an order violation and is kept. The boundaries are named by the raw response codes.

plot() gains two types for the ordinal Ranklustering, drawn with base graphics: "RankUpShift", one heatmap panel per field (rows are the rank steps from top to bottom, columns the boundaries, values of 0.05 and more written in the cells, decreases shaded blue), and "RankOdds", box plots of the two odds by estimated rank on a log axis with a dashed line at 1.

Bug fix: M2() with missing responses

M2() (LCA, LRA, Biclustering, and the independence baseline that add_M2() compares against) computes the observed margins over the respondents who answered the item or item pair, but scaled their covariance by the total number of respondents. With missing cells that understated the variance and inflated the statistic: with 10% of the cells missing at random a correct nominal LCA gave a mean of 146.7 against 81 degrees of freedom and was rejected at 5% in 97% of 200 replications. The covariance of margins a and b is now scaled by n_ab / (n_a n_b) – the number who answered the items of both over the product of the numbers who answered each – which assumes the responses are missing completely at random. After the fix the same simulation gives 82.0 against 81 and 6.5% (Biclustering with estimated weights: 118.2 against 117 and 7.5%). Adding respondents whose every response is missing no longer changes the statistic (before, 100 empty rows added to 300 inflated it by exactly 400/300). With no missing cell the computation is unchanged to the bit. M2() values, and the margin-based fit indices of add_M2(), change for every fit with missing data, including the bundled J20S600 and J5S1000 (60 and 26 missing cells).

New: BIC_elbo, a BIC on the observed-data log-likelihood

Every model that reports elbo now also reports BIC_elbo = -2 elbo + k log N, where k counts the reference-profile (or block) parameters plus the class weights when they were estimated. GridSearch() accepts index = "BIC_elbo". The default BIC in TestFitIndices is Shojima’s: a chi-square against the benchmark model built on the expected complete-data log-likelihood. The two can disagree on the number of classes; on the checklist data below the default BIC keeps falling with ncls even with estimated class weights, while BIC_elbo turns up after five classes.

New: ICL_exact, the integrated completed likelihood without approximation

LCA(), LRA() and Biclustering() now return ICL_exact next to ICL. ICL is the BIC-type approximation of Keribin et al. (2015); ICL_exact is the criterion itself: the item or block parameters are integrated out under the prior of the fitted model (the Dirichlet or Beta of the estimation, flat by default) and the memberships are the hard assignments of the final posterior, reported on the -2 log scale of AIC and BIC. The class term uses the model’s mixing weights (-n log C, or the estimated weights with mixing = "estimate") and the field term -J log F. Nothing is counted, which is the point for the isotonic models: their effective number of parameters depends on the data, so a parameter-counting penalty has no clean value there.

For an order-restricted (isotonic) fit the prior of a field (or item) is the Dirichlet restricted to the region where the upper-cumulative probabilities are non-decreasing across ranks, and by the encompassing-prior identity (Klugkist, Laudy and Hoijtink, 2005) the restricted marginal is the unrestricted one times the posterior-to-prior probability ratio of that order. The prior probability is exact under the flat prior: the region is the order polytope of a product of two chains, whose volume follows from the hook-length formula (for binary data it is 1/C!). The posterior probability is a Monte Carlo estimate on a private random stream that leaves the global one untouched (seeded by seed where the model has one); ICL_exact_se is its standard error on the -2 log scale, 0 for an unordered model. For binary data it is a particle chain that adds the rank constraints one at a time with each step exact in the Beta distribution (10,000 particles, nothing rejected). For polytomous data it is importance sampling: the draws come from Dirichlet proposals centred on the order-restricted estimate, with the posterior’s concentration, the constraints are again added one at a time, and the path weights correct for the proposal; 20 batches of 2,000 draws, rerun with 10,000 and then 100,000 per batch where a batch came back empty or the standard error exceeded 0.25 on the log scale. The cheap first round settles a clearly ordered field (most items of a well-fitting model) at a fifth of the cost; a field that does not settle there goes through the same 10,000 and 100,000 rounds as before. A plain particle method drawing from the posteriors – the first implementation – collapses exactly where it matters: when the block counts run against the order, no draw satisfies it and the result is capped, and even uncapped it overstated ICL_exact by 2 to 12 at the median and up to 70 to 140 on the -2 log scale for 8 to 10 ranks. The importance sampler was checked against numerical integration (40 settings, log P from -0.7 to -42), a direct count (20 settings), and a 258-dataset simulation grid of ordinal Ranklusterings (C and F from 2 to 10, 20,322 fits, 100,000 draws per batch): every batch came back empty in 3 fits and some batches in 25, all far from the selected settings, and the selected (C, F) was the same as with the particle method in all 258 datasets. When every batch is empty even at 100,000 draws, the particle method takes over, a warning is given, ICL_exact_se is NA and ICL_exact is a lower bound; when only some batches are empty, a separate warning says the standard error may understate the error. ICL_exact_status records which case applies – "ok" (converged, or exact for an unordered model), "thin" (some batches empty) or "bound" (not converged, a lower bound) – so a value is always returned and its standing can be read off the fit; print() adds a line when it is not "ok", and GridSearch() collects the "bound" cells. With a non-flat prior the prior probability is estimated by the particle method. GTM and SOM fits have no prior model and return NA. GridSearch() accepts index = "ICL_exact".

When a bound occurs the warning names the fields (or items) and the order of magnitude reached, since the cause is local: the block counts of the hard assignment run against the rank order in those fields. GridSearch() keeps that warning quiet over the grid and instead lists the settings concerned once (bound_settings, bound_matrix / bound_vec, and in print()), because a bound is not a value to compare.

Related: the BIC-type ICL and BIC_elbo now penalise every parameter with log n (the package’s sample size, as in BIC) and use the model’s mixing weights in the completed log-likelihood; until 2.2.0 ICL penalised the block parameters of a biclustering with log(nJ) and used the empirical proportions of the hard assignments with (C - 1) log n and (F - 1) log J. The values change; the ranking of models usually does not.

Minor

Fit indices of the ordinal and rated LRA use the number of respondents

The RMSEA, CAIC and BIC of LRA() on ordinal and rated data used, as the sample size, each item’s number of observed responses in the item fit indices and their total over the items (34,290 for J15S3810, whose respondents number 3,810) in the test fit indices. Every other model, and Shojima’s reference implementation, uses the number of respondents, which LRA() now does too; with no missing data the item indices are unchanged and the test indices move. On J15S3810 all eleven test and item fit indices now agree with the Mathematica reference. AIC, the chi-square and the relative indices (NFI to CFI) never depended on it.

Unknown arguments are reported instead of ignored

LCA(), LRA(), Biclustering() and Biclustering_IRM() take ... so that S3 dispatch can pass the arguments on to the method for the response type. Anything that method did not use was silently dropped, so Biclustering(U, dataType = "rated") (for response.type = "rated") or LCA(U, ncls = 3, maxiterations = 50) ran with the defaults and no sign of it. The terminal methods now warn, naming the arguments they ignored. The deprecated max_iter of Biclustering_IRM() keeps its own message. Biclustering() on nominal data accepts method = "B" (it was documented but not an argument) and refuses method = "R" with a message, since nominal categories have no order to rank.

New: equate() puts a new test form on the scale of a fit

equate(fit, newdata) takes responses to a form that shares some items with the fitted test (the anchor items) and contains items the fit has never seen. The parameters of the fit are held fixed, so the new respondents are placed in its classes or ranks through the anchor items, and the new items are placed on the same scale: for Biclustering() and Ranklustering (binary, nominal, ordinal, rated) each new item is assigned to one of the existing fields; for LCA() (binary, nominal, rated) and LRA() (binary, ordinal, rated) the reference profile of each new item is estimated, under the order restriction of an isotonic fit or with the filter of a GTM fit. For a rated fit the correct answers of the new items (CA, or those of an exametrikaData newdata) pick their correct-response profiles out of the category profiles. The two unknowns are updated alternately, starting from the anchor items alone, until the membership settles. This is the discrete analogue of fixed-parameter calibration; no linking transformation is involved because the scale is the rank itself.

A biclustering fit cannot give a new item a field of its own, so NewFieldLogBF reports, for each new item, the log Bayes factor of “a field of its own” (the block parameters integrated out under the prior of the fit, as in ICL_exact) against “one of the existing fields”. Because even a fitted item departs measurably from its field profile once the respondents are many, the same quantity is computed for the anchor items of the new data (AnchorLogBF), and a new item is read against that range. Estimating the profile of a new field is left to a later version.

as_biclustering(FRP, fields) builds, from a field reference profile and the field of each item, the minimal object that equate() and predict() accept, so that a form can be equated from published values alone.

New: mixing = "estimate" lets LCA(), LRA() and Biclustering() estimate the class weights

Binary LCA(), LRA() (isotonic and GTM methods) and binary Biclustering() (Biclustering and Ranklustering, isotonic and GTM) gain mixing = c("equal", "estimate"). The default "equal" keeps every class or rank at 1/C, which is the model of Shojima (2022) and reproduces every earlier result. With "estimate" the M-step updates the weights as the mean posterior membership, the E-step and the observed-data log-likelihood use them in place of 1/C, C - 1 parameters are charged to the test fit indices (the item indices are untouched), predict() applies them, and they are returned as ClassWeight / RankWeight and shown by print(). With complete data the LCA fit agrees with the poLCA package (the test compares against frozen reference values; that package is not a dependency). In biclustering only the class side is estimated; the field weights stay at 1/F, and the weight term is added to the quantity the EM monitors so that the stopping rule covers the weight update (with equal weights nothing changes). A weakly identified fit, such as one where every item lands in one field, can take over a thousand cycles to converge; raise maxiter.

This is the remedy for the duplicated classes described in the next entry: on the nine-item depression checklist that prompted it (82% all-zero patterns), "equal" spends three of five classes on the all-zero profile and its BIC keeps falling with ncls, while "estimate" gives four or five distinct profiles with weights 0.90/0.05/0.03/0.02 and a BIC_elbo that turns up after five classes.

The polytomous Biclustering() – ordinal (Biclustering and Ranklustering, isotonic and GTM, with or without mic), nominal and rated – takes the same argument, on the class side only. The default "equal" leaves those fits unchanged to the bit (every element checked with identical() against the previous code on ordinal, nominal and rated fits, including conf_class, mic and init = "legacy"). With "estimate" the weights enter the E-step, the ELBO the EM monitors, BIC_elbo, the BIC-type ICL, the assignment term of ICL_exact (sum n_c log w_c) and predict(); C - 1 parameters are charged to the test fit indices (ordinal) or to AIC/CAIC/BIC (nominal); mic and the rated fit’s sorting by correct rate carry the weights along with the classes. Polytomous LCA and ordinal and rated LRA keep the fixed weights for now.

M2() and add_M2() accept such a fit. The estimated weights replace 1/C in the model-implied margins and in their covariance, and the C - 1 free weights add columns to the Jacobian (the derivative of a margin with respect to w_c is the difference of the class products of classes c and C), so n_param counts them; with fixed weights the computation is unchanged to the bit. The analytic Jacobian agrees with a numerical one, the covariance with a Monte Carlo one, and under data generated with unequal weights the statistic of the plain Biclustering followed its chi-square reference (500 replications: mean 117.0 against 117 degrees of freedom, 6.0% rejected at 5%; a larger design, 300 replications: mean 593.7 against 597, 3.3%; the nominal fit, 300 replications: 117.5 and 4.3%). The weight columns do not raise the rank of the Jacobian: up to second-order margins a change of the weights can be absorbed by the profiles, so the degrees of freedom are those of the fixed-weight fit, and M2 does not detect weights wrongly fixed at 1/C (in the simulation above such a fit gave a mean of 113.4 against 117).

GridSearch() no longer picks a setting that left a class empty

On data dominated by one response pattern (for example a symptom checklist where most respondents answer no to everything), LCA() with more classes than the data support converges to duplicate reference profiles: several classes carry the same profile, the MAP assignment goes to the first copy, and the latent class distribution shows zeros. The fit index of such a fit describes a model with fewer effective classes than requested, yet it kept improving with ncls and GridSearch() reported, say, 14 classes of which 11 were empty. GridSearch() now records every converged fit index as before but, with the new skip_empty = TRUE (default), a setting whose fit has a zero in LCD, LRD or LFD is not eligible as the optimum; the settings are listed in the result (empty_settings, and empty_vec or empty_matrix) and in print(). If every converged setting is of that kind the optimum is chosen among them with a message. skip_empty = FALSE restores the old selection. The result also keeps the name of the index and of the analysis function (index, fun).

Why this happens: the latent classes of LCA() share a uniform prior (there is no class-size parameter, following Shojima, 2022), so the only way the model can give one profile most of the population is to spend several classes on it. The duplicates are the estimate of a class weight in disguise, which is why the likelihood keeps rising. The same data give a negative model_df once ncls exceeds the number of distinct total scores, because the benchmark model has one parameter per score group and item.

igraph is no longer used in the computations of the network models

BNM(), BNM_GA(), BNM_PBIL(), LDLRA(), LDLRA_GA(), LDB() and BINET() now do their structure checks (acyclic, weakly connected) and their conversions between edge lists, files and adjacency matrices on the adjacency matrix itself (R/00_graph_base.R: Kahn’s algorithm for cycles, breadth-first search for connectivity). igraph is called only to read a graph object given as input and to build the g, g_list and all_g elements of the result, which are kept for compatibility and will be replaced by adjacency matrices in 3.0.0. Results are unchanged; the tests compare the new functions with igraph on random graphs. Together with the base-graphics network plots this is the first step of dropping the igraph dependency.

Bug fix: network plots no longer draw two items on one spot

The graphs printed for BNM(), BNM_GA(), BNM_PBIL(), LDLRA() and LDB() took a grid layout and reordered its x coordinates by out-degree and its y coordinates by correct response rate separately, so the pairs were recombined at random and two items could land on the same point; on a nine-item depression checklist only eight nodes were visible, and edges ran across other nodes. The graphs are now laid out in layers with parents above children (longest-path layering with barycenter ordering, the Sugiyama heuristic), every node has its own position, the nodes are large enough to carry the item label, and the arrows end at the node border. The BINET total graph is drawn the same way, with the field written on each edge, instead of a force-directed layout. The drawing is done with base graphics from the adjacency matrix; igraph is no longer used for printing (a step of the plan to drop that dependency in 3.0.0). BINET() returns the edge list behind all_adj as all_edges.

Bug fix: the binary IRM no longer double-counts a respondent who opens a new class

In the Gibbs sampler of the binary Biclustering_IRM(), when a respondent opened a new class, the class-by-field count tables were rebuilt with the respondent already in the new class and the respondent’s counts were then added once more. The new class therefore carried one extra copy of its founder until the next rebuild, which made it more attractive to the respondents sampled after it. The Mathematica original inserts an empty row for the new class and adds the founder once, and the R code (since its first version in 2023; the polytomous IRM was never affected) now does the same. The final profiles and fit indices were always computed from the final assignment, so only the path of the sampler was wrong, but that path decides where it settles: for a given seed the number of classes and fields and the assignment can differ from 2.2.0 (on J15S500 with the default seed, 8 classes and 3 fields instead of 9 and 5).

Bug fix: class, rank and field sizes no longer double-count a tie

LCD, LRD and LFD (and the clsdist/flddist behind TRP) counted each respondent or item in every class whose membership probability was equal to the row maximum, by way of sign(memb - rowmax) + 1. When two classes carry the same reference profile, which is exactly what happens on data dominated by one response pattern, every respondent ties between them and the sizes summed to more than the sample (for example 825, 825, 825, 17, 158 for 1000 respondents and five classes). The sizes are now the counts of the MAP assignment, with ties going to the first class as the Estimate column already did; a tied duplicate class therefore shows the zero that GridSearch() now acts on. All models that report these sizes (LCA, LRA, LDLRA, LDB, BINET, and binary, ordinal, nominal and rated Biclustering with and without the IRM) share one helper. Values are unchanged whenever there is no exact tie.

Bug fix: the binary EM keeps a profile that lost all its support

In emclus() a class whose posterior probability fell to exactly zero for every respondent, which a long test can produce, had a zero denominator in the M-step under the flat prior and wrote 0/0 into the reference matrix, from which the whole fit became NaN. The previous profile of such a class is now kept. Values are unchanged otherwise.

New: plot() for a GridSearch() result

plot() on a GridSearch() result draws the fit index against the number of classes or ranks (type = "Fit", the default and only type). For Biclustering one line is drawn per number of fields, or a surface with style = "persp". Settings that failed to converge are left blank, settings that left a class, rank or field empty are open triangles, and the optimum is a filled red point.

RMSEA no longer warns on a non-positive model_df

calcFitIndices() set RMSEA to NaN when model_df <= 0 but took the square root first, so every such item raised “NaNs produced”. The root is now taken only where the degrees of freedom are positive; values are unchanged.

dataFormat() points out an ordinal item that may be reverse-keyed

With response.type = "ordinal" (given or detected) dataFormat() now computes the correlation of each item with the sum of the other items, and when it is negative prints a message naming the item. A negative item-rest correlation is the usual sign of an item keyed in the opposite direction, which an order-restricted analysis (isotonic LRA(), Ranklustering) cannot accommodate. The data are returned unchanged; the fuller examination is MonotonicityCheck(). The quantity is ItemCORR_R of ItemReport().

ManifestMonotonicity() and MonotonicityCheck() keep stopping when the default minsize (50 below 150 respondents, as in mokken) exceeds half the sample, which happens below 100 respondents. Such a sample is too small for the rest-score regression at its default resolution; pass minsize deliberately if the check is still wanted.

New: MonotonicityCheck() before an order-restricted analysis

MonotonicityCheck() gathers the checks that an isotonic analysis takes for granted. For each item it reports the item-rest correlation, the first-component loading, Hj and the violations of manifest monotonicity, and flags items as reverse?, non-monotone or weak (Hj below 0.3). Two features make the flags trustworthy. (1) The rest score is built from a reference set that starts from the items loading in the majority direction and loses the worst flagged item one at a time, so a reverse-keyed item no longer distorts the yardstick for the sound ones (unrecoded, the bfi extraversion items all show violations; checked this way only E1 and E2 do). (2) With fields, each subscale is checked on its own; pooled over the five bfi factors, the reverse-keyed items stay hidden. The function only reports.

New: Scalability() computes Loevinger’s H coefficients

Scalability() returns the scalability coefficients of Mokken scale analysis for ordinal, binary and rated data: the item-pair coefficients Hij, the item coefficients Hj and the test coefficient H (Loevinger, 1948; Molenaar, 1991, for polytomous items). Each is a normed covariance, so a negative value flags a reverse-keyed item that has not been recoded, or an item whose relation to the others is not monotone. Missing responses are handled pair-wise. With complete data the results agree with mokken::coefH() to machine precision; the tests compare against frozen reference values, and mokken is not a dependency. Standard errors are not computed. This is the first piece of a planned check of unidimensionality and monotonicity to run before an order-restricted (isotonic) analysis. print() shows the test H with Mokken’s rule of thumb, flags items with a negative or below-0.3 Hj, and lists the item-pair matrix.

New: ManifestMonotonicity() checks monotonicity by rest-score regression

ManifestMonotonicity() checks, item by item, whether the proportion reaching each category rises across rest-score groups (manifest monotonicity; Molenaar & Sijtsma, 2000; van der Ark, 2007). It reports, per item step and per item, the active pairs, violations larger than minvi (default 0.03), the largest and summed violations, and a normal-approximation z for each violation (Molenaar & Sijtsma’s statistic, one-sided 5%). Rest-score groups and the default minsize follow the mokken package; respondents with missing responses are dropped listwise with a message. A single-peaked item, which the item-rest correlation and Scalability() show only as weak, appears here as significant violations. With complete data the output agrees exactly with mokken::check.monotonicity(); the tests compare against frozen reference values, and mokken is not a dependency.

Dimensionality() returns the loadings on the first component

Dimensionality() gains a first_loading element: the loadings of the items on the first principal component of the tetrachoric (binary, rated) or polychoric (ordinal) correlation matrix. The eigenvector’s sign is oriented so the loadings sum to a positive value; an item with the opposite sign is a candidate for a reverse-keyed item that has not been recoded, and print() lists such items. The four existing elements are unchanged.

Bug fix: AlphaCoefficient() and OmegaCoefficient() accept ordinal data

Given ordinal data, both functions stopped with “Function PhiCoefficient is not applicable to ordinal response data”: the data-matrix path always built the phi and tetrachoric matrices, which exist only for binary items. Ordinal data now return AlphaCov/OmegaCov (covariance of the category scores) and AlphaPolychoric/OmegaPolychoric (polychoric correlation matrix; the polychoric alpha is the ordinal alpha of Zumbo et al., 2007, and agrees with psych::alpha() on psych::polychoric() to six decimals on the bfi neuroticism items). Binary data still return the three historical components. Rated and nominal data are rejected with an error that names the function called.

Documentation

exametrika 2.2.0

New: predict() classifies new respondents with a fitted model

predict(fit, newdata) holds the estimated parameters (and, for biclustering, the field memberships of the items) fixed and runs one E-step on new responses, returning the membership probabilities, the estimated class or rank and each respondent’s log-likelihood. It covers LCA() (binary, nominal, ordinal, rated), LRA() (binary, ordinal, rated) and Biclustering() / Ranklustering (binary, nominal, ordinal, rated). Items are matched by name, missing responses are left out of the likelihood, and a response in a category the fitted data never used for that item is treated as missing with a warning. On the data the model was fitted to it reproduces the stored membership.

To make this possible the fits now record how they coded the categories: CategoryMap (the raw codes behind each item’s renumbered categories) in the nominal, ordinal and rated LCA() and LRA(), CategoryShift in the nominal and ordinal Biclustering(), and LogPrior (the rank prior set by trapezoidal) in the ordinal and rated LRA(). Fits made with earlier versions lack these; predict() asks for a refit where it cannot rebuild them.

Breaking change: memberships are the posterior under the returned parameters

LCA(), the binary LRA() (GTM and isotonic) and every Biclustering() returned the class posterior of the last E-step, which was computed from the parameters of the previous cycle; the parameters themselves then moved once more. The membership and the parameters returned did not belong together, and an E-step with the returned parameters on the same data did not reproduce the membership. Each now runs one more E-step after the loop with the final parameters (the ordinal and rated LRA() and the SOM already did). Memberships, class estimates and the fit quantities built on them move slightly.

When the biclustering EM stops because its objective decreased, it restored the reference profiles of the previous cycle but kept the new field (and, for the nominal and ordinal data, class) memberships. All are now rolled back together. On J35S515 (binary Ranklustering, GTM, 6 x 5) the field memberships of a few items and the fit indices change (log-likelihood -7273.06 to -7273.90). Shojima’s Mathematica reference implementation had both defects; it was corrected in step and the reference fixtures regenerated.

Model comparison: evidence lower bound, marginal likelihood, entropy, ICL

Every latent class, latent rank and biclustering fit now carries four additional quantities for model comparison (elbo, log_lik_marginal, entropy, ICL; rated models report the nominal layer with the suffix _nominal). Their definitions are documented in the return value of each function and in R/00_VariationalFit.R:

Breaking change: ordinal biclustering starts from the data (init)

The default fit of Biclustering() on ordinal data changes. The EM is deterministic but converges to a local optimum, and the start used up to now (fields = items split by their median, block probabilities = a ladder common to every field) stopped at one in over 80% of simulated data sets. The new argument init chooses the start:

"auto" also adds nstart random starts (default 10; seed sets them, and the session’s random number stream is left untouched). The two data-based starts always run to convergence, so the random starts can only raise the ELBO; the random starts are run for 100 EM cycles and only the best 3 continue. A random start has random classes; its fields are conf if given, and otherwise those of the "quantile" start for half of the starts and random for the other half. On real data the likelihood surface often had many more local optima than in simulations, and the data-based starts alone were often beaten by random ones; raise nstart for such data. In a simulation of 10,800 data sets, nstart = 50 reached a larger ELBO than the default in 29% of the fits (57% of them with 7 or more classes) while the recovery of the true classes hardly changed (mean ARI within 0.005); ?Biclustering now says to raise nstart for fits with many classes.

In "quantile" and "ward" the fields start from a Ward clustering of the items’ class-mean profiles (centred per item), and the block probabilities from the category frequencies of each block. Both starts are invariant to the order of the rows. In simulations they reached the level of a start at the true partition: "quantile" under equal class sizes, "ward" under unequal ones, and "auto" under both, at about the cost of one legacy fit. With conf the given fields are kept, and with conf_class the given classes are the single start. The fit records init, init_selected and init_elbo.

Breaking change: ordinal biclustering judges SOAC/WOAC on the model

The isotonic fit of ordinal Ranklustering constrains the field reference profiles, but SOACflg and WOACflg were judged on a test reference profile built from data-weighted counts, which the constraint does not reach. A single dip from sampling noise turned SOAC off even when every FRP was monotone, and more often with more ranks. TRP of Biclustering() (ordinal) and Biclustering_IRM() (ordinal) is now computed from the model, as for binary and rated data: the sum over fields of field size times the field expected score. A monotone FRP thus gives a monotone TRP, and the isotonic fit always satisfies SOAC. The checks allow the feasibility tolerance of the isotonic step (1e-6). The profile from the data is returned as TRP_empirical (mean observed score of the class members, summed over fields); its departure from TRP shows how far the model is from the data. TRP values change.

Breaking change: category codes are no longer renumbered per item

Up to now the polytomous biclustering models renumbered each item’s observed categories to 1..k, so on an item where nobody chose a category the codes above it moved down. Since 1.15.0, Biclustering() and Biclustering_IRM() on nominal, ordinal and rated data did this through remap_category_codes(), which was meant only to make 0-based codes usable. In these models the items of a field share the block’s category probabilities, so code q must mean the same category on every item; on an item whose lowest category was empty the renumbering misaligned every response of that item with the rest of its field. This is common in practice: in simulated data most data sets had an item whose bottom category was empty.

Breaking change: nominal and ordinal biclustering report the ELBO

The log_lik of Biclustering() and Biclustering_IRM() on nominal and ordinal data, and the AIC, BIC and CAIC built on it, change. Up to 2.1.0 these reported sum_sj log sum_fc m_jf m_sc pi_fcq: the probability of each observed cell under a mixture of the block probabilities weighted by that respondent’s and that item’s posterior memberships. That is the likelihood of a mixed-membership model with the memberships plugged in as free parameters, not of the mixture model being fitted, and it is not the quantity the EM ascends. Because the plugged-in memberships are never counted in the penalty, BIC on this quantity favours more blocks the larger the sample, which is what a simulation study of the grid search showed (over-selection of the number of classes rising with the number of respondents). The reported value is now the evidence lower bound, which the EM also monitors for convergence. The binary implementation keeps the expected log-likelihood of the reference implementation (Shojima, 2022) as its log_lik; the new fields are added alongside it there, so its fit indices are unchanged.

Consequences for ordinal and nominal data:

Missing data: one convention, and the places that broke it

dataFormat() now stores a missing cell as 0 in U (binary and rated data) and keeps the indicator in Z; Q (polytomous data) still carries -1. Until 2.1.0 U held -1 for a missing cell, and every routine that summed U without masking it by Z counted each missing cell as minus one correct response. The audit before this release found that in the binary LCA and LRA cores (emclus(), emclus_isotonic(), somclus(), item_log_lik()), in BNM(), LDLRA(), LDB() and BINET(), and in the quantile reference of rated LRA(). With the new convention those sums are right by construction. Independently of the sentinel, the following counted a missing cell as an incorrect response or divided by the wrong count and are corrected:

Estimation bugs found in the pre-release audit

Bug Fixes

Other

exametrika 2.1.0

A minor release. The estimates returned by LRA(method = "SOM") change, so the fixes below could not ship as a patch. They came out of reading the R code against the Mathematica routine it was ported from (Module_LRA.wl): the port had grown a seed argument and a convergence report that the original never had, and had moved the monotonicity sort to the end of each epoch.

Bug Fixes

Performance

Internal

exametrika 2.0.1

A patch release: two bug fixes, no new features and no change to any estimate. Released on GitHub only (2026-08-25); these fixes reached CRAN with 2.1.0.

Bug Fixes

Performance

exametrika 2.0.0

The version number was raised to 2.0.0 because the EM convergence fix below changes the estimates of every EM-based model: the same code on the same data now returns different numbers, and no longer the numbers printed in Shojima (2022). A minor bump would have understated that. The deprecation removals planned for 2.0.0 ride along, so that the break happens once.

Removals (breaking)

The names deprecated in earlier releases are gone. Each carried a deprecation warning for several releases: the function renames since 1.7.0, the field-name aliases since 1.8.0.

Functions removed, with their replacements:

Removed Use instead
IRM() Biclustering_IRM()
StrLearningGA_BNM() BNM_GA()
StrLearningPBIL_BNM() BNM_PBIL()
StrLearningPBIL_LDLRA() LDLRA_PBIL()

Field aliases removed from returned objects. The snake_case names have been present alongside them since 1.8.0, so code that already reads the new names is unaffected:

Removed Use instead
$Nclass $n_class
$Nfield $n_field
$Nrank $n_rank
$N_Cycle $n_cycle
$LogLik $log_lik

GridSearch() still accepts "LogLik" as a value for its index argument; that is an input alias for the criterion name, not a field on the result.

Bug Fixes

Performance

Internal (no user-visible behavior change)

Improvements

exametrika 1.15.0

Improvements

API consistency changes

An API audit across all exported model functions surfaced a number of gratuitous inconsistencies in argument names, argument order, and defaults. They are unified in this release; the changes below alter default behavior or (rarely) positional-argument calls, so please review if you relied on the old defaults.

Bug fixes

Removed

Internal (no user-visible behavior change)

Follow-up cleanup after the audit above, consolidating logic that had drifted out of sync across near-identical call sites (the same root cause behind several of the bugs fixed above):

exametrika 1.14.0

Improvements

Bug fixes

exametrika 1.13.1

Resubmission of the 1.13.0 release. The 1.13.0 submission was rejected by the CRAN auto-check service for a single Overall checktime NOTE on r-devel-windows-x86_64 (11 min vs. the 10 min limit). The package itself passed cleanly on both Windows and Debian (Status: OK / OK).

Test suite (no user-visible changes)

exametrika 1.13.0

This release also incorporates the development changes from 1.12.0–1.12.2 (never published to CRAN). Their entries are retained below for traceability.

New features

Documentation and CRAN check cleanup

exametrika 1.12.2

Bug fixes

exametrika 1.12.1

Bug fixes

exametrika 1.12.0

New features

Bug fixes

Performance

Output structure

Tests

Notes

exametrika 1.11.0

New Features

New Data

Bug Fixes

exametrika 1.10.2

New Features

Improvements

Bug Fixes

Improvements

Documentation Fix

exametrika 1.10.1

Vignette Build Time Reduction

exametrika 1.10.0

Bug Fixes

CAIC (Consistent AIC) Formula Correction

GRM Example Fix

dataFormat Robustness Improvements

BINET g_list / adj_list Input Path Fix

Biclustering_IRM.binary S3 Method Consistency Fix

Biclustering_IRM msg Field Fix

Biclustering_IRM.binary Missing LRD Alias

Biclustering_IRM Seed Default

Biclustering_IRM t(apply()) Dimension Drop Fix

Biclustering_IRM Log-Probability Normalization Fix

Biclustering.nominal Model Fit Fix

J20S400 Dataset Fix

New Features

Polytomous IRM (Biclustering_IRM.nominal / Biclustering_IRM.ordinal)

Confirmatory LCA/LRA (Test Equating)

Internal Refactoring: SOM Estimation

Test Suite Modernization

Documentation

Internal Improvements


exametrika 1.9.0

Bug Fixes

GridSearch index Parameter Fixes

Test Tolerance Fix

NAMESPACE Fix

LRA.ordinal / LRA.rated Category Computation Fix

GRM ItemFitIndices Computation Fix

LRA.ordinal Mixed Category Count Validation

LCA/LRA FRP Plot Type Removal

New Features

New Sample Datasets for Polytomous Biclustering

New Plot Types for Polytomous Biclustering

FRPIndex for Ordinal Biclustering

New Parameters for plot.exametrika()

Array Plot Improvements

Documentation Improvements

Return Value Structure Unification

Systematic unification of return value structures across all analysis functions for consistency and interoperability.

snake_case Field Names Extended to All Functions

Top-Level log_lik Added to All Functions

TestFitIndices Structure Unified

Students Matrix Enhanced

Other Structural Improvements

Bug Fixes

Plot Layout Improvements


exametrika 1.8.1

Bug Fixes

dataFormat Function

GridSearch Function

Biclustering.ordinal Function

Impact


exametrika 1.8.0

Naming Convention Improvements

This release improves naming consistency across the package while maintaining full backward compatibility through a deprecation path.

All analysis functions now return results with snake_case field names for better consistency:

Deprecated Field Names (Still Supported)

The old field names continue to work for backward compatibility:

Example Migration

# Old code (deprecated but still works)
result <- LCA(data, ncls = 3)
n_classes <- result$Nclass

# New code (recommended)
result <- LCA(data, ncls = 3)
n_classes <- result$n_class

Output Formatting Improvements

Progress messages now display properly in R Markdown documents:

All progress messages now use proper line breaks instead of carriage returns, ensuring clean output in R Markdown/knitr documents and web documentation.

Bug Fixes

Internal Improvements

exametrika 1.7.0

exametrika 1.6.5

exametrika 1.6.4

exametrika 1.6.3

exametrika 1.6.2

exametrika 1.6.1 on Aug 26, 2025

exametrika 1.6.0 on Aug 12, 2025

exameterika 1.5.2 on March 29, 2025

exameterika 1.5.1 on March 8, 2025

exametrika 1.5.0 on March 5, 2025

exametrika 1.4.4 on March 3, 2025

exametrika 1.4.0 on Feb 25, 2025

exametrika 1.3.0 on Feb 11, 2025

Exametrika 1.2.0 on Jan 30, 2025.

Exametrika 1.1.0 on Oct 30, 2024.

Exametrika 1.0.2 on Aug 17, 2024.

Exametrika 1.0.1 on July 31, 2024.

Exametrika 1.0.0 on June 9, 2024.

Exametrika 0.11.5 on Mar 30, 2024.

Exametrika 0.11.4 on Jan 27, 2024.

Exametrika 0.11.3 on December 15, 2023.

Exametrika 0.11.2 on October 27, 2023.

Exametrika 0.11.1 on October 27, 2023.

Exametrika 0.11.0 on October 26, 2023.

Exametrika 0.10.0 on October 18, 2023.

Exametrika 0.9.0 on October 17, 2023.

Exametrika 0.8.1 on October 10, 2023.

Exametrika 0.8.0 on October 4, 2023.

Exametrika 0.7.0 on October 4, 2023.

Exametrika 0.6.1

mirror server hosted at Truenetwork, Russian Federation.