Nestimate 1.0.12
- New verbs for tables that were reached with
as.data.frame():node_clusters()forhypergraph_cluster(),label_predictions()andlabel_scores()forhypergraph_transduction();state_distribution()accepts the result ofplot_state_frequencies(), andsummary()ofcluster_diagnostics()returns the per-cluster table. Theas.data.frame()methods still work. - New methods:
coefs()for abuild_gimme()fit,summary()forloading_stability(),print()forextract_transition_matrix()andextract_initial_probs(), and acompare_model()default that names the accepted classes. -
print()andsummary()of abuild_mlvar()fit work afterrename_models(). - Errors on bad input carry class
nestimate_bad_inputand name the argument where a base R or deparsed message was shown before, includingmatch.arg()failures in the higher-order, comparison and NCT verbs. - Arguments that were ignored without a word now raise a warning of class
nestimate_ignored_argument(...incooccurrence(),mosaic_plot(),plot_state_frequencies(),build_simplicial(),build_mcml_pc(); shaping arguments ofbuild_mcml()on an existingmcml;sequence_plot()arguments anmcmldoes not read). - New warnings where a result was returned without comment: failed association resamples in
bootstrap_network(), adrop_propthat drops no case incasedrop_reliability(), unconverged factor extraction inbuild_mcml_pc()andloading_stability(), the Katz series fallback inpredict_links(), sequences with a missing group insequence_compare(), a singular neighbour block inpredictability(). - Plots that failed now draw or stop with a clear message:
plot()ofhypergraph_cluster()with more than nine clusters, of a complex without edges, ofcluster_choice()with nothing swept, of a mixture’s covariates afterestimator = "chisq", andprint()of a one-measurecentrality_stability()group. - Printed text corrected: the interval level in
print()ofbootstrap_network()andcertainty()(it always said 95%), edge-label alignment, theboot_glasso()edge-difference subtitle (the colours were described the wrong way round), the covariate line of clustering prints, themcmllayer header, and the permutation note on the smallest attainable p-value. -
hypergraph_transduction(): the help page says when the defaultxi = 0.99over-smooths, and the example passesxi = 0.9. -
trajectoriesis documented as 15 successive courses of a programme. - Help pages of
coefs(),extract_edges(),as_netobject()and the estimator-registry verbs note that idiographic exports the same names.
Nestimate 1.0.11
- Release review: TNA shortcuts keep positional
start/endcalls working;markov_stability()keeps recurrence times for separate closed classes; rectangular numeric sequence matrices acceptbuild_mcml()’sexclude,trimandend. - Help pages rewritten: what each function does, how to read the result, and every argument’s default and errors.
-
build_mlvar(): temporal edges ran from outcome to predictor; they now run predictor to outcome. Tiny p-values are no longer 0, and Nestimate’s own print/summary/plot are used. -
permutation(): glasso shuffles use the same estimator as the observed networks;adjustcorrects over the edges tested, as tna does. -
extract_edges(): keeps negative edges, drops zero-weight pairs, lists undirected edges once. -
build_mmm(): classification error is 1 - mean largest posterior (it was always 0 for k = 2). -
net_prune(): undirected networks are pruned by pair; groups take one bootstrap per network; re-pruning afternet_deprune()works. -
centrality_stability(),casedrop_reliability(): the CS-coefficient no longer depends on the order ofdrop_prop. -
passage_time(),chain_structure(): unreachable targets giveInf; absorption probabilities sum to 1. - Also fixed:
predict_links()weighted Jaccard,cooccurrence(similarity = "relative")(now directed),compare_model(scaling = "max"),extract_initial_probs()on tna models,boot_glasso()settings and failed resamples,cluster_network()dropped arguments, declaredactor/timecolumns read as states,prepare()time zone andis_unix_time. - Input errors carry the class
nestimate_bad_inputacross the package (messages unchanged), so they can be caught by class. -
seed =no longer moves the session’s random stream after the call; results for a given seed are unchanged. -
plot()of anentropy_trajectory()with more than nine groups draws one panel per group instead of failing. - The shortcut verbs name the arguments they used to hide in
...:build_tna(),build_ftna(),build_atna(),build_cna()takeactor,action,time,session;build_cor(),build_pcor(),build_glasso()takeactor,level;build_ising()takesactor;sequence_patterns(),sequence_metrics(),pattern_outcome()takeactor,action,time;compare_mmm()takesbuild_mmm()’s settings (seed,n_starts, …);macro_network()takesscaling,threshold,params. Existing calls give the same results. A wrapper givenmethodsays which method it always uses. - Entropy:
entropy_network()refusesscaling = "share"on a zero-rate chain and"chance"on one state (was a cryptic error), keeps a barecograph_networkanetobject, and warns on a non-ergodic chain astransition_entropy()does;entropy_bayes()networks declare the TNA geometry and acceptwtna()output; grouped results havesummary()(a data frame) andplot();entropy_trajectory()refuses a character time column and labels its axes correctly (row number, numeric column name, nats/hartleys). -
mosaic_plot(residuals = "asymptotic")keeps the residuals of a table with an empty row or column (it set every tile to 0).state_distribution(),plot_state_frequencies()andmosaic_plot()refuse association and one-hot networks instead of counting their values as states. -
compare_model(): undefined edge ratios areNA(wereNaN/Inf), andlogarithmic_rationo longer warns “NaNs produced”. -
build_mcml(method = "density"): within-cluster weights are the sum, matching the macro layer’s sum / (n_i * n_j) (they were the mean). A weight matrix withexclude,trimorendis refused. - Persistent homology: the Vietoris-Rips print counts essential classes and shows the ascending range;
bottleneck_distance()reads a (0, 0) pair as finite, aspersistence_landscape()does. - Also fixed:
evaluate_links()validateskand returns an empty table instead ofNULL;net_centrality()warns when a normalised measure is constant;landscape_trend()validatesiter;network_reliability()refuses a split that empties the second half;boot_glasso()refuses a correlation matrix;path_dependence()refuses a 0/1 matrix;mogen_transitions(min_count = 0)lists only contexts that can follow each other; logical flags such ascombinedrefuseNA;build_hypa()’s message listsnoneonce;compare_networks()errors are alsonestimate_bad_input.plot()ofchain_structure()names each state’s class in its axis label (it coloured the labels, which ggplot2 warns about and which encoded the class by colour alone).
Nestimate 1.0.9
Corrections to 1.0.7, from a review of that release.
-
frequencies()andmagnitude_difference()on an event log withactionnot declared read the log as positions without a word:group_regulation_longgave 14,034 states instead of 9, with timestamps as states. As 1.0.7 said it would, a column calledactionthat is not declared now raises an error of classnestimate_bad_input.convert_sequence_format(),extract_sequences(),sequence_patterns(),pattern_outcome(),sequence_metrics(),stability_landscape()andsequence_plot()had the same fault, from before 1.0.7, and raise the same error. - A frame read with no role declared must now be readable: one column or a numbered run of positions (
T1,T2, …). Any other frame raises an error of classnestimate_bad_inputon every sequence verb, because reading a log as positions turns its ids and dates into states:build_network(human_long, method = "frequency")gave 507 nodes instead of 9. Calls on a wide table with other column names needstate_colsinbuild_network(),colsinfrequencies(),sequence_plot(),distribution_plot(),build_mcml(),stability_landscape(),landscape_surface(),landscape_trend(),sequence_metrics(),sequence_patterns()andextract_sequences(), or a network frombuild_network(state_cols = )inbuild_hon(),build_hypa(),build_mogen(),markov_order_test(),path_counts(),path_dependence(),state_frequencies(),sequence_compare(),association_rules(),build_clusters(),cluster_data(),build_mmm()andcluster_mmm(). The verbs that read every column also refuse a numbered run with anything else beside it, whose values would become states. -
build_mcml()no longer reads column names.from,toandT3… were read as an edge list and the later positions dropped:trajectorieswith two positions renamed went from a macro total of 1,734 to 131. An edge list is declared with the newfrom,toandweight, wide data with the newcolsor as a numbered run. Calls with an edge list need the arguments added. A two-column frame namedV1,V2is now two positions, with inits from its first column. - A declared column that does not exist now raises
nestimate_bad_input:frequencies(),magnitude_difference()andconvert_sequence_format()readaction = "misspelled"as a wide table (38 x 38 states instead of 9 x 9),extract_sequences()ignored a wrongcolsbesideaction, andcooccurrence()ignored a wrongfieldorby.cooccurrence()also refusesfield,byorsepwithout its partner, which it read as a wide table, and any of them on a list. -
build_network()and the verbs that set covariates aside: a numeric column beside a numeric numbered run, such asgradebesideT1,T2, …, became a state: ontrajectoriescoded as numbers it gave 138 nodes instead of 3. It is now set aside as metadata, and every column set aside this way is named in a message. - Positions a verb has resolved read back in: the unnumbered positions that
extract_sequences(),mark_first_state(),mark_terminal_state()and a network’s$datareturn keep their role while the frame holds exactly those columns, in the order it then holds them. A column added afterwards is refused or set aside, not read as a state, and a role declared in the later call comes first. Base column selection drops the role, so a selected frame is declared again. -
build_network()no longer guesses one-hot data from the values. Columns of only 0 and 1 were read as one-hot codes, also withstate_colsset: 15 positions recoded this way gave 15 nodes and 30,606 transitions instead of 2 states and 1,734. On a sequence method they now raisenestimate_bad_inputunless declared:format = "onehot"orcodesfor one-hot data,state_colsfor positions. Calls that relied on the guess need the argument added. The same error stopsfrequencies(),sequence_plot(),build_hon()and the other verbs that read positions, which read such frames as the states 0 and 1, and so does a single 0/1 column, a numeric or logical 0/1 matrix and an undeclared 0/1 run inbuild_mcml(). Thewtnamethods read 0/1 columns as before. The association methods read them as variables with the same weights, but no longer record guessed one-hot codes and windows: those madeassociation_rules()on acornetwork mine one invented transaction, and madebootstrap_network(),centrality_stability(),network_reliability(),casedrop_reliability()andpermutation()refuse a binary MGM network as one sequence. -
build_network(method = "co_occurrence")read 0/1 positions declared withstate_colsorparams$colsas one-hot codes: three positions gave the nodesT1,T2,T3instead of the states 0 and 1 (also in 1.0.8; recodedtrajectoriesgave 15 nodes and 34,419 instead of 2 and 16,250). -
cooccurrence()andassociation_rules()no longer guess binary items from the values either: columns of only 0 and 1 raisenestimate_bad_inputunless the newformat = "binary"declares them. Calls such ascooccurrence(bin)need the argument added.cooccurrence()on a 0/1 frame with a missing value failed withsubscript out of bounds; a missing cell now counts as no occurrence. -
build_network():format = "onehot"counted a column named inmetadata_colsas a code (4 nodes and total weight 72 instead of 3 and 36).attention,ngram,gapandreverseon one-hot data counted the raw columns, with 0, 1 and the actor ids as nodes; they now raisenestimate_bad_input. - A one-hot network passed to
build_hon(),build_hypa(),build_mogen(),markov_order_test(),path_counts(),path_dependence(),state_frequencies(),sequence_compare(),sequence_plot(),distribution_plot(),extract_sequences()or the other sequence readers was read as positions of the states 0 and 1. These raisenestimate_bad_input.build_mcml()aggregates its weights, as for a matrix. The same holds for the one-hot networks of anetobject_group(sequence_plot()drew the states 0 and 1,build_hon()read the networks’ fields as 15 states) and for a barecograph_network, whose declaration converting it to a netobject dropped. An association network (cor,pcor,glasso,ising,mgm) passed to a sequence reader orassociation_rules()raises the same error: its rows are variables.build_hon(),build_hypa(),build_mogen(),path_counts()andstate_frequencies()refuse anetobject_groupand any list that is not a plain list of sequences, such as a fittedt.test()result, whose fields they read as states (also in 1.0.8); so doescooccurrence().build_mmm()andcluster_mmm()refuse an association network, also as a barecograph_network, which they fitted from zero transitions (also in 1.0.8).build_network(method = "wtna")refusesstate_cols, which it ignored:wtnareads one-hot codes. -
build_network(method = "wtna")and"wtna_cooccurrence"read logical one-hot columns as codes, as numeric 0/1 columns andwtna()already did. They were read as the statesFALSEandTRUE, andwtna_cooccurrenceignoredwindow_size(also in 1.0.8). -
association_rules()refuses a classed list, such aspackageDescription(), whose character fields it read as transactions (also in 1.0.8), and raisesnestimate_bad_inputfor a list holding anything other than character vectors. -
association_rules()on anetobject_groupmined only its first group, without a word; it now raisesnestimate_bad_input. -
cooccurrence()on a network read its fields as transactions (24 nodes, includingNULLandfrequency; also in 1.0.8), and on a logical matrix gave the nodesFALSEandTRUE. A network now raisesnestimate_bad_input; logical columns are binary items underformat = "binary"and refused without it. - Duplicated column names raise
nestimate_bad_input. A column added under a name the frame already had was trusted as a marked position:build_hon()read it as a state, andbuild_network()gave 4 transitions where 1.0.8 gave 6. - The advice in these errors names only routes the verb reads: the sequence readers and
attention,ngram,gapandreverseno longer suggestformat = "onehot", which they then refused. -
entropy_bayes()reads counts from a network’s declared method, not from its values. A relative or scaled network is recounted from its sequences with the network’s own start and end states, concatenation, windows and one-hot units: a deterministic chain, ascaling = "max"frequency network and a relativetnamodel were read as counts of one where the data hold four (also in 1.0.8), and a relative one-hot network, refused before, is counted per unit. Relative co-occurrence networks (type = "relative") and weighted networks (params = list(weighted = TRUE)) are recounted as raw counts; a relative co-occurrence network was read as counts of one (also in 1.0.8). Atnamodel of a counting type (frequency, co-occurrence, reverse, n-gram) gives its counts; a relative, scaled or weighted one is recounted from its sequences (a weightedtna::ftna()was read as counts of one where the data hold three; also in 1.0.8), and one with windows, attention or gap weights raisesnestimate_bad_input. An association network raisesnestimate_bad_input: perfect correlations were read as six transitions (also in 1.0.8). A network with weights that are not counts and no counting rule (attention,ngram,gap) raisesnestimate_bad_input; it was recounted as a frequency network of its data, without its settings. -
build_mmm()andcluster_mmm()on a one-hot network fitted every unit from zero transitions and uniform components: they counted adjacent window slots, which are never both filled. They now count within the windows, as the network does, and a barecograph_networkgets the same one-hot units instead of one unit per row (also in 1.0.8). The initial state of a one-hot unit is the code of its first window (none when that window holds several); it was read from the slot of the first code, so only units starting with that code had one.build_network()of a fit, andcluster_network(cluster_by = "mmm"), on awtna_cooccurrencenetwork failed with “No one-hot columns found”; the clusters are rebuilt with the network’s counting method (also in 1.0.8). A barecograph_networkkeeps its declared method for that rebuild; it was rebuilt as a relative network (also in 1.0.8). A windowedtnamodel (fromtna::import_onehot()) raisesnestimate_bad_input: its windows were read as plain positions, 4 of 32 transitions (also in 1.0.8). A network converted from atnamodel bycograph::as_cograph()keeps neither type nor windows:build_mmm()andentropy_bayes()read its sequences only when recounting them reproduces its weights, and refuse it otherwise (the windowed example above);entropy_bayes()read its probabilities of one as counts.build_mmm()on anetobject_groupfitted its edge tables as sequences, with group labels as states, and a bare association network declaring only$methodwas accepted (both also in 1.0.8); both raisenestimate_bad_input. Rebuilding a fit keeps the source network’s settings: anngramnetwork withn_gram = 3was rebuilt with bigrams (also in 1.0.8).build_network()of a fit with an empty component failed with “Estimator ‘frequency’ must return a list”; it raisesnestimate_empty_cluster. -
build_network(method = "wtna")and"wtna_cooccurrence"withmetadata_colsread the declared column beside the codes, missed the one-hot data and ignoredwindow_size(also in 1.0.8). -
build_clusters()andcluster_data()clustered the rows of an association network passed as a barecograph_network(60 measurement rows in two clusters), and the rows of a bare one-hot network instead of its units. A bare network now meets the checks of a netobject; the refusal isnestimate_bad_input(also in 1.0.8). -
centrality_stability(),casedrop_reliability()andnetwork_reliability(): a resample that lost a state to a constant column stopped withsubscript out of bounds. It counts as below the threshold, as an unbuilt draw; split halves leave it out. The warning about failed resamples said they were left out with resultsNAin the stability verbs, which count them as below the threshold; it now says that. - A numeric column called
actionno longer stopsbuild_network(method = "cor")and the other association methods, which read numeric columns. -
build_network(): the message that atimeorsessioncolumn is not used named columns declared under another role:session_idgiven asactor,group,orderortime. It is shown only for a column with no role. It also said events were read in row order and sessions not split whatever was declared, also withorderset; it now says only what holds for the call. -
build_network(): the note about one long sequence followed the arguments and was shown for several sequences, withsessionor with time gaps and noactor. It is shown when one sequence was built. -
build_network(mode = "overlapping")withparams = list(window_size =)on sequence data now raises the warning of classnestimate_ignored_modethat the samemodeinparamsraises. -
boot_glasso(): a draw without a correlation counts as below the threshold in the CS-coefficient, as incentrality_stability()since 1.0.7.
Nestimate 1.0.8
-
hypergraph_centrality(): the help page says that the Z-eigenvector is not unique on a disconnected hypergraph.
Nestimate 1.0.7
Corrections from the 2026-11 package review. Each changes results for the input it names.
prepare()and every verb that reads a long log: time strings must match a format completely, with a four-digit year.15/01/2024was read as the year 15 and the event order followed that. A two-digit year now raises an error;custom_formatreads it. Fractions of a second now count in every layout;15/01/2024 10:30:00.9lost its.9, which could reverse two events. A string that cannot be parsed raises an error of classnestimate_bad_input.prepare(): day-first or month-first is decided once per column. A month-first column was read day-first wherever the day was 12 or less, which shuffled the events. A column that cannot decide is read day-first with a warning of classnestimate_ambiguous_dates.summary()and the metrics incompare_networks()/compare_model(): an undirected edge counts once, and a negative edge counts. Edge Count and Network Density were doubled on undirected networks and ignored negative edges. Mean Distance now treats a signed edge’s magnitude as its cost; it used positive edges only.build_clusters(),build_mmm():multinomruns on centred and scaled columns and reports on the original scale, and a fit that does not converge warns with classnestimate_no_converge. Standard errors were far too small on covariates such as a year or an income.$covariates$modelnow holds the fit on the standardised columns, and$covariates$fit$convergedrecords convergence.build_clusters(),build_mmm(): columns of a wide frame take the same roles as inbuild_network(). An id or a covariate was read as a sequence position, which shaped the clusters and, inbuild_mmm(), added its values as states. The columns set aside are named in a message and kept in$metadata, and in the$metadataof each network thatbuild_network()makes from the result.build_mcml(): a wide frame namedV1,V2,V3, … is read as sequences, also whentrimleaves onlyV1andV2. It was read as an edge list, which dropped every column afterV2.distribution_plot(),sequence_plot(type = "distribution"): withscale = "count"the y axis reaches the tallest stack. It stopped at the largest single cell and clipped the stacks.bootstrap_network(),permutation(),network_reliability(),centrality_stability(),casedrop_reliability()on awtna()network, orbuild_network(method = "wtna"): whole units are resampled. Rows were shuffled one at a time, which broke the time order transitions are counted on: in a data set with no A->A transition the bootstrap mean for A->A was about 6, and A->B fell from 18 to about 6.permutation()with an actor failed outright.-
Column names no longer give a role, and existing calls may need changing.
build_network(), its wrappers,frequencies()andmagnitude_difference()readaction,actor,timeandsessiononly when they are set. A column calledActionused to be read as the action, in any spelling, and could replace an explicitstate_colsor the columnsT1,T2, …. With nothing declared it now raises an error of classnestimate_bad_input: setactionfor an event log, orstate_colsormetadata_colsfor a wide table.- An undeclared
Time,Sessionorsession_idbesideactionis not used, and a message of classnestimate_column_rolesays so. Events follow row order unlesstimeis set. - A numeric id beside 0/1 columns on a sequence method raises the same error. Its values used to become the network’s states.
- A character column left out of a numbered run, which could hold states, is named in a message of class
nestimate_column_role.
- An undeclared
A network that rests on one sequence, and one-hot data with no actor or session or with one actor, cannot be resampled: the five verbs above raise an error of class
nestimate_single_sequence, naming the group if there is one. They returned zero-width intervals and p-values of 1, one-hot data without saying so. Building such a network stays legitimate. Bootstrapping groups stops if any group has one sequence, for instance a cluster of one.prepare_onehot()is no longer exported. Usewtna()orbuild_network(codes =, window_size =, mode =), which now count overlapping windows the same way. Itsintervalandaggregateoptions have no public route.wtna(mode = "overlapping"),build_network(mode = "overlapping"): the count now matchestna::import_onehot(window_type = "sliding"). Each window marks the codes active in any of its rows, and the windows are counted in blocks ofwindow_size. Overlapping results change.-
One-hot data and the networks built from it:
-
association_rules()on a one-hot network: the codes are the items and each window is a transaction. The items were the values0and1. - An overlapping window covers exactly
window_sizerows and incomplete windows are dropped, as in tna 1.5.5. Each step lagged the result of the last, so a window of 6 spanned 16 rows. -
build_clusters(),build_mmm(),build_network()read everyW<n>_T<n>column as a position. When windows differed in length the shorter ones were set aside, which could leave a network with no transitions. -
build_clusters()on a one-hot network clusters one windowed sequence per actor or session and errors without one. It clustered each row as a string of 0 and 1. -
bootstrap_network(),permutation(),network_reliability(),centrality_stability(),casedrop_reliability()respect the windows oftna::import_onehot()data, which were ignored when resampling. -
network_reliability(),centrality_stability(),casedrop_reliability()no longer error on a one-hot network with an actor or session. -
build_network(),wtna(): a one-hot column holding anything but 0, 1 or missing, or a row with a missing actor or session, raises an error of classnestimate_bad_input. A 2 counted as weight 2,"Yes"/"No"gave missing weights, and rows with a missing actor were dropped.
-
bootstrap_network(),permutation(),network_reliability(),centrality_stability(),casedrop_reliability(): a resample is scaled the way the network was, zeros included for the transition methods."minmax"used two different scales, so edges could fall outside their own intervals.centrality_stability(),casedrop_reliability(): a subset in which the correlation is undefined (the measure or edge vector is constant in it), or that could not be built, was dropped from the share of draws abovethreshold, which could raise the CS-coefficient. It now counts as a draw below the threshold, as intna::estimate_cs()since tna 1.5.4. Theprop_abovecolumn ofsummary()is the same share.build_network():params = list(window_size =)on sequence data was recorded in$paramsand otherwise ignored, so a network that said it was windowed was not. It now countsrelative,frequencyandco_occurrencebetween consecutive blocks of that many positions, astna::tna()does since tna 1.5.4, and the resampling verbs follow. Other transition methods raise an error of classnestimate_bad_input.mode = "overlapping"raises a warning of classnestimate_ignored_mode: blocks are the only window sequence positions have.
Nestimate 1.0.6
-
sequence_plot(periods =): a fraction in the time half oftrimjudges each period on its own activity. It keeps the busiest periods that together hold that share of the actions, and removes the rest wherever they sit, along with periods with no action; the kept periods close up under their own labels. It used a quantile of the actors’ last active period, which cut nothing on a calendar axis most actors run to the end of. -
sequence_plot(),distribution_plot(): the same for a fraction in the time half oftrimwithoutperiods: the busiest time points that hold that share of the observed states stay, and the rest are removed wherever they sit, under their own labels. It cut everything past a quantile of sequence lengths, so fewer or more time points can remain than before.build_mcml(trim =)still cuts by the quantile, because it changes the data. -
sequence_plot(),distribution_plot(): the row half oftrimno longer removes rows. Each row ends earlier and stays in place, with the row order and cell widths it had before: a count keeps its first that many observed states, a fraction its first share of them, and it now works withtree.
Nestimate 1.0.5
Corrections to numerical results, matching tna 1.5.4. Results from the functions below can differ from earlier versions.
-
summary()of a network reported the standard deviation of the in-strength as that of the out-strength and vice versa (the means are equal by construction). Out-strength is the row sum. -
compare_model()andcompare_networks(): the distance correlation was reported squared; it is now the distance correlation (Szekely, Rizzo & Bakirov 2007),NAwhen one network is constant. The Canberra distance omitted the edges present in only one network (each contributes 1).reliability()andcasedrop_reliability()use the same metrics. -
BetweennessRSP(net_centrality(),centrality_stability()) counted the correction for walks absorbed at a target once for every state, also for states that cannot reach it. In a network that is not strongly connected (for example, with a state that is never entered) the values were wrong. Only sources that reach the target are counted; strongly connected networks are unchanged. -
net_prune(method = "disparity")set the absent edges of a state with no outgoing or no incoming edges toNA. They stay 0.
Nestimate 1.0.4
-
sequence_plot()anddistribution_plot():trimtakes two numbers, the time axis and then the rows. The second drops the sparsest sequences, counted over the time points each panel draws: a count keeps those with at least that many observed states (trim = c(60, 5)), a fraction keeps the most active share (trim = c(0.9, 0.9));NAleaves an axis alone. Works for the heatmap, index, distribution andmcmlviews and withperiods; a row cut cannot be combined withtree. -
sequence_plot(periods =): aDatecolumn gives one block per calendar day and a whole-number column one block per number, from the first to the last, so a day on which nobody acted stays on the axis as an empty block. A counttrimbounds the range; more than 100,000 blocks is refused.
Nestimate 1.0.3
-
sequence_plot(periods =)acceptstrimandgroup.trimcounts period blocks (trim = 60keeps the first 60 days; a fraction keeps the periods up to that quantile of the actors’ last active period).groupnames a column of the long data (or of the network’s metadata) that is constant within actor and draws one panel per value, one row per actor, on a shared period axis (index type;combined = FALSEgives one page per panel). The returned list addsgroupsandorderswhen grouped. -
sequence_plot()on long data with a missing actor or period value raises anestimate_bad_inputerror naming the column, instead ofprepare()’s “actor/session” message. - Plotting a tibble no longer warns “Unknown or uninitialised column:
state_colors”.
Nestimate 1.0.2
Breaking changes since CRAN 0.9.24
-
plot_mosaic()is no longer exported (it maskedtna::plot_mosaic()); usemosaic_plot(), whose data-frame method takesx_var,y_varandweight(see the 0.9.29 notes). -
sequence_plot()gainedperiods,fill,actor,action,timeandorderaftergroup, so arguments aftergroupmust be passed by name. -
hypergraph_centrality()returns only the clique centrality by default;$Zand$Hare computed only when requested and only for uniform hypergraphs.
New features
-
stability_landscape()draws a transition network as a ball-in-cup landscape in which each state’s cup depth is the log of its expected stay,-log(1 - P_ii)(stay = e^depth), with intervals from resampling whole sequences, the share of time in each state, its exit probabilities and, for three states, the net circulation. It takes a network, a grouped network (for examplebuild_network()ofbuild_clusters()) or a sequence data frame or matrix;states =sets the order of the cups.print(),summary()(table = "cups","exits","circulation") andplot(). -
landscape_surface()draws the cup depths as a 3D surface over a per-sequence stability measure fromsequence_metrics()(self-loop tendency, entropy, complexity, …), estimated from the nearest sequences at each value of the measure, with the most stable end in front.summary()compares the two ends of each measure;plot()draws onepersp()surface per network and measure. -
landscape_trend()traces the cup depths along the program phase (sliding windows of time steps) or along a numeric per-sequence covariate such as a grade (nearest-sequence slices), one line per state with intervals from resampling sequences.
Bug fixes
Numeric sequence positions containing an all-missing logical column stay sequence positions rather than turning a text ID into states.
build_clusters()excludes requested post-hoc covariates from sequence distances, preventing the covariate from determining its own clusters.loading_stability()replays the composite weighting scheme and its factor-analysis options. New fits retain custom weights/functions; older custom fits that lack them request a rebuild.pattern_outcome()keeps generated outcomes separate from user metadata, including an adjustment or grouping column named.outcome.compare_model()aligns named nodes before comparing matrices and rejects incompatible node sets. Unnamed inputs retain positional matching.Ordinary Gaussian
outcome_model()intervals now use residual-df Student t limits, consistent with their coefficient tests.Z/H hypergraph centralities evaluate tensor directions in log space, preventing numerical underflow for large hyperedges.
Landscapes replay weighting, concatenation and boundary markers; merged sequences are bootstrap units. Covariates must be constant within merged units. Transformed or modified networks that cannot represent the stored sequence chain are refused explicitly.
Landscape surface/trend grids use the full range when the 5th and 95th percentiles coincide for a nonconstant measure or covariate.
MOGen summaries preserve numeric parameter counts above the integer limit.
Min-max centrality normalization preserves small, nonconstant strengths.
Pattern discovery explicitly refuses stars-only state labels (
**, …), which conflict with wildcard syntax, withnestimate_bad_input.casedrop_reliability(target = "auto")assesses all cells for association, scaled and thresholded networks, including edges that appear after case removal. Raw transition graphs retain existing-edge assessment. Explicittarget = "existing"and"all"select either interpretation.build_network(): wide data with number-coded states and a text column (an id) built the network from the text column alone, an all-zero network with no warning. A numbered run of numeric position columns is now the sequence, and the other columns are metadata.The sequence verbs (
extract_sequences(),sequence_patterns(),sequence_metrics(),pattern_outcome()) read the data of a correlation, glasso, Ising, MGM or window network as states; they now raisenestimate_bad_input. A network grouped by two columns (group = c("Achiever", "Course")) no longer fails; its groups are labelled in one column,Achiever-Course.sequence_metrics(): a row with no observed state hasNA, not 0, forvalid_proportionandcyclic_feedback_strength.sequence_patterns(pattern =)accepts the spaced notation"A -> * -> B".nct(): an unnamed matrix compared with a named one is matched by position again, as documented.build_hon(),build_mogen()andpath_counts(): a missing value inside a sequence ends a run of observed states.build_hon()stopped with an error,build_mogen()countedNAas a state, andpath_counts()joined the two sides of the gap.association_rules()reads factor columns of a wide data frame by their labels, not their integer codes.build_simplicial(type = "pathway")leaves out HYPA paths that never occur: since 0.9.26 HYPA scores every possible path, and an unobserved one flagged “under” became a simplex of states never seen together.persistent_homology(): the rows of$persistenceare numbered without gaps.labels =on number-coded states: every state column is relabelled together, sobootstrap_network()no longer drops the cells of columns that held no relabelled state.landscape_surface()andplot(landscape_trend(), type = "surface")draw a flat surface instead of failing; a constant measure or covariate raisesnestimate_bad_input; slices resting on fewer than five effective sequences warn (nestimate_thin_slice); input with no observed transition raisesnestimate_landscape_unestimable; a two-state occupancy landscape reports its single ridge once.plot()of apassage_time()result drew the matrix transposed: the tile in row A, column B showed the passage time from B to A. Rows are now the starting states and columns the targets, as documented, for a single network and for each panel of a grouped one.pattern_outcome(): anadjustcolumn named like one of the model’s own terms (.p1,.y, …) was replaced by that term, so the requested adjustment was silently lost; anadjustname with a space failed to parse. Every model column now has an internal name.outcomedefaults to"last_obs", as in codyna and as the 0.9.29 notes stated.sequence_patterns(): a gapped pattern (A->*->B) no longer spans a missing position, matching the template search; a repeatedlenorgap(len = c(2, 2)) no longer counts each occurrence twice; a grouped search that finds no pattern returns zero rows with all its columns and no warning; a template ending in->is refused.build_network()andextract_sequences(): an all-missing position column stored as logicalNAno longer stops the numbered position names from forming a run, which had turned a character covariate into states.plot()of a groupedmarkov_stability()result handles more than nine groups: colours cycle and shapes shift, so every group keeps its own colour-shape pair.extract_sequences()and the sequence verbs raisenestimate_bad_inputfor a model built from a matrix, which holds no sequences.
Documentation
The pkgdown reference lists the new sequence-analysis and long-data topics.
sequence_metrics(): the emergent-state rule for a return to the first state is a spell of at least 3 that is more than half the opening spell (codyna’s rule); the help page said “over twice”.Documentation revision (2026-11-01): the README examples used column names that the bundled data do not have (
action,time,phase), arguments that do not exist (markov_stability(times =),build_simplicial(method =),distribution_plot(type =),evaluate_links(held_out =)) and undefined objects; every README example now runs on bundled data and uses the package’s verbs instead of$access. Vignette prose now matches the rendered output (markov-stability,transition-entropy), the sequence-comparison vignette names its dataset correctly, and the vignettes and examples no longer reach into result objects with$. References were added tobuild_network(),build_mlvar(),build_gimme(),build_clusters(),cluster_choice(),build_mmm()andmosaic_plot().
Nestimate 0.9.29
Sequence patterns
-
extract_sequences()returns the sequences behind any input as a wide data frame, one row per sequence: prepared data, a long event log (actor/action/time), a wide data frame or character matrix, anetobject, a groupednetobject_group(the group column is added) or atnamodel.meta = TRUEadds each sequence’s covariates. -
sequence_patterns()discovers ordered patterns: contiguous n-grams, gapped patterns (A->*->B) and repeated runs. For each it reports the occurrences, the share of patterns of that length, the number and share of sequences that contain it (support), and its lift. The counts, support and lift agree withcodyna::discover_patterns(). Withgroup(a column, a vector, or the grouping of anetobject_group) each pattern also gets its support per group and a test of presence by group: for two groups the odds ratio, 95% CI and p-value of Fisher’s exact test, for more the chi-square and Cramer’s V; p-values are BH-adjusted.topreturns the first rows. -
sequence_patterns(pattern =)searches for a template such as"discuss->*->consensus"(each*is one position of any state) and returns every concrete instance;group = "last_obs"groups sequences by their final state. Both agree withcodyna::discover_patterns(). -
sequence_metrics()computes 23 per-sequence indices (validity, spells, entropy, Simpson diversity, transitions, initial-state persistence and decay, dominant and emergent states, cyclic feedback, integrative potential, complexity), one row per sequence. They agree withcodyna::sequence_indices()on 20 indices; three are corrected:dominant_max_spellis per sequence (codyna repeats the last sequence’s value),longitudinal_entropyis normalised by the number of states (codyna countsNAas a state), andcomplexity_indexuses that entropy once (codyna normalises it twice) and is 0 for a sequence of one spell, as inTraMineR::seqici()(codyna:NA). Empty sequences giveNA. A missing position is not an observation: the opening spell starts at the first observed state, transitions are pairs of adjacent observed states (self_loop_tendency + transition_rate = 1), andintegrative_potentialweights observed positions only, asTraMineR::seqintegr()does. The indices shared with TraMineR agree with it on sequences without internal gaps. -
extract_sequences()and the sequence verbs read TraMineR’s void (%) and missing (*) markers asNA, asbuild_network()does; anstslistsuch as tna’sengagementno longer gains a%state. -
pattern_outcome()reproducescodyna::analyze_outcome(), including its defaultoutcome = "last_obs": thenpatterns ranked highest bypriority(default: codyna’s chi-square) enter one logistic regression of a two-valued outcome on their presence, with an optional random intercept (group). Coefficients agree with codyna’s fit. It returns a tidy table, one row per pattern, with support per outcome value, the selection statistic, estimate, Wald CI, p-value and odds ratio. It fits the selected pattern even where codyna 1.0.0 fits a data column instead (a lone pattern of one length loses its name, and a data column namedV<k>takes its place).
Validation tests aligned with the current tna release
-
plot_mosaic()is no longer exported: it maskedtna::plot_mosaic()whenever both packages were attached, so tna code (and apps such as Dynalytics) callingplot_mosaic(model)failed withargument "data" is missing. Its data-frame mosaic is now a method ofmosaic_plot():plot_mosaic(df, x = "group", y = "state", weight = "count")becomesmosaic_plot(df, x_var = "group", y_var = "state", weight = "count")(x_label/y_labelbecomexlab/ylab, as in the other methods). A network, table or matrix given a data-frame-only argument (x_var,y_var,weight,fill,colors,show_labels, andlabel_sizeexcept withstyle = "flat", which uses it for its tile labels) raisesnestimate_bad_inputinstead of ignoring it, and so does an unknown argument of the data-frame method. -
casedrop_reliability()compares only the edges present in the original network. A subsample cannot contain a transition that is absent from the full data, so the empty cells agreed in every draw and inflated the correlation: on a sparse 8-state chain the CS-coefficient was 0.9 (the top of the grid) with a mean correlation of 0.993 after dropping 90% of the sequences.n_edgesnow counts the present edges, and an undefined CS-coefficient (edge weights that do not vary) isNAinstead of 0. Such a result now has the usual summary columns withNAstatistics, sosummary()(including the grouped summary) andplot()work: the plot states that the CS-coefficient is undefined, and the grouped plot names the networks it leaves out. This case is common now, for example a fixed cycle, where every present edge has probability 1. The documentation no longer claims that case-dropping is valid regardless of within-actor correlation. -
permutation(measures = "Diffusion")(and the node table ofcompare_networks()) compares Diffusion after min-max scaling to 0-1, asnet_centrality()reports it and as tna does from 1.4.1. - The range normalization behind
normalize = TRUEand Diffusion returnsNaNfor a numerically constant vector instead of stretching rounding error to 0-1, as tna’s does. -
markov_order_test()splits sequences at missing values, so no window spans anNA; an internalNApreviously became a context named “NA”. Results on data without internal missing values are unchanged (identical under the same seed). Its documentation no longer calls the within-context permutation exact: the windows of a sequence overlap, so the permutation distribution approximates the null (Besag & Mondal, 2013).
Bug fixes
-
plot()works onpassage_time()andmarkov_stability()results for a grouped network: one heatmap panel per group on a shared colour scale, and a per-metric dot plot with one point per group. Both used to fall through toplot.default()and fail. The single-network stability plot uses one fill; its per-state palette left a ninth state without colour. -
build_mmm(covariate_effect = "posthoc"):print()andsummary()labelled the covariates “integrated into EM – influences cluster membership” whatever the setting. The fit recordscovariate_effect, and a post-hoc analysis is now labelled as one. - The
print()methods ofentropy_trajectory()andentropy_bayes()no longer tell the user to reach into the object with$; they point tosummary()andplot(). -
build_network()no longer reads a character covariate of wide sequence data as states. An outcome or group label such asHigh/Lowused to become nodes of the network and vanish from$metadata. When the position columns are named as a run (T1,T2, …;V1, …;1,2, …), every other character or factor column is now metadata, like numeric columns already were, even when its values coincide with state names. The network equals the one built withmetadata_cols. Without such a run, or with two runs of equal size, nothing changes. - Association
permutation()refuses inference withnestimate_permutation_failedwhen any permuted network cannot be estimated or has non-finite weights, reporting the number of failed draws. Failed draws no longer silently reduce p-values or invalidate null moments. - Transition resampling honors
weightedandconcat. Concatenated rows are resampled as the merged sequences used by the estimator, including their joining transitions. Withactor, a merged sequence must stay within one actor; paired tests require matching merged-sequence counts. - Relabelling numeric sequence states, start/end markers and onehot columns keeps stored data, alphabets and column selectors consistent for resampling. Wide sequence positions retain their column names; association measurements retain their numeric values.
- Higher-order builders and
sequence_compare()preserve literal numeric states in Nestimate models and decode positional codes only for tna input or explicitly encoded converted data. Character digit alphabets such as"1"through"12"are decoded correctly. - Grouped wide sequences use the same resolved state columns as their child estimates. Numeric covariates do not enter the shared alphabet, and factor columns keep their labels.
- MGM’s numeric
levelis validated after excluding group, actor and metadata columns. MGM actor identifiers are excluded from estimation. - Custom variable estimators retain their numeric cleaned data when column names identify the modeled nodes, allowing valid downstream resampling.
-
nct()rejectsInfand-Infinstead of silently isolating the affected variable; its supported missing-data and constant-variable handling is unchanged. -
plot_mosaic(network, x_label =, y_label =)applies the labels. Explicit primitive-only styling arguments raise a classed error directing the caller tomosaic_plot(). -
association_rules()reads a character matrix of states (such astrajectories) as wide sequences, like a character data frame. It used to treat every matrix as binary: with missing cells it failed with “subscript out of bounds”, and without them it silently mined the column names. Binary input (matrix or data frame, 0/1 or logical) with a missing cell or a value other than 0/1 now raisesnestimate_bad_input; logical data-frame columns are read as binary items instead of the strings"TRUE"/"FALSE".
Documentation
- MGM’s missing-data policy is mean/modal single imputation, as documented by psychnets for its
"pairwise"option; it is not pairwise deletion. - Permutation M/S labels describe this function’s historical total/max edge difference statistics and distinguish them from NCT’s structure/strength convention. Comparison tables no longer call total edge difference “global strength”. The NCT tutorial and local display checks use current notation and capitalization.
Nestimate 0.9.28
Higher-order methods: corrections from a review against the source papers
These change results. Each is tested against an independent value (a hand-derived oracle or a published example), and each new test fails on the previous code.
-
hypergraph_centrality()computes the clique-motif centrality (CEC) directly as the Perron vector of each connected component. The power iteration it replaces oscillated when the clique expansion was bipartite (any triangle-free hypergraph), and returned a different wrong vector depending on whethermax_iterwas odd or even, without a warning. A star of pairs now gives the exact vector for everymax_iter. -
hypergraph_centrality()now defaults totype = "clique"."Z"and"H"are defined by Benson (2019) for uniform hypergraphs only: with mixed hyperedge sizes the equation mixes polynomial degrees and its solution depends on the normalisation inside the iteration. Requesting them on a non-uniform hypergraph raisesnestimate_nonuniform_hypergraph. On uniform hypergraphs they are unchanged and reproduce Benson’s Table 2. An unconverged Z/H iteration warns withnestimate_no_converge. -
q_analysis()counts, at each level q, only the maximal simplices of dimension at least q (Atkin’s Q-vector). It previously counted every maximal simplex at every level, so lower-dimensional simplices appeared as extra components at high q. -
persistent_homology()builds the filtration one dimension abovemax_dim(the Ripser convention), so classes of dimensionmax_dimcan die. Previously every top-dimension cycle was reported as essential; with the defaultmax_dim = 3, dense 7-state transition networks showed spurious never-dying bars in every case tried. -
build_simplicial()(clique and VR) records whenmax_dimcut a larger clique.betti_numbers()then warns (nestimate_truncated_complex) that the top Betti number is an upper bound, andpersistent_homology()warns the same way when given such a complex, whose top-dimension classes cannot die. -
build_mogen()andmarkov_order_test()gaindof = c("paths", "observed"). The default"paths"counts each layer’s parameters as Scholtes (2017, Eq. 7) and pathpy do: every transition of the paths of length k that the observed first-order topology allows. The previous rule, nowdof = "observed", counted only observed transitions; it can fall as the order rises and under-penalised high orders on sparse data, so AIC, BIC and the likelihood-ratio test favoured higher orders. Selected orders can change. -
build_mogen(criterion = "lrt")selects the largest order whose test rejects (Scholtes 2017) instead of stopping at the first non-rejection, and returns every p-value aslrt_p. -
build_hon(method = "hon", min_freq >= 2): a source whose transitions are all belowmin_freqis no longer an extension candidate nor a starting rule, as in the reference pyHON. Such sources could previously add HON nodes that pyHON does not create.min_freq = 1and HON+ are unaffected. - The Z and H iterations of
hypergraph_centrality()normalise the tensor update before adding the stabilising shift, and count as converged only when the eigen-equation residual is small. On large uniform hyperedges the unnormalised shift swamped the update, so the iteration stopped at its start and returned the uniform vector without a warning (a 3-petal sunflower of 20-member hyperedges gave a hub/petal ratio of 1 instead of Benson’s sqrt(3)). - Path degrees of freedom are summed as non-negative per-state terms, so they stay exact up to the double range; beyond it
build_mogen()andmarkov_order_test()stop withnestimate_dof_overflowinstead of carryingInf/NaNinto AIC and BIC. - Truncation detection reads the simplices already built (does a top simplex extend by one vertex?) instead of an exact maximum-clique search, which took seconds on dense graphs even at
max_dim = 0; persistence on a distance matrix no longer computes it at all. The persistence warning for a truncated complex rechecks withinmax_scale. -
build_hypa()classifies a path as over-represented whenp_over <= alpha, i.e. HYPA >= 1 - alpha as in LaRock et al. (2020); it was< alpha. This only changes ties at exactlyalpha.
Documentation
-
build_mogen()is documented as the multi-order model of Scholtes (2017), pathpy’sMultiOrderModel; it is not the multi-order generative model of Gote et al. (2023), which adds start and end states. -
build_honem()states what it computes (decayed matrix powers of the HON transition matrix over all HON nodes) and how that differs from Saebi et al. (2020), whose order-indexed matrices over first-order nodes are not fully specified in the paper.
Nestimate 0.9.27
New features
-
sequence_plot()gainsperiods =andfill =. For a network built withactor =andsession = "day"(or any period column),sequence_plot(net, periods = "day")draws one row per actor and splits the time axis into equal-width blocks, one per period, with ticks at the period boundaries and each label under its block. The number of steps may differ by actor and by period:fill = "stretch"(default) spreads an actor’s steps over the whole block (one step fills it, three take a third each);fill = "pad"gives every block as many fixed slots as the busiest actor-period and leaves the rest empty, so a slot is the same step position for everyone. Factor levels set the period order and an unused level shows as an empty block. Works fortype = "heatmap"and"index". -
sequence_plot()accepts long data directly:actor =,action =,time =andorder =name the columns, as inbuild_network(), e.g.sequence_plot(log, actor = "student", action = "action", periods = "day"). Withperiods, each actor-period is one sequence whatever the time gaps.
Breaking changes
-
nct(): the M and S letters were the wrong way round. In van Borkulo et al. (2022) andNetworkComparisonTest, M is the network-structure test (largest absolute edge difference) and S the global-strength test;nct()stored and printed them swapped. The tests are now$structure(M) and$strength(S, withby_group, each network’s global strength); reading$M/$Sraises anestimate_renamederror naming the field to use. -
summary.net_nct()now returns the M and S tests (columnstest,statistic,observed,p_value,significant) instead of the per-edge table withm_stat/s_statattributes (those attributes had the M/S swap too). The per-edge table isas.data.frame().
Bug fixes
plot_mosaic()given a network (netobject, group, mcml, htna) hands it tomosaic_plot(); it failed with “is.data.frame(data) is not TRUE”. Data-frame calls are unchanged.cluster_network(cluster_by = "mmm")passescovariate_effect(and any otherbuild_mmm()argument) tobuild_mmm(); it failed with “Unknown argument(s) in cluster_network(): covariate_effect”.build_mcml()decodes atnaobject’s integer-coded sequences (it failed with “Unknown nodes in clusters”).summary.mcml()works without within-cluster layers (compute_within = FALSE, where it crashed), andwithin_totalincludes self-transitions. For raw counts it equals the macro diagonal; separately normalized micro and macro layers can have different totals.entropy_trajectory()windows run through time. Transitions were pooled actor by actor, so a window could start in one actor’s late events and end in another’s early ones.Markov-chain measures (
transition_entropy(),entropy_network(),passage_time(),markov_stability(),chain_structure()) refuse correlation-type networks and negative weights (nestimate_not_markov) instead of row-normalising them into a meaningless chain. Co-occurrence networks (a random walk) are still accepted.path_dependence()no longer drops states whose names contain “NA” (e.g. “FINAL”, “ANALYSIS”); missing cells are tested directly.sequence_compare()on a network whose states are numbers (1, 3, 5) reads them as states; they were decoded as positions, relabelling one state and dropping another.build_mmm(): BIC/AIC/ICL count covariate-dependent mixing by design column (a 4-level factor is 3 columns); and a sequence whose first state is missing adds no initial-state term instead of being scored as starting in the first state.set_state_colors()on anetobject_groupstores the palette as an attribute; it was added as a list element, after which every plot, print and summary of the group failed.sequence_plot()heatmaps pin each state to its colour; when the drawn part held only some states (e.g. aftertrim), cells were coloured as other states. Panels with a single sequence (one row, a singleton cluster, one actor withperiods) draw instead of erroring.build_network()refuses acompare_mmm()table with a classed error (nestimate_bad_input) giving the call to run, with the lowest-BIC k:build_network(build_mmm(data, k = 2)). The table is a data frame, so it used to be read as sequence data and “built” into a network whose states were its log-likelihoods and BICs.permutation()on cor, pcor and glasso networks pools the two datasets by column name. It pooled them by position, so the same variables in a different column order were mixed in the permutation null (one edge’s p-value moved from 0.47 to 0.71 on identical data).boot_glasso()edge and centrality difference tests count a tie (both values equal, e.g. two absent edges) in both tails: p = 2 * min(P(d >= 0), P(d <= 0)), capped at 1. Ties used to count as evidence of a difference; with one edge present, 29 of 45 edge pairs were “significantly different” (now 9, the present edge against each absent one).Betweenness, edge betweenness and the shortest-path counts behind them use one relative tolerance for “same length”. A tie that floating-point addition breaks (1/10 + 1/15 vs 1/6) was counted as one path but credited as a full path, so node b got 1 where igraph gives 0.5.
Ising networks can be resampled:
bootstrap_network(),network_reliability(),centrality_stability()andcasedrop_reliability()returned NaN or CS = 0 for every Ising network, because the estimator rejected the stored data matrix and every draw failed silently. The resamplers now also warn (nestimate_resample_failed) with the number of draws whose network could not be estimated, instead of dropping them without a word.build_hon(),build_hypa(),build_mogen(),path_counts()andstate_frequencies()read data frames column by column, so a factor column next to character columns keeps its labels instead of becoming states “1”, “2”, …-
build_network()input handling:-
actor =now names the ID column in wide and association data, as it already did in long data. Before, the ID values became nodes (wide sequences) or the ID column a variable (cor, pcor, glasso, Ising, which errored on a non-binary ID). - A numeric column in character sequence data (age, score) goes to
$metadatainstead of becoming states. - cor, pcor and glasso convert data to state frequencies only when it has at least two categorical columns and fewer than two numeric ones (sequences, possibly with one numeric covariate, which is left out). One character column among numeric variables (e.g. gender) used to turn the whole network into a network of that column’s values; the numeric variables are now the nodes. Declared
metadata_colsare dropped before this check. -
labels =now also relabels$data,$initial,$frequency_matrixand$node_groups, sobootstrap_network()and the other resamplers no longer return all-zero matrices for a relabelled network, andpredictability()no longer reportsNARMSE. -
prepare()’sunix_time_unit,is_unix_timeandcustom_formatpassed tobuild_network()reachprepare()(they were silently ignored), andprepare()warns (nestimate_time_unit) when numeric times read in the given unit fall after the year 2500, the sign of millisecond timestamps read as seconds. -
level = "both"keepsactorandlabels; a grouped call keepslabels; anNAin thegroupcolumn is an error (nestimate_bad_input) instead of a hidden all-NAgroup.
-
Start/end markers (
start = TRUE,end = TRUE) are now honoured by the precomputed resampling path behindbootstrap_network(),permutation(),centrality_stability(),network_reliability()andcasedrop_reliability(). Before, the Start row and End column were zero in every replicate (bootstrap mean, SD and CI of 0; every Start edge “significant” in a permutation test).build_mmm()/cluster_mmm()withcovariatesandcovariate_effect = "em": the covariate-dependent mixing step is now an exact M-step,nnet::multinom()fitted to the posterior probabilities. The former hand-written Newton step had no step control; withk >= 3it diverged (coefficients around 1e7 to 1e9, an empty cluster, a log-likelihood below the fit without covariates) while reportingconverged = TRUE. The likelihood now rises at every EM iteration, andconvergedalso requires the last mixing step to have converged. Covariate fits change;$covariates$betacolumns are now named.nct()compared the two groups’ variables by position: a second group whose columns arrived in another order was tested against the wrong variables with no error. Columns that differ in name or order now raisenestimate_bad_input, as psychnets’net_compare()does.nct()failed with the uninformativenearPDerror “infinite or missing values in ‘x’” on any missing value, on a variable that is constant in a group, and on a permuted split in which a rare binary variable becomes constant. Newna_method = c("pairwise", "listwise")(default"pairwise": pairwise correlations, median co-observation count as the sample size; listwise drops incomplete rows, whole pairs whenpaired = TRUE). A constant variable enters the network as an isolated node (the psychnets convention), with anestimate_constant_variablewarning when it is constant in an observed group; the statistic is then defined on every permuted split, so the test stays exact. A pair sharing fewer than two observed rows raisesnestimate_degenerate_sample.nct()drops non-numeric columns (an id or group label) instead of failing incor(), validatesiteras a single whole number (2.7 was silently truncated), and raisesnestimate_bad_inputfor malformed arguments.summary.net_nct()labelled every edgeedge_1,edge_2, … withto = NAwhen the data had no column names; edges are now labelledV1,V2, …$E$edge_namesis always afrom/todata frame (it was anexpand.grid()result withVar1/Var2, orNULL).Printing an
nct()result shows everything: both groups by name, M and S with each group’s global strength, and every edge (largest difference first) with both groups’ weights (print(x, n = 10)shortens the list) – the same layout as psychnets’net_compare(). Newas.data.frame.net_nct(): one row per edge (from,to,weight_1,weight_2,difference,p_value,significant).nct()treats a network weight of |w| <= 1e-10 as no edge. psychnets before 0.6.0 can return an absent edge as a ~1e-17 residue, and two empty networks then tested as different (M = 5.6e-17 and a p-value below 1; 10 of 40 random n = 60, p = 12 null datasets were affected with psychnets 0.5.2).On complete data every
nct()number is unchanged (frozen intests/testthat/fixtures/nct-baseline.rds).
Nestimate 0.9.26
Breaking changes
-
build_hypa()now defaults top_adjust = "none", following LaRock et al. (2020), who classify paths against the thresholdalphawithout multiple-testing correction. Passp_adjust = "BH"for the previous behaviour.
Bug fixes
build_hypa()used a miscalibrated null model. The propensity matrix wass_out * s_inrestricted to observed paths, normalised over the whole graph and never refitted, so expected counts did not preserve node strengths: high-strength contexts were systematically under-represented and rare contexts over-represented, and memoryless (first-order Markov) data produced dozens of anomalies. Xi is now built on every possible De Bruijn edge (an observed k-gram continued by an observed first-order transition) and refitted until expected in- and out-strengths match the observed ones, following LaRock et al. (2020) and the referencetlarock/hypacode.build_hypa()fits the propensity matrix by continuous iterative proportional fitting instead of a rounded, keep-best sweep. Expected counts now preserve every De Bruijn node’s in- and out-strength to numerical precision (order 2 equals the first-order Markov expectation exactly), andconvergedis reported only when the tolerance is met; otherwise a warning of classnestimate_hypa_no_convergeis raised. Stalled fits were previously reported as converged. Expected counts can differ from the original Python implementation, which rounds inside every sweep, by a few thousandths.build_hypa()validates its input:min_countmust be a single whole number,alphaa single number in (0, 0.5) andorderfree of duplicates (duplicates previously doubled every row and anomaly). Internal missing states now split a trajectory instead of becoming a state called “NA”, and labels containing the internal separators\x01/\x02raise an error of classnestimate_hypa_bad_label.build_hypa()now uses the over-representation rule of LaRock et al. (2020): a path is over-represented when its HYPA scoreP(X <= f)exceeds1 - alpha, sop_overis the strict tailP(X > f) = 1 - p_under(previously the inclusiveP(X >= f)).build_hypa()can now flag paths that never or rarely occur as under-represented.min_countgates over-representation on the observed count and under-representation on the expected count; previously a path observed fewer thanmin_counttimes could never be a deficit. Possible but unobserved paths are now scored (observed = 0), so$scoresandn_edgescontain more rows. At order 2 the expected count reduces to the first-order Markov expectation.print.q_analysis()reported the fragmentation point from the highest q down, becauseq_vectoris stored from the highest q; it now reports the lowest q with more than one component (e.g. q = 2, not q = 4, for a clique complex whose maximal simplices meet only in triangles).
Improvements
-
verify_simplicial()accepts a network object (netobject,tna,cograph_network,net_hon) as well as a matrix, asbuild_simplicial()does.
Nestimate 0.9.24
CRAN release: 2026-10-07
Documentation
- Fixes to the 0.9.23 help-page merge, found in review:
- Pages are named after their function again:
build_mcmlandplot_state_frequencieshad been named after aprint()method, and their usage now lists the function before its methods. - The descriptions of 51 methods (what a plot draws, what a print shows) are restored, as a “Methods” section on each function’s page.
- Each page’s
...entry states what each method does with extra arguments: methods that reject them say so,plot.net_bayes()namescograph::splot(), and the rest say they are ignored. -
compare_networks: the...andlabelsentries no longer repeat;net_edge_betweennessandnet_pruning_detailsno longer list a non-existent class. - Every S3 method has a documented return value.
- Pages are named after their function again:
Behaviour notes
- The
mgmestimator rejectsscale = FALSEwith a classed error (nestimate_mgm_unscaled); this started in 0.9.23 and was not listed there. Missing values use mean/modal single imputation under psychnets’ named"pairwise"policy, now passed explicitly.
Tests
- Two more reference-implementation tests (a hand-written linear solve for
passage_time(), a manualmultinomre-computation) and unused reference helpers moved to the local suite; section headers that claimed equivalence tests are renamed. New tests: mgm on data with missing values, and thescale = FALSEerror.
Nestimate 0.9.23
Internal changes
- The
mgmandisingestimators delegate topsychnets::mgm_fit()andpsychnets::ising_fit()(glmnet engine), joiningcor,pcorandglasso. Results are unchanged: identical to the former in-package code (max absolute difference 0 for Ising over 180 configurations, 5.6e-17 for MGM over 48). Nestimate keeps type detection, input validation and the result fields. The Ising result no longer carries the unusedasymm_weightsandlambda_selectedfields. The unused internal moderated-MGM code is removed.
Documentation
- Each function has one help page. The 181
print(),summary(),plot(),format()andas.data.frame()methods are documented on the page of the function that creates their object (?nctcoversprint.net_nct()andsummary.net_nct()), as iscompare_model()’snetobject_groupmethod. 286 help pages become 139;?print.net_nctstill opens the right page. -
compare_model()andas_netdifference()have examples.
Bug fixes
-
build_network(method = "mgm")no longer fails on data with missing values (“number of observations in y not equal to the number of rows of x”).
Tests
- Equivalence tests against other packages (tna, igraph, mgm, stringdist,
glm()) and naive-loop reference implementations are no longer shipped. - CRAN runs a core of 15 test files (data preparation, estimation registry, extraction, Markov, link prediction, Bayesian verbs, pruning, and the htna contract); every other file is skipped on CRAN and runs locally and in CI. The CRAN test run drops from about 300 s to 22 s.
- Slow examples run with fewer iterations (
boot_glasso(),nct(),permutation_diagnostics(),build_gimme()) and?sequence_plotdraws fewer figures.
Nestimate 0.9.21
Bug fixes
-
summary()of apredict_links()result reportsNAscores for a method with no predictions (every possible link already exists). It returnedNaN/-Inf/Infwith one warning per column.
Documentation
- Every help page now has example code that runs under
R CMD check. 31 pages had all of it inside\donttest{}or\dontrun{}; fast examples are unwrapped, and slow ones (nct(),permutation_diagnostics(),entropy_bayes()) run live with fewer iterations. - The
predict_links()family of examples uses fixed data that leaves links to predict, and theloading_stability()/as_networks()examples use items with real two-factor structure, so neither emits warnings. - pkgdown: the
cograph-tutorial-nestimatearticle was a 47.8 MB page (300 dpi figures inlined as base64); it is now about 70 KB with figures as separate files. The README no longer lists outdated imports.
Nestimate 0.9.18
Documentation
- The pkgdown site builds again. Four exported topics (
state_colors(),set_state_colors(),composites(),item_loadings()) were missing from the reference index, which had failed every site build since 0.9.10. Thecompare-networksandpermutation-nested-dataarticles now publish.
Nestimate 0.9.17
New features
-
compare_networks()gainsactor =, passed to the permutation backend: whole actors are reassigned between the networks, the printed header names the actor column, andglobal_differences()gains the rowsICC,Design effect (edges)andDesign effect (M)(category"Nesting"). Requirestest = "permutation"(error classnestimate_compare_actor_needs_permutation).
Nestimate 0.9.16
Breaking changes (development versions only)
- The nesting argument added in 0.9.13 (
permutation(),permutation_diagnostics()) and 0.9.15 (bootstrap_network()) is renamed fromblocktoactor, the column identifying whose sequences they are: the same vocabulary asbuild_network(actor = ). Results carryactorandn_actors; diagnostic columns use_sequence(sequences reassigned) and_actor(actors reassigned), e.g.p_global_sequence/p_global_actor; conditions arenestimate_bad_actor,nestimate_actor_missing,nestimate_actor_misaligned,nestimate_actor_unsupportedandnestimate_few_actors. The printout readsActor: Group (200 actors)andNesting in Group: ICC = .... Neither name was ever on CRAN.
Bug fixes
build_network(): columns named inmetadata_cols(or left out ofstate_cols) are no longer read as sequence positions in wide data. They were moved to$metadataonly after estimation, so their values became states and created spurious transitions, in single and grouped networks. Forcor,pcor,glasso,isingandmgm, declared metadata columns are no longer entered as variables.An ICC that cannot be estimated (one block, or no variation) is reported as not estimable instead of
NaN [NA, NA]bypermutation(),bootstrap_network()andpermutation_diagnostics().
Nestimate 0.9.15
New features
-
bootstrap_network()gainsblock =, the column identifying the unit that sequences are nested in. Whole units are resampled with replacement, keeping their sequences together (cluster bootstrap, top level only; Davison & Hinkley, 1997; Field & Welsh, 2007). The result reports the ICC (Shrout & Fleiss, 1979) and the design effect (Kish, 1965) for the edges, printed under the bootstrap summary and returned asclusteringandclustering_edges. With one sequence per unit it reproduces the ordinary bootstrap exactly. Transition networks only.
Nestimate 0.9.13
New features
permutation()gainsblock =, the column identifying the unit that sequences are nested in (sessions in students, students in teams). Whole units are reassigned between the groups; units with sequences in both groups, as in repeated-measures designs, have their sequences reassigned within the unit; mixed designs combine the two (Good, 2005; Anderson & ter Braak, 2003). Supported for transition networks (relative,frequency,co_occurrence); association networks raisenestimate_block_unsupported. A warning of classnestimate_few_blocksis raised when no p-value could fall belowalpha.With
block,permutation()reports the nesting effect: the intraclass correlation (Shrout & Fleiss, 1979) with a jackknife 95% interval, and the design effect (Kish, 1965), the blocked over the unblocked null variance, for the edges and the global statistic M.permutation_diagnostics(x, block =)runs the ordinary and the blocked test on the same data and returns them side by side as a tidy data frame, one row per pair or, withlevel = "edges", per edge.
Improvements
print()of anet_permutationshows the global test (M and S, with p-values) and, withblock, the ICC and design effects. A grouped result prints every pair in full.The
permutation()help page is reorganised into sections: what is tested, nested data andblock, ICC and design effect, reading the printed output.Building a transition network from a single long sequence now raises a message instead of a warning; running
bootstrap_network()orpermutation()on such a network still warns. Both carry the classnestimate_single_sequence.
Bug fixes
\%in markdown roxygen silently cut the rest of a line from the help pages ofcertainty(),build_gimme(),build_mcml()andsequence_plot(); the text is restored.Missing space in the
permutation()print header.
Nestimate 0.9.12
New verbs
set_state_colors(x, colors)attaches a palette to anetobject,netobject_group,mcmlorhtna, and every figure drawn from that object then uses it –sequence_plot(),distribution_plot(),plot_state_frequencies()andcograph::splot(). The cograph half goes through the documentedmeta$splotproducer contract (defaults$node_fill, stamped in node order), sosplot(net)needs no arguments and renders byte-identically tosplot(net, node_fill = ...). Astate_colors(x) <-replacement form is also available.state_colors(x)reads the resolved palette back as a tidy data.frame: one row per key, withstate,colorandsource("set"or"default"). It is what the figures actually draw, not just what was passed in.
Improvements
States a named palette does not mention are now dealt the Okabe-Ito colours the palette has not used, one each, instead of taking their positional slot. Pinning
plan = "#0072B2"no longer leaves another state defaulting to that same blue. Affects the named form only; an unnamedstate_colorsand the all-default palette are unchanged.An attached palette resolves once, in the object’s own key order, so every figure drawn from it colours a state identically. Previously only the colours you set were carried and each figure dealt the remaining defaults in its own sort order –
plot_state_frequencies()sorts states by frequency andsequence_plot()alphabetically, so one state could come out amber in one figure and black in the other.In-tile labels in
plot_state_frequencies()take whichever ink (dark or white) has the higher WCAG contrast ratio against the tile, instead of one fixed grey. A percentage on a dark tile – black, navy, dark wine – is now readable, whether the colour came from the default palette or from a palette you set.
Nestimate 0.9.11
Fixes
- A named
state_colorsno longer has to match the figure exactly. Names the plot does not draw are dropped with amessage()naming them, so one project-wide palette – states from a wider coding scheme, clusters a given call merged away – can be handed to every plot and each takes the keys that apply to it. 0.9.10 raised an error instead, which made a shared palette unusable.
Nestimate 0.9.10
Improvements
state_colorsaccepts a named vector everywheresequence_plot(),distribution_plot()andplot_state_frequencies()draw, and the names are a lookup rather than a positional list: only the keys you name are overridden, every other key keeps its default, and the vector may be shorter than the number of states. An unnamed vector is still positional, unchanged.For an
mcml, that lookup covers the whole multichannel figure, not only the states. A cluster name colours itsSummaryband, its channel strip and its faded band in the other panels; a group merged bycombine =is named by its label (the list name, or"A + B");rest_labelis a key too. Sosequence_plot(fit, combine = list(Task = c("Cognitive", "Regulation")), state_colors = c(Task = "#0072B2"))recolours the combined cluster and leaves the rest of the palette alone. Previously the cluster and combined keys were drawn from a fixed internal palette with no way to set them.A
state_colorsname that matches no key in the figure is now an error naming the available keys, instead of being silently ignored.
Nestimate 0.9.9
New verbs
-
build_mcml()gainscombine =andexpand =. On new input they change the partition before estimation, in anyclustersform and for every input type:build_mcml(data, clusters = cl, combine = c("A", "B"))equals a build withAandBmerged incl(the merged cluster lists its states in cluster-name order). On an existingmcmlthey re-partition it:build_mcml(mc, combine =)merges clusters,build_mcml(mc, expand =)splits clusters into one cluster per state, andbuild_mcml(mc, clusters =)applies a new partition. The model (macro network, within-cluster networks, sequences) is re-estimated from the sequences themcmlcarries, with its originaltype,methodanddirected. With the partition unchanged the result equals the input;expand = "all"reproduces the node-level transition network of the sametype. Raisesnestimate_mcml_no_sequencesfor anmcmlbuilt from a matrix or an edge list (which keeps only within-cluster edges), and errors when sequence-shaping arguments (trim,exclude,end,labels,actor, …) are passed with a re-partition, since the carried sequences already reflect them. -
session_ids()names the session behind every sequence of a network built from long data, and of abuild_mmm()orbuild_clusters()fit on such a network. It returns one row per sequence in model order:sequence, theactorandsessioncolumns under their own names,session_label, and, for a fit,cluster(plusposteriorfor a mixture). The fit’s assignments can then be joined to the input by those columns instead of parsing the"actor | session"label, which breaks when an id contains" | ". Raisesnestimate_no_session_idsfor wide-data input or for fits made before this version, andnestimate_session_ids_misalignedwhen the metadata and the sequences differ in number. -
item_loadings()returns the tidy item-diagnostic table of abuild_mcml_pc()fit (node, cluster, loading, weight, sign, max_cross, cross_cluster, misfit);misfit = TRUE/FALSEfilters it. -
composites()returns the per-respondent cluster scores of abuild_mcml_pc()fit: one row per input row (input order and row names,NAwhere all of a cluster’s items are missing) and one column per cluster. Raisesnestimate_no_compositesfor the descriptive aggregations ("average","escoufier","cancor"), which form no score.
Changes
sequence_plot()on anmcmlgainscombine =: named clusters are merged into one channel (a character vector for one group, a list for several; list names label the merged channels, default"A + B"). The merged group acts as one cluster across the figure (one panel, one Summary key, one faded band) and can itself be opened withexpand =.sequence_plot()on anmcmlgainsrest = c("clusters", "pooled", "none"): how a cluster’s panel shows the time spent in other clusters (one faded band per cluster, one pooled grey band, or blank, leaving only the panel’s own states). Applies to the carpet and distribution views.rest_label =(default"Other states") sets the legend text: the pooled band takes it as is, per-cluster bands read"Social (Other states)". This replaces the former"(elsewhere)"wording.sequence_plot()on anmcmlnow honoursna =in the distribution view:na = FALSEdrops theNA(ended) band and shows each time point as shares of the sequences still running, asdistribution_plot()already did.macro_network()accepts anmcml_pcfit and returns its cluster-level network;expand =on anmcml_pcraisesnestimate_no_expand, andmethod =or...error (the estimator is set inbuild_mcml_pc()).sequence_plot()errors whencombine,expand,restorrest_labelis passed for input that is not anmcml, instead of ignoring them.print.mcml_pc()and its build-time warnings nameitem_loadings()instead of pointing at$loadings.prepare()(and sobuild_network()on long data) keeps thesessioncolumn(s) in the per-sequence metadata under their own names, and returns the metadata explicitly in sequence row order (it was assembled withmerge(sort = FALSE), whose order is unspecified).build_mmm()andbuild_clusters()keep the input network’s$metadata(restricted to the fitted rows whenbuild_mmm()drops sequences with missing covariates).
Fixes
-
sequence_plot()on anmcmlwithtype = "heatmap"/"index"andexpand =drew the other-cluster wash as blank cells: the wash was keyed by the Summary keys, which are states once a cluster is expanded. It is now keyed by cluster. -
sequence_plot()on anmcmlwithtype = "distribution"andexpand =no longer fails with “subscript out of bounds” in the default (normalize = FALSE) view. The Summary band now opens the expanded cluster into its states, and the other panels draw it as one faded"<cluster> (<rest_label>)"band. -
sequence_plot()on anmcmlwith a single channel (one cluster, or every cluster merged bycombine) no longer fails in the carpet view with “replacement has 1 row, data has 0”. -
sequence_plot()on anmcml: withexpand =, each cluster’s faded band in the other panels now has its own colour (expanded clusters all shared one).
Nestimate 0.9.5
New verbs
-
macro_network()returns the macro (cluster-level) network of anmcmlwith one or more named clusters expanded back into their member states and every other cluster left collapsed — a network at mixed resolution. It re-counts from the recoded sequence data rather than splitting the k x k aggregate, which cannot be disaggregated; a matrix-derivedmcmlraisesnestimate_no_expand_source.$node_groupsmaps each expanded state back to its parent cluster, so the result plots grouped. -
extract_pathways()cuts a long event log into pathways and returns one row per pathway. Three cuts viatype =:"unit"(one pathway per group),"segments"(one per contiguous run),"anchored"(spans around an anchor event).resolve =appends a resolution label as the closing state. -
outcome_model()regresses a unit-level outcome on sequence or network predictors — pattern indicators,simplicial_features()output, or any numeric covariate — with family auto-detection, an optionallme4random intercept,select = "split"hold-out selection, BH-corrected p-values, confidence intervals and odds ratios.effects_table()is the tidy accessor;summary()returns the same table. -
simplicial_features()returns topological summaries of one or many networks as a tidy data.frame, one row per network per threshold, ready to use as regression predictors. Accepts anetobject,netobject_group,mcml, a square weight matrix, or a named list of any of these.
Extended
-
build_mcml()gains theexclude,trim,endandend_bysequence arguments, applied in that fixed order. -
as_tna()is now a generic.as_tna.mcml(expand =)delegates tomacro_network()for the macro layer only; per-cluster layers are untouched. Anas_tna.default()covers everything else. -
sequence_plot()and itsmcmlmethod gainpanel = c("both", "summary", "channels").
Fixes
-
frequencies(format = "frequency")returned zero rows for any long-format data whose id column was not integer-valued. The sequence key was coerced withas.integer()before the merge, turning every character id intoNA; the merge then matched nothing and failed silently. Sequence keys are now aligned in their character form. -
sequence_plot()on anmcmlerrored whenever a singleton cluster was named after its own state: the shared fill scale built its levels withfactor(levels = c(states, clusters)), and duplicate levels are an error. Levels and values are now de-duplicated. -
as.data.frame()methods fornet_hypergraph_transductionandnet_hypergraph_clusterplacedwhatin the generic’srow.namesslot, soas.data.frame(x, "scores")bound"scores"torow.names. The generic’s arguments now come first androw.namesis honoured (R CMD check“S3 generic/method consistency”).
Nestimate 0.9.4
- pkgdown reference index repaired: the five topics added in 0.9.3 were unindexed and
build_reference_index()failed. The S3 Methods section now wildcardsas.data.frame.alongsideprint.,summary.andplot., so a future result class with the house-standard accessor cannot repeat it.
Nestimate 0.9.3
New verb: compare_networks()
- Compares two or more networks (
netobject,netobject_group,tna,group_tna,mcml,cograph_network, matrices, or a list of them) in one object.summary()returns the tidy one-row-per-pair overview, as every other Nestimatesummary()does; the full tables are their own verbs:edge_differences(),node_differences(),global_differences(),network_metrics(), each with apaircolumn. All pairs by default, or every network against onereference =. - Ratios are guarded (
NA, neverInf/NaN); every cell is kept, absent edges appear at weight 0;higher(colour) andstatus(shape) columns drive the plots. -
plot(x)draws one view per call, selected withtype =(the package-wide argument name;what =is accepted as an alias):"networks"(default; each network drawn once viacograph::splot()),"difference"(the signed difference network of each pair),"edges"(ranked dumbbell),"nodes","global","heatmap","scatter", and"inference"(a forest of the edge differences on the difference scale, with credible intervals when the Bayesian backend ran, a filled marker for a significant edge and the p-value in a right-hand column; it raisesnestimate_compare_no_testwhentest = "none"). One sign-to-colour contract (#4A6FE3= first/reference higher,#D33F6A= second higher) backed by line type and marker shape; the heatmap scale follows the data. -
plot(x, combined = FALSE)splits a multi-pair view into a named list of single-pair plots (one per pair) instead of facetting them into one figure, matching thecombinedargument ofplot.net_reliability(),plot.simplicial_complex()and friends. The base-graphics views draw one panel per page. - Optional inference on the same tables:
test = "permutation","bayes"(with an optionalrope),"bootstrap", combinable. Non-significant results are faded, never deleted. -
permutation()gains a$globaldata frame with NCT-styleM(sum of absolute differences) andS(largest absolute difference) statistics and their permutation p-values, computed from the same null. -
compare_model()is unchanged and will be soft-deprecated oncecompare_networks()has been through one release.
Hypergraph suite
-
build_hypergraph()promotes a network’s k-cliques (k >= 3) to hyperedges, following Burgio, Matamalas, Gomez and Arenas (2020); underlying pairwise edges are retained.clique_expansion()projects a hypergraph back to a pairwise network in onetcrossprod()call, closing the event data ->bipartite_groups()-> hypergraph -> network cycle. -
hypergraph_measures()returns the structural-statistics suite (Lee, Choe and Shin 2024); an empty hypergraph returns trivial zeros rather than erroring.hypergraph_centrality()computes Benson’s (2019) three eigenvector centralities. -
hypergraph_laplacian()computes the normalized Laplacian, either the Zhou, Huang and Scholkopf (2006) form on the binary incidence pattern or the Hayashi, Aksoy, Park and Park (2020) weighted form. Built on it:hypergraph_cluster()(spectral clustering) andhypergraph_transduction()(semi-supervised label propagation), each with print, summary, plot andas.data.frame()methods.
Nestimate 0.9.1
tna-parity release: sequence-side gaps against tna::build_model() and tna::prepare_data() closed.
New estimators
-
build_network(method = "ngram")(paramsn_gram, default 2),"gap"(paramsmax_gap, default 1) and"reverse"(paramsweighted) mirror the tna types"n-gram","gap"and"reverse". Weights are numerically identical to tna on shared inputs (tested). All three accept wide or long input,start/endboundary markers,group =dispatch andscaling = "normalize"for row probabilities. - New aliases:
"n-gram"/"n_gram"->"ngram","co-occurrence"->"co_occurrence".
Timezone-safe timestamp parsing
-
prepare()andbuild_network()gaintimezone = "UTC"(Olson name). Naive timestamps are interpreted in that zone; ISO-8601Z/UTC/GMTmarkers and numeric offsets (+0200,+02:00) are converted from their offset. Parsing no longer depends on the machine’s local time zone. - Fixes:
...Ztimestamps parsed toNA(the marker was stripped before matching), offsets were silently ignored, and wall-clock readings inside a DST gap could turn into spurious session boundaries. Unparsable values now raise an error instead of becoming session breaks.
Nestimate 0.9.0
Delegation release: Nestimate stops owning psychometric-network math and delegates it to its two clean-room home packages, psychnets (cross-sectional) and idiographic (temporal). No public API changes: every signature, default, return shape, and — verified against frozen pre-delegation baselines — every number is preserved.
Delegated to psychnets (new hard dependency, >= 0.5.2)
- The
cor,pcor, andglassoestimators keep Nestimate’s input layer, validation, and return contract; the math now runs inpsychnets::cor_network()/pcor_network()/ebic_glasso(). Verified field-complete against the frozen baseline:corexact,pcorwithin 5.6e-17,glassoexact on weights, precision, selected lambda, and the EBIC path (includingpenalize.diagonalandrefitbranches). -
nct()delegates its inner EBIC-glasso solve; the NCT-specificnearPDsymmetrization stays local. Seeded runs: networks and p-values exact. -
boot_glasso()andpermutation()(glasso branch) delegate the per-resample solve viapsychnets::ebic_glasso(lambda_path = ), keeping the fixed-path-across-resamples semantics. Seededpermutation()is byte-identical;boot_glasso()is identical except wall-clock timing. - The internal pure-R glasso kernel (
glasso_pure.R) and its EBIC helpers are deleted; psychnets owns that math now. - The
isingandmgmestimators remain local for now (their delegation needs psychnets to expose per-node lambda selection and a scale passthrough) and are unchanged.
Delegated to idiographic (new hard dependency, >= 0.3.4)
-
build_mlvar()keeps its signature, S3 methods, and return object; the lmer estimation pipeline now runs inidiographic::fit_mlvar(). Verified identical at tolerance 0 (object, class, print, summary) across lag/standardize/day/beep configurations, and againstmlVAR::mlVAR()at 8.8e-16 over 954 checks. - When the between-subjects network is not estimable (a random-intercept SD of zero),
build_mlvar()now warns before returning the zero matrix; it previously returned it silently. Numbers are unchanged. -
build_gimme()delegates its whole search toidiographic::fit_gimme(). This is the one delegation that changes results: idiographic’s search reproduces the upstreamgimmepackage (>= 10.0) exactly, which Nestimate’s own search did not — the individual-level path search in particular under-detected person-specific paths relative to upstream. Group-level results are typically unchanged; individual-level path sets can grow. The signature and thenet_gimmefield contract are unchanged (the object gains idiographic’s netobject fields and now renders directly with cograph);print/summary/plotdispatch to idiographic’s methods. Treat pre-0.9.0build_gimme()individual-level results as superseded.
Nestimate 0.8.5
CRAN release: 2026-08-21
Bug-fix release. 0.8.4 was published on r-universe but never reached CRAN.
Plotting in non-UTF-8 locales
plot()onnet_entropy_bayesandnet_sequence_comparisonresults no longer fails where the graphics device cannot represent the arrow glyph. Edge labels and the comparison subtitle previously usedU+2192/U+2190, which a non-UTF-8 locale cannot convert; the graphics engine raised an error (conversion failure ... in 'mbcsToSbcs') rather than substituting a character, so the plot could not be drawn at all. Both now use the ASCII arrow notation (A -> B) already used by the higher-order network verbs. Console output is unaffected.plot()onnet_entropy_bayesresults no longer emits a deprecation warning under ggplot2 4.0, which removedgeom_errorbarh().
Rendering entropy networks with cograph
-
entropy_network()now renders with its intended transition-network styling on cograph 2.4.4, the current CRAN version. The object states its full style through cograph’smeta$splotproducer contract instead of relying on cograph recognising the"entropy"method name, so no cograph update is required. Output is identical under cograph 2.4.4 and 2.4.5.
Documentation
- The
print()andplot()examples for the MMM clustering attribute now reach it throughbuild_network(), matching the 0.8.4 change that madecluster_mmm()return the fittednet_mmmobject.
Nestimate 0.8.4
Transition matrix entropy
- New entropy suite around the entropy rate of a transition matrix (Shannon 1948; Cover & Thomas 2006, ch. 4; the transition entropy of Krejtz et al. 2015 and the real-time mobile transition matrix entropy of Krejtz et al. 2025):
-
transition_entropy()— entropy rate H (stationary distribution from the eigendecomposition at lambda = 1), stationary entropy, redundancy, per-state branching entropies, all with the normalized (scale-free) variants; print/summary/plot andnetobject_groupdispatch. -
entropy_network()— the exact edge-level decomposition of H: each edge carries its term pi_i P_ij log(1/P_ij); weights sum to H. Displays the summands of the entropy-rate equation — no new quantity is estimated.scaling = "share"relabels edges as percentages of H (sum = 100). Additional weights:"surprisal"(optionallyscaling = "chance") and"production"(irreversibility). The result is a regularnetobjectthat inherits its source network’s styling and ships an entropy house style via cograph’smeta$splotproducer contract, which states the styling outright rather than relying on cograph recognising the method name (cograph >= 2.4.4). -
entropy_trajectory()— sliding-window entropy over the transition stream (the windowed design of Krejtz et al. 2025): tidy per-window table, per-group trajectories, loess-trend plot; the per-window estimator weights rows by observed occupancy (robust to non-ergodic window fragments). -
entropy_bayes()— Dirichlet-posterior estimation: credible intervals for H, per-state entropies, and per-edge contributions; edges flagged credible when their share of H credibly exceedsmin_share;$modelholds the pruned stable entropy network.
-
- New vignette: Transition Matrix Entropy.
Mixed Markov clustering contract
-
cluster_mmm()now returns the fittednet_mmmclustering object, retaining assignments, posterior probabilities, mixing proportions, fit criteria, and fitted component models. Network materialization remains the responsibility ofbuild_network(fit)or the one-stepcluster_network(..., cluster_by = "mmm")workflow. -
as_htna()gains anet_mmmmethod. An MMM fit created from an HTNA model is materialized into anhtna_groupwithout rerunning the MMM fit, while the original actor partition and clustering diagnostics are preserved.
Nestimate 0.8.3
HTNA expansion
-
as_htna()still rebuilds one full node-level network from the original source, preserving every between-cluster transition, and now completes the canonical HTNA contract. Its result inherits fromhtna,netobject, andcograph_network; stores character actor labels in$node_groups$group, a factor in$nodes$groups, and actor order in$actor_levels; and retains actor-order metadata on$node_groupsfor lossless partition round trips, plus the legacy$nodes$clusterand"cluster_members"metadata.
Nestimate 0.8.2
Session grouping
-
prepare()now identifies sessions from the observed combinations of theactorandsessioncolumns instead ofbase::interaction(). Three defects are fixed:-
Integer overflow.
interaction()codes a combination over the marginal level space, which exceeds.Machine$integer.maxonce both columns pass 46,341 distinct values. The resultingNAs were pasted into the literal string"NA", merging unrelated events into one pseudo-session. On 50,000 actor-session pairs this silently discarded 14% of sessions and manufactured transitions that no input sequence contained, including self-loops on terminal states. -
Separator collisions. Identifiers were pasted with
" | "before being used as a grouping and metadata merge key, so("a | b", "c")and("a", "b | c")collapsed into a single session. Grouping now keys on the original columns; the readable label is display-only and is exposed as.session_labelinmeta_data. - Missing identifiers. Missing values in a grouping column silently changed the session count. They now raise an error naming the columns.
Group numbering reproduces
interaction()’s ordering, so prepared row order and finite same-seed bootstrap results are unchanged. -
Integer overflow.
time_threshold = FALSEswitches session-interval splitting off, so each actor (or actor-session) forms a single sequence regardless of gap length. Accepted byprepare(),build_network()andbuild_mcml().
Testing
- Added a randomized grouping sweep over 1,000 seeded datasets covering actor/session column counts, identifier vocabularies including separator and UTF-8 cases, time on and off, tied timestamps, explicit order columns, shuffled input, and time-gap structures that split, do not split, or sit exactly on the threshold. Verified against ground truth and against
interaction()for row-order compatibility.
Nestimate 0.8.1
HTNA interoperability
Distance clustering and mixed-Markov clustering now preserve HTNA inputs.
build_clusters()andcluster_mmm()carry the node-to-actor partition into network materialization, whilecluster_network()returns anhtna_groupdirectly. Every child remains anhtnaobject with$node_groups,$nodes$groups, and$actor_levels; clustering assignments, posterior probabilities, fit diagnostics, and other outer attributes remain attached.Added extensive randomized equivalence coverage across distance clustering, mixed-Markov clustering, all transition-network estimators, actor-absent clusters, and HTNA-versus-plain input paths.
Nestimate 0.8.0
CRAN release: 2026-07-10
Documentation
The Bayesian verbs get their own reference section, placed directly after Network Estimation:
certainty(),bayes_compare(),subtract_networks()andas_netdifference(). They were previously buried in a fourteen-entry “Bootstrap & Inference” list.bootstrap_network()now points atcertainty()as its closed-form counterpart, andpermutation()points atbayes_compare()as its Bayesian complement, so each pair is reachable from either side.frequencies()is no longer marked\keyword{internal}. The topic page and the exported function share a roxygen topic name, so the keyword from the topic block leaked onto the function’s own help page even though the function is exported (and called by the package).cluster_data()keeps its internal keyword: it is a deprecated alias forbuild_clusters()and is meant to stay out of the index.Dropped the
utilshelp page, which documented no exported object. The@importFromdirectives it carried are retained.audit_codex/is no longer tracked; it holds generated audit artifacts.
Dependencies
-
Suggests: cograph (>= 2.4.4). The netdifference verbs added in 0.7.8 need cograph 2.4.x: CRAN’s cograph 2.3.6 contains nonetdifferencesupport, socograph::plot_difference()does not exist there andcograph::splot()on anetdifferencefalls through to the plainnetobjectrenderer and silently draws an unsigned network. Nestimate must not be submitted to CRAN before cograph 2.4.4 is available there.
Nestimate 0.7.8
New features
subtract_networks()/as_netdifference()— verbs for the difference between two networks.subtract_networks(x, y)returns the edge-wise difference as anetdifferenceobject;as_netdifference()promotes an existing comparison result to the same class — abayes_compare()result, or anetdifference, which passes through; anything else errors — so a difference computed by any route prints the same way. Addsprint.netdifference.bayes_compare()accepts twonet_edge_betweenness()objects (source method"relative"only). Edge betweenness is recomputed on every posterior draw, giving the Bayesian analogue ofpermutation()’s edge-betweenness dispatch, with posterior mean betweenness matrices and the plug-inobserved_diff.permutation()gains ameasuresargument for centrality permutation tests, matching thetnapackage’s dispatch.
Enhancements
bayes_compare()’s probability-of-direction column is renamedpd->p_differencein thesummary()frame, and the result now carries classc("net_bayes", "netdifference", "net_permutation")so it dispatches to the difference verbs as well as the permutation ones.Non-ASCII characters normalized across R sources and man pages.
Bug fixes
centrality_stability()no longer errors with “missing value where TRUE/FALSE needed” when a requested measure is undefined on the network (e.g.DiffusionisNaNon a small cyclic net):sd()returnedNA, which poisonedif (!any(keep)). Such measures now drop like zero-variance ones.centrality_stability()’s defaultmeasuresis restored toc("InStrength", "OutStrength", "Betweenness"). 0.7.7 had swappedOutStrengthforDiffusion, which broke the package: it callscentrality_stability()with nomeasuresand compares the result against its own explicit trio.centrality()/net_centrality()keep theDiffusiondefault; onlycentrality_stability()reverts.Suggests: cographrelaxed from(>= 2.4.4)to(>= 2.3.6), the version available on CRAN.Additional_repositoriesremoved — every declared dependency now resolves from CRAN.
Nestimate 0.7.7
Enhancements
-
plot()on anet_centrality_groupgainstype = "delta", showing the between-group difference per measure, and now supports three or more groups. Zero-valued edges can be blanked withdrop_zero = TRUE.
Nestimate 0.7.6
New features
-
plot()on anet_edge_betweenness()result (plot.net_edge_betweenness).
Enhancements
-
plot()on centrality results gains alternative views:type = c("bar", "line", "heatmap")for a singlenet_centrality, andtype = c("bar", "line", "delta")for anet_centrality_group. Count-like measures get integer axis labels.
Nestimate 0.7.4
New features
-
as_htna()— builds a grouped node-level network from data and a clustering, keeping every node (unlikecluster_summary(), which collapses to a cluster-level macro summary). Intended forcograph::plot_htna().
Enhancements
Centrality gains the
tna-parity measures.net_centrality(x, measures = "all")now returnsOutStrength,InStrength,ClosenessIn,ClosenessOut,Closeness,Betweenness,BetweennessRSP,DiffusionandClustering— previously only the strengths,ClosenessandBetweenness. Addsplot.net_centralityandplot.net_centrality_group.sequence_plot()and the MCML plots gain layout refinements.
Nestimate 0.7.3
New features
as_netobject()/validate_netobject()— the boundary layer between (which owns the psychometric-network math and emits a leancograph_network) and Nestimate (which owns the canonicalnetobjectschema).as_netobject()promotes apsychnetresult or a barecograph_networkto the dual-classc("netobject", "cograph_network")so it dispatches to every Nestimate verb, parking psychnet-specific fields (including the GLASSO KKT certificate) under$meta$psychnet;netobjects pass through unchanged.validate_netobject()enforces the shared structural contract so schema drift on either side fails loudly.psychnetis not a declared dependency — Nestimate never calls it; the converter works by S3 dispatch on whateverpsychnetobject the caller supplies.certainty()— analytic Bayesian counterpart ofbootstrap_network()for transition networks. Models each state’s outgoing transitions as a Dirichlet-Multinomial process (Jeffreys prior) and returns posterior mean, sd, credible interval and a stability decision per edge in closed form (no resampling). Returns the exactnet_bootstrapobject layout and carries classc("net_certainty", "net_bootstrap"), so it is a drop-in: everynet_bootstrapmethod works on it. Completes the assessment trio certainty / stability (bootstrap_network) / reliability (reliability).
Enhancements
sequence_plot()gains a multichannel view formcmlobjects built from sequences.sequence_plot(fit)draws one carpet panel per cluster channel plus a macroSummarypanel — each channel’s own states solid, the other clusters a faded wash, finished cells white, rows aligned by the macro sequence.sequence_plot(fit, type = "distribution")stacks the prevalence (own states + faded other clusters + an explicitNAband, to 100%), andnormalize = TRUEgives a TraMineR-styleseqdplotwhere each time point sums to 1. ggplot-based and dependency-free; returns aggplotobject.bayes_compare()results are now 100% compatible with thepermutation()format: the object carries classc("net_bayes", "net_permutation")with allnet_permutationslots (diff_sig,p_values,effect_size,iter,alpha,paired,adjust), and itssummaryis a superset ofsummary.net_permutation(from, to, weight_x, weight_y, diff, effect_size, p_value, sigplus the Bayesian extrascount_x, count_y, ci_lower, ci_upper, ci_width, pd). Abayes_compare()result is now a drop-in wherever anet_permutationis consumed.
Nestimate 0.7.2
New features
-
bayes_compare()— Bayesian Dirichlet-Multinomial comparison of two transition networks, a complement topermutation(). Models each source state’s outgoing transitions as a Dirichlet-Multinomial process (Jeffreys prior) and returns, per edge, a posterior mean difference, a credible interval, the probability of direction (pd) and its two-sided p-equivalent. Addsprint/summary/plotmethods andnetobject_groupdispatch (all-pairwise or matched). Method source: Johnston & Jendoubi (2026), How Delivery Mode Reshapes Resource Engagement: A Bayesian Differential Network Analysis, TNA Workshop 2026.
Nestimate 0.7.1
New features
-
as_networks()— promote abuild_mcml_pc()result into anetobject_group(the psychometric-network counterpart ofas_tna()). Singleton clusters with no within-network are dropped with a warning; an existingnetobject_grouppasses through unchanged.
Documentation
- Vignettes and articles now call package verbs directly instead of hand-assembled base-R subsetting rituals:
markov_order_test()reads sequences straight from a fitted network (markov_order_test(net)); HYPA anomaly tables usesummary(hypa, order_by = "ratio"); higher-order pathways usepathways(hon, top = ); grouped-clustering inspection usescluster_diagnostics().
Nestimate 0.7.0
New features (experimental)
-
build_mcml_pc()— MCML aggregation for psychometric networks (cor / pcor / EBICglasso). Five aggregation methods with explicitly different statuses:"average"(descriptive block-mean; works without raw data),"composite"(cluster scores re-estimated with the chosen estimator — a genuine cluster-level network),"loadings"(composites weighted by mean within-cluster connection strength — Nestimate’s own weighting, not an EGA reimplementation),"rv"(Escoufier’s RV matrix correlation between blocks), and"canonical"(first canonical correlation — the upper bound for composite methods). Within-cluster networks re-estimated by default (within = "reestimate") since a pcor submatrix is not the subsystem’s pcor network. Item diagnostics in$loadings: signed loadings (reverse-keyed items detected via the leading eigenvector of the within-block matrix and flipped in composites), cross-cluster strengths, and amisfitflag when an item is more connected to another cluster than its own (warned). Composites tolerate missing data (row-wise renormalized weighted means); Composite item weights are selectable viaweighting— ten built-in schemes spanning three views of the cluster: the scale as scored ("equal","item_total"), the network’s view ("strength","eigen","closeness","betweenness","expected_influence","specificity"— the misfit margin as a weighting, zeroing items that belong as much to another cluster), and the latent-variable view ("pca","factor"); plus fully custom weighting via a named numeric vector or afunction(W_block, data_block, nodes).aggregation = "loadings"is the alias for composite + strength. The"factor"weighting exposes its extraction method viafa_method:"ml"(factanal),"paf"(iterated principal axis),"minres"(ULS), or"cfa"(one-factor lavaan model; withcor_method = "polychoric"the categorical DWLS factor model) — all operating on thecor_method-consistent correlation structure. Reverse-keyed handling works under every sign-carrying scheme (item-total correlations are computed on eigen-sign-pre-oriented columns so a reversed member cannot contaminate small clusters).cor_method = "polychoric"(via lavaan) supports ordinal items;id_coldrops identifier columns soconvert_sequence_format(format = "frequency")actor-profiles feed the function directly (the within-person co-occurrence view of event data). Returns classmcml_pc(macro + within netobjects, all undirected) with print/summary/plot; the composite/loadings macro is a full netobject, sobootstrap_network(),vertex_bootstrap(), andvertex_compare()apply to it directly.cograph::plot_mcml()(>= 2.3.8) renders the two-layer undirected MCML view. Experimental: API and formulas may change. -
loading_stability()— case-bootstrap stability of thebuild_mcml_pc()composite weights (percentile CIs, sign-flip rates), with print and forest-style plot.
Nestimate 0.6.5
New features
-
vertex_bootstrap()— Snijders & Borgatti (1999) vertex bootstrap for network-level statistics (density, mean weight, strength centralization, weighted reciprocity, plus customstatistic_fn). Needs only the weight matrix, so it works on data-less netobjects (build_mlvar()constituents,as_tna(mcml)elements, plain matrices) wherebootstrap_network()cannot run. Returns a tidy one-row-per-statisticnet_vertex_bootstrapwith print/summary/plot. Self-loops are preserved (diagonal carries the resampled vertex’s own self-weight); undirected replicates stay symmetric. -
vertex_compare()— the Snijders & Borgatti two-network test the vertex bootstrap was originally proposed for: z-tests and normal-approximation CIs for differences in network-level statistics between two networks (netobjects, matrices, or precomputednet_vertex_bootstrapobjects). Tidynet_vertex_comparisonresult with print/summary/plot (forest plot of differences). -
bootstrap_network()andvertex_bootstrap()gainci_method = c("percentile", "basic"): basic intervals (Davison & Hinkley 1997, eq. 5.6) reflect the percentile bounds around the observed estimate, correcting first-order bootstrap bias. Default remains"percentile".
Nestimate 0.6.4
Bug fixes
-
build_mcml()(sequence and edge-list paths) now records the effective directedness in$meta$directed:FALSEwhentype = "cooccurrence", whose weights are symmetrized, instead of echoing thedirectedargument unchanged. Renderers that auto-detect directedness (e.g.,cograph::plot_mcml()withdirected = NULL) now draw co-occurrence MCML objects as undirected networks automatically.
Nestimate 0.6.3
New features
-
mosaic_analysis(data, var1, var2)— two-variable mosaic analysis on adata.frame: chi-square or Fisher test, Cramer’s V (df-adjusted effect size) and a flat mosaic plot. Returns classmosaic_analysiswith a tidy one-row-per-cell$counts, a one-row$stats, and print/summary/plot. Distinct frommosaic_plot(), which draws from a fitted network object.
Enhancements
-
mosaic_plot()gainsstyle = c("classic", "flat"). The flat style uses variable-width columns, white gutters and in-tile or side labels, sharing the classic style’s geometry and diverging palette;values = TRUEprints residuals inside the tiles.
Nestimate 0.6.1
New features
build_network()and the transition wrappers (build_tna(),build_ftna(),build_atna(),build_cna()) gainstartandendboundary markers:FALSE(default),TRUE(labels"Start"/"End") or a custom string.startprepends a source state to every sequence;endplaces a sink in the single cell after each sequence’s last non-NAstate (not absorbing — seemark_terminal_state()for that). Honoured by therelative,frequency,co_occurrenceandattentionestimators; other methods error.build_mmm()gainscovariate_effect."em"(default) folds covariates into the EM as covariate-dependent mixing, changing the fit;"posthoc"fits a plain mixture and uses covariates only for the after-fit multinomial logit, leaving the clustering bit-identical to a no-covariate fit.
Nestimate 0.6.0
CRAN release: 2026-05-31
New features
-
magnitude_difference()compares the frequency (FTNA) and probability (TNA) views of a transition network and quantifies the per-edge discrepancy on a common scale, with five metrics, four scalings, and two polarplot()portraits (stacked and circular). - Full persistent homology with a Vietoris-Rips filtration (
persistent_homology(),build_simplicial(type = "vr")) plus diagram toolsbottleneck_distance()andpersistence_landscape(). - Network comparison:
compare_model()(withnetobject_groupdispatch),summary.netobject(),plot.net_comparison(), andrename_models()for relabelling grouped network objects.
Documentation
- The pkgdown reference index now lists every exported function;
magnitude_difference(),casedrop_reliability(),build_hypergraph(),hypergraph_measures(), andcluster_data()were previously absent.
Nestimate 0.5.1
Audit follow-up (clustering + MCML)
Followed codex_docs/audit_clustering and codex_docs/audit_mcml recommendations across two modules. Eleven of thirteen findings addressed; two deferred pending design decisions on numeric semantics (directed = FALSE raw-data MCML, MMM first-non-NA initial state).
Bug fixes
-
cluster_network()now forwards distance-clustering arguments (na_syms,weighted,lambda,seed,q,p,covariates) tobuild_clusters()instead of silently passing them tobuild_network(). The split runs on caller...only — netobjectbuild_argscontinue to flow only to thebuild_network()step, protecting attention-method (atna) network history from being re-routed to weighted Hamming. (audit_clustering item 1) -
.auto_detect_clusters()(used bybuild_mcml()andcluster_summary()) now requiresnode_groupsto carry a node identifier column when shaped as a data.frame, or be a named atomic vector keyed by node label. Previously, a barecluster-only data.frame was read positionally — silently mis-assigning nodes whenevernode_groupsrows were in a different order thanx$nodes. (audit_mcml item 1) -
build_clusters()now rejects all-missing input early with a clear message instead of failing indirectly downstream in pam/hclust. (audit_clustering item 4)
New parameters
-
compare_mmm(return_fits = FALSE)— whenTRUE, the fittednet_mmmmodels are attached asattr(result, "fits")keyed byk, so users can pick the chosen model without re-running EM. Default behaviour unchanged. (audit_clustering item 6)
Improvements
-
build_clusters()validation messages now name the offending argument ("'k' must be at least 2 (got k = 1)") rather than dumping the failing predicate. Top-level type checks switched to named-conditionstopifnot()for the same reason. (audit_clustering item 2)
Documentation
-
summary.mcml()roxygen corrected — was claiming a printing side effect that doesn’t exist. (audit_mcml item 5) -
build_mcml()clusters = "<col>"mode now documents its narrow contract: assigns each row’s group label to both endpoints, so it only makes sense for within-group edge lists. (audit_mcml item 2) -
build_mcml()methodparameter doc now steers raw sequence / event-log inputs to"sum", since the function counts observed transitions. Other methods are for weighted edge lists or pre-existing matrices. (audit_mcml item 4) -
as_tna.mcml()“Excluded Clusters” section corrected — drop emits awarning()(was claimed silent) and only fires forrelativemethod (was claimed unconditional). (audit_mcml item 6) -
build_clusters()na_symsdoc adds an explicit “Missing-value distance rule” subsection: NA becomes a comparable sentinel state, not pairwise deletion. (audit_clustering item 3) -
build_mmm()adds an “Initial states” section explaining first-column-verbatim init and that build_mmm does NOT honor build_clusters-stylena_syms— only actualNAcells become NA inits. (audit_clustering item 5, doc-only path)
Tests
- +12 new tests pinning the corrected contracts and the documented edge cases (misordered
node_groupsalignment, label propagation throughstate_distribution(),as_tna.mcml()drop-warning fixture, MMM first-column NA behaviour, and the four-waycluster_network()arg-routing contract). Full sweep: 1628 / 1628 pass, 0 fail.
Nestimate 0.5.0
Bug fixes
-
.extract_edges_from_matrix()no longer drops the diagonal. Netobjects built via.wrap_netobject()(and therefore everything frombuild_network(),build_mcml(),bootstrap_network(),build_mmm(),wtna(),as_tna()) now have$edgescontaining every non-zero matrix entry, including self-loops. Previously$weightsand$edgeswere silently inconsistent on any matrix with a non-zero diagonal, causing downstream consumers (e.g.cograph::centrality()on an MCML macro) to under-count node degree by 2.
New features
-
plot_state_frequencies()— native S3 generic for state-frequency plots acrossnetobject,netobject_group,mcml, andhtna. Defaults to a marimekko (mosaic) layout where column widths reflect per-group totals and segment heights reflect within-group state proportions; also supports a colored-bars style and a per-group faceted marimekko. Uses the package Okabe-Ito palette throughout. -
plot_mosaic()— exported low-level marimekko primitive built ongeom_rect()with cumulative-width / cumulative-height geometry. Reusable for any tidydata.frame(group, state, weight)input.
Nestimate 0.4.4
Bug fixes
-
passage_time()andmarkov_stability()now raise an explicit error naming the dead state when a transition-matrix row sums to zero, instead of silently propagatingNaNthrougheigen/solve. Zero rows mean the chain is not ergodic; mean first passage times are undefined. Shared helper.mpt_normalize_rows()factored out of both entry points. -
.prepare_association_input()no longer hard-rejects non-square numeric matrices. For association methods (glasso, pcor, cor) the netobject’s$dataslot is a numeric matrix (not a data.frame). Any downstream caller that row-subsetted$dataand re-invoked the estimator (centrality_stability(),bootstrap_network(),reliability()) was silently producing NULL centralities caught bytryCatch, which surfaced as an “all centrality measures have zero variance” warning or all-NaNcorrelations. The matrix branch now recognises non-square input as raw observation data and recursively re-enters through the data-frame branch. Square symmetric matrices (pre-computed correlation / covariance) still go through the symmetric-matrix path with the symmetry check intact.
New parameters
-
build_network()gainsstate_colsandmetadata_colsparameters (both defaultNULL). Explicit overrides for the state-vs-metadata column classifier, which previously used a “values-in-nodes” heuristic that silently misclassifies metadata columns whose values coincide with node labels (e.g. aconditioncolumn with levels"A","B","C"when nodes are"A","B","C"). Validation: error on overlap between the two vectors, error on column names not present in the input data. Forwarded through thegroup = ...recursive dispatch so per-group calls honour the override.
Removed
-
plot.net_link_prediction()andplot.mcml()removed. Nestimate is a computation engine — visualization is the user’s concern. Previously both methods calledcograph::directly, violating the stated dependency invariant (Nestimate -> cograph direction forbidden). Users callcograph::splot(net)orcograph::plot_mcml(fit)directly.
Documentation
-
wtna()@param typenow flags thattype = "relative"combined withmethod = "cooccurrence"produces an asymmetric matrix (conditional co-occurrence given row state), not a symmetric undirected weight matrix. Usetype = "frequency"if symmetric counts are required.
Testing infrastructure
- New numerical-equivalence tests (gated by
NESTIMATE_EQUIV_TESTS=true):test-equiv-permutation.R(vs.stats::p.adjust+ hand-coded base-R permutation loop),test-equiv-mlvar.R(vs.mlVAR::mlVARat machine precision),test-equiv-association-rules.R(vs.arules::apriori),test-equiv-link-prediction.R(vs. clean-room matrix algebra +igraph::similarity),test-equiv-centrality-stability.R(vs.bootnet::corStability). Total ~162k per-value comparisons; all within machine precision except centrality-stability which uses a documented drop-grid tolerance because bootnet usesigraphpath-based centrality and Nestimate uses Floyd-Warshall. - New HON-family equivalence tests under
local_testing_and_equivalence/validating HON, HONEM, HYPA, MOGen, and hypergraph against pathpy 2.2.0 (via reticulate),BiasedUrn,RSpectra, andHyperG. Not shipped in the R-packagetests/directory; added to.Rbuildignore. - Branch-matrix coverage added for the four many-mode APIs (
wtna,bootstrap_network,build_clusters,sequence_plot) — systematic cross-product tests over all combinations of mode parameters to catch regressions where one branch silently diverges.
Nestimate 0.4.3
CRAN release: 2026-04-20
CRAN resubmission (addresses incoming-check NOTEs on 0.4.2)
- Tarball now ships
build/vignette.rds(the vignette index). Previous 0.4.2 build usedR CMD build --no-build-vignettes, which preserved pre-builtinst/doc/*.htmlbut stripped the index — CRAN flagged “VignetteBuilder field but no prebuilt vignette index.” -
test-gimme.Rnowskip_on_cran(). GIMME tests fit a lavaan SEM per subject and took ~50s locally (2-3× on Windows), pushing total check time to 11 min on win-devel. Full test suite still runs in CI and local dev.
Nestimate 0.4.0
New functions
-
build_mlvar()— multilevel VAR networks from ESM/EMA panel data. Estimates temporal (directed), contemporaneous (undirected), and between-subjects (undirected) networks matchingmlVAR::mlVAR()at machine precision. -
build_mmm()/compare_mmm()— mixture of Markov models via EM, with BIC/AIC/ICL model selection and optional covariate regression. -
cooccurrence()— standalone co-occurrence network builder supporting 6 input formats and 8 similarity methods. -
sequence_compare()— k-gram pattern comparison across groups with optional permutation testing. -
sequence_plot()/distribution_plot()— base-R sequence index and state distribution plots with clustering integration. -
build_simplicial(),persistent_homology(),q_analysis()— topological analysis of networks via simplicial complexes. -
nct()— Network Comparison Test matchingNetworkComparisonTest::NCT()at machine precision. -
build_gimme()— group iterative mean estimation for idiographic networks via lavaan. -
passage_time(),markov_stability()— Markov chain passage times and stability analysis. -
predict_links()/evaluate_links()— link prediction with 6 structural similarity methods. -
association_rules()— Apriori association rule mining from sequences or binary matrices. -
predictability()— node predictability for glasso/pcor/cor networks. -
build_hon(),build_honem(),build_hypa(),build_mogen()— higher-order network methods (HON, HONEM, HYPA, MOGen) nowcograph_network-compatible.
New datasets
-
human_long,ai_long— canonical long-format human–AI pair programming interaction sequences (10,796 turns, 429 sessions). -
chatgpt_srl— ChatGPT-generated SRL scale scores for psychological network analysis. -
trajectories— 138-student engagement trajectory matrix (15 timepoints, 3 states).
API
-
build_clusters(),network_reliability(),permutation(), andprepare()replace earlier internal names for consistency with thebuild_*naming convention. -
mgmestimator added (method = "mgm") for mixed continuous + categorical data via nodewise lasso, matchingmgm::mgm()at machine precision.
Bug fixes
-
build_mmm()no longer crashes on platforms whereparallel::detectCores()returnsNA(macOS ARM64 CRAN check failure). -
gimmeconvergence filter now correctly handles all typedNAvariants (NA_character_,NA_real_, etc.). -
NaNvalues in numeric metadata aggregation (all-NAsessions) normalized toNA_real_. - HYPA p-values corrected;
hypa_scorecolumn renamed top_value.
CRAN compliance
-
.datapronoun added toglobalVariables(). -
base::.rowSums()/base::.colSums()replaced withrowSums()/colSums(). -
dev.new()guarded byinteractive()— no side effects under knitr or CI. - Equivalence test files excluded from the built tarball.
Performance
-
do.call(rbind, ...)replaced withdata.table::rbindlist()inmcml.Randsequence_compare.R.
Nestimate 0.3.4
- HYPA: Renamed
hypa_scorecolumn top_valuefor clarity. Added$over,$under,$n_over,$n_underfields tonet_hypaobjects. Scores are now pre-sorted with anomalous paths first. - HYPA:
summary.net_hypa()now shows over/under-represented paths separately with a configurablenparameter. -
pathways.netobject(): New S3 method to extract higher-order pathways directly from a netobject (builds HON or HYPA internally). -
path_counts(): Now handles NAs in trajectories by stripping them before k-gram counting.
Nestimate 0.2.0
- Reduced hard dependencies from 6 to 4 Imports (ggplot2, glasso, data.table, cluster).
- Removed igraph from Imports —
centrality_stability()andboot_glasso()now accept acentrality_fnparameter for external centrality computation. - Removed tna from Imports — moved to Suggests (only used for input class detection).
- Implemented
graphical_var()from scratch using coordinate descent lasso + graphical lasso with EBIC model selection, eliminating the graphicalVAR dependency. - Dropped
ml_graphical_var()— users should usemlvar()for multilevel VAR. - Removed cograph plot wrappers —
plot.netobject(),plot.net_bootstrap(),plot.net_permutation(),plot.net_hon(),plot.net_hypa()andas_cograph()removed. Users call cograph plotting functions directly on netobjects. - Added
attentionestimator for decay-weighted transition networks. - Increased test coverage from 84.5% to 96.1% (2780 tests).
- Passes R CMD check with 0 errors, 0 warnings, 0 notes.
Nestimate 0.1.0
- Initial release. Split from Saqrlab v0.3.0.
- Core estimation via
build_network()with 8 built-in estimators. - Bootstrap inference (
bootstrap_network()), permutation testing (permutation()), EBICglasso bootstrap (boot_glasso()). - Higher-order networks: HON, HONEM, HYPA, MOGen.
- GIMME, MCML, multilevel VAR, graphical VAR.
- Temporal network analysis and velocity TNA.
- Dual-class
c("netobject", "cograph_network")output for cograph compatibility.