Ecosystem Contracts
NetworkCore.jl is the foundation every model package in the ecosystem depends on, so it is where the shared contracts live: the small vocabularies that let ERGM, Siena, REM, Revel, TERGM and the rest mean the same thing by the same keyword. A contract is defined once, here, and imported by name wherever it is honoured — never redefined locally.
There are four, each documented below or linked from here:
| Contract | Keyword | Vocabulary |
|---|---|---|
| Missing data | missing= | MISSING_POLICIES |
| Tied events | ties= | TIE_POLICIES |
| Conversion | report= | ConversionReport |
| Separation | none: a fit property | SeparationVerdict |
Missing-Data Contract
A masked dyad is unobserved, not absent. The distinction is the whole point: reading the stored face value of an unobserved tie silently invents data, and turns a partially observed network into plausible, wrong output.
The contract has two halves. A routine declares whether it has a principled missing-data treatment with supports_missing, and enforces the caller's choice with require_observed.
The rule it enforces: no exported routine may return a number computed from the face value of an unobserved tie unless the caller asked for it in writing.
function my_measure(net; missing::Symbol=:error)
require_observed(net, missing; context="my_measure")
# ... safe to read face values from here
endDownstream packages expose this as the missing= keyword. missing=:error (the default) refuses masked data; missing=:face is the explicit, auditable opt-in to face values where a routine offers it — and not every routine does. An estimator for which reading face values would enumerate unobserved dyads as observed rows (TERGM, ERGMCount, ERGMMulti, ...) exposes no missing= keyword at all, and ERGM.jl's MCMC entry points use their own vocabulary (:condition_on_face).
So each routine declares the policies its keyword actually takes with missing_policies. The default (:error,) is the honest answer for a routine without the keyword. The ecosystem's capability-matrix generator prints missing_policies(f) for every routine it lists, instead of assuming :face everywhere, and the shared error message raised by require_observed mentions missing=:face only when the caller passed face_ok=true. A routine with its own opt-in vocabulary appends its bullets to that one message through require_observed(...; hint=) (ERGM's missing=:condition_on_face / missing=:mle) rather than rethrowing it with text glued on.
For a shared generic — gof, which has one method per package — the one-argument form cannot speak for any package's method, so packages declare NetworkCore.missing_policies(::typeof(gof), ::Type{<:TheirResult}) and tooling asks the two-argument form missing_policies(gof, ResultType); the fallback missing_policies(f, ::Type) = missing_policies(f) makes that query uniform.
NetworkCore.supports_missing — Function
supports_missing(x) -> BoolWhether the routine, model type, or estimator x implements a principled treatment of missing (unobserved) dyads.
This is the ecosystem's missing-data trait. It defaults to false: a routine that has not declared a missing-data method is assumed not to have one, and callers guard with require_observed so that a partially observed network cannot be silently analysed at face value.
A routine opts in by defining a method:
my_density(net; missing=:error) = (require_observed(net, missing; context="my_density");
ne(net) / (nv(net) * (nv(net) - 1)))
NetworkCore.supports_missing(::typeof(my_density)) = true
supports_missing(my_density) # true
supports_missing(sum) # false — the defaultSee also require_observed, n_missing_dyads.
NetworkCore.missing_policies — Function
missing_policies(f) -> Tuple{Vararg{Symbol}}The missing-dyad policies routine f actually accepts through its missing= keyword — the routine-level vocabulary of the missing-data contract.
MISSING_POLICIES is the vocabulary require_observed understands; missing_policies(f) is the subset (or, for a package with its own vocabulary, the variant) that a particular routine offers. Tooling such as the ecosystem's capability-matrix generator prints missing_policies(f) for each routine instead of assuming that :face is the opt-in everywhere — which it deliberately is not.
- The default is
(:error,): a routine that exposes nomissing=keyword refuses a masked network and offers no escape hatch. That is the correct answer for an estimator (TERGM, ERGMCount, ERGMMulti, ...) for which reading face values would enumerate unobserved dyads as observed rows. - A routine that offers
missing=:facedeclaresNetworkCore.missing_policies(::typeof(f)) = (:error, :face)— asnetwork_densitydoes, and as every SNA descriptive measure with amissing=keyword is expected to. - A package with its own vocabulary declares it here too: ERGM.jl's MCMC entry points accept
(:error, :condition_on_face), and:faceis not among them, so the generator (and the error message) must not say that it is.
The declared tuple must start with :error, the policy every routine honours.
missing_policies(f, ::Type{R}) -> Tuple{Vararg{Symbol}}Per-result-type form for a shared generic. A verb such as gof has one method per package (gof(::ERGMResult), gof(::STERGMResult), ...), so a one-argument missing_policies(gof) cannot speak for any of them; a package declares NetworkCore.missing_policies(::typeof(gof), ::Type{<:MyResult}) instead, and tooling asks the two-argument form for shared verbs. The fallback missing_policies(f, ::Type) = missing_policies(f) makes the two-argument query uniform: for a routine that owns its name it answers exactly what the one-argument form does.
Example
using NetworkCore
missing_policies(network_density) # (:error, :face)
missing_policies(sum) # (:error,) — no `missing=` keyword at all
missing_policies(network_density, Network) # (:error, :face) — the fallback
# a routine declaring the policies it takes
function my_measure(net; missing::Symbol=:error)
require_observed(net, missing; context="my_measure")
# ...
end
NetworkCore.missing_policies(::typeof(my_measure)) = (:error, :face)
# a package's method of a shared generic declares per result type
struct MyResult end
NetworkCore.missing_policies(::typeof(gof), ::Type{MyResult}) = (:error, :condition_on_face)
missing_policies(gof, MyResult) # (:error, :condition_on_face)
missing_policies(gof) # (:error,) — the generic itself promises nothingSee also supports_missing, require_observed.
NetworkCore.require_observed — Function
require_observed(net, policy::Symbol=:error; context::AbstractString="this routine") -> netGuard a routine against silently reading unobserved ties at face value.
Returns net unchanged when the network has no masked dyads, or when policy === :face (the caller has explicitly accepted face values). Throws an ArgumentError naming context when the network has masked dyads and policy === :error.
face_ok says whether the CALLING routine actually exposes a missing= keyword the user could set to :face. Most estimators do not, and must not: for TERGM/ERGMCount/ERGMMulti a :face fit would enumerate unobserved dyads as observed, which is exactly the silent data-invention this contract exists to stop — so they call require_observed(net; face_ok=false) and the error omits an instruction the caller could not follow. Suggesting a keyword that does not exist is its own small lie.
hint is appended verbatim to the refusal, after the shared bullets: a routine with its OWN opt-in vocabulary (ERGM's missing=:condition_on_face / missing=:mle) adds the bullets naming the policies it does take, in the one message, instead of catching the shared error and rethrowing it with text glued on. Format it as the shared bullets are (" • ...\n") so the list reads as one.
This is the enforcement half of the ecosystem missing-data contract; see supports_missing for the declaration half.
Example
# a routine that CAN read face values, on request
function my_measure(net; missing::Symbol=:error)
require_observed(net, missing; context="my_measure")
# ... safe to read face values from here
end
# an estimator that cannot represent an unobserved dyad at all
function my_estimator(net)
require_observed(net; context="my_estimator", face_ok=false)
end
# an estimator with its own opt-in, named in the same message
function my_mcmc_fit(net)
require_observed(net; context="my_mcmc_fit", face_ok=false,
hint=" • pass `missing=:condition_on_face` to hold the " *
"masked dyads at their stored value during MCMC.\n")
endNetworkCore.MISSING_POLICIES — Constant
MISSING_POLICIESThe missing-dyad policies accepted by require_observed:
:error— refuse to analyse a network with masked dyads (the default).:face— explicitly opt in to using the stored face value of each masked dyad, i.e. treat "unobserved" as "as recorded". Auditable, never implicit.
Example
MISSING_POLICIES # (:error, :face)
:face in MISSING_POLICIES # trueSee also the Missing Data guide and the missing-dyad mask API on the Types page.
Tied-Event Contract
For the models with an event clock (REM.fit_rem, Revel.fit_revel), two events sharing a timestamp is not a nuisance to be sorted away — an exact-time or exact-order likelihood evaluated on tied data is evaluated on information the data does not contain.
So the vocabulary starts from refusal (ties=:error is the default) and every alternative is an explicit, recorded claim about what a simultaneous pair means. A policy a model cannot honour is refused loudly by check_tie_policy rather than silently no-oping.
NetworkCore.TIE_POLICIES — Constant
TIE_POLICIESThe ecosystem vocabulary for tied event times — one keyword (ties=), one set of symbols, one meaning per symbol, across every model with an event clock (REM.fit_rem, Revel.fit_revel).
A tie is not a nuisance to be sorted away: an exact-time or exact-order likelihood evaluated on tied data is evaluated on information the data does not contain. So the vocabulary starts from refusal and every alternative is an explicit, recorded claim about what a simultaneous pair means:
:error— refuse to fit when two events share a timestamp. The default wherever the model makes an exact-time or exact-order claim, which is everywhere in this ecosystem. A user with tied data is told, not handed a number that depends on an arbitrary sort.:ordered— break ties in sequence order and apply no correction. The legacy behaviour; the tied events are treated as if one had genuinely preceded the other and had been able to influence it. Invents information.:breslow— the Breslow tie correction of the Cox partial likelihood: the tied events share one risk set (statistics frozen at the pre-tie state) and each contributes the same denominator. Defined only for partial-likelihood / ordinal models.:efron— the Efron tie correction: as Breslow, but the tied cases enter the denominator of the j-th term with weight1 − (j−1)/d, averaging over thed!orderings instead of ignoring them. Strictly the better approximation and whatsurvival::coxphdefaults to. Defined only for partial-likelihood / ordinal models.:batch— the tied events are one simultaneous batch: none of them could have influenced any other (statistics frozen at the pre-tie state) and the batch consumes one exposure interval. The coarsened-observation reading, and the only one available to an exact-time (hazard) likelihood, where Breslow and Efron are undefined because there is no partial likelihood to correct.
Not every symbol makes sense for every model, and one that does not must be refused, never silently accepted — see check_tie_policy.
Example
TIE_POLICIES # (:error, :ordered, :breslow, :efron, :batch)
:efron in TIE_POLICIES # true
check_tie_policy(:efron, (:error, :ordered, :breslow, :efron); model="fit_rem") # :efronNetworkCore.check_tie_policy — Function
check_tie_policy(ties::Symbol, supported; model, reasons=Dict()) -> SymbolValidate a ties= keyword against the TIE_POLICIES vocabulary and against the subset a particular model can actually honour. Returns ties when it is supported; otherwise throws an ArgumentError that names model, says why the policy does not apply to it (from reasons, keyed by symbol) and lists what is supported instead.
This is the guard that keeps the ecosystem's rule: an unimplemented option fails loudly, never no-ops.
ties = :efron
check_tie_policy(ties, (:error, :ordered, :breslow, :efron);
model = "fit_rem (conditional-logit partial likelihood)",
reasons = Dict(:batch => "a batch of simultaneous events with " *
"the risk set held fixed IS the Breslow " *
"correction here; pass ties=:breslow"))tie_method reports the policy that actually ran — which is why :error can never appear there: a fit that would have had to break a tie under ties=:error threw instead of returning.
Separation Contract
A logistic, Poisson or conditional-logit likelihood whose data are separated has no finite maximiser. Some combination of the coefficients can run to ±∞ and keep improving the fit, because along that direction a set of observations is predicted perfectly. Newton's method does not notice. Its increments shrink along the asymptote, and it stops at a large, finite point with enormous standard errors and converged == true, exactly as R's glm does. Every z value and p-value computed from that point is meaningless.
One verdict. Whether a finite maximiser exists is a property of the data, not of where an optimizer stopped. Each likelihood family has one entry point, and all three reduce to one criterion:
| Family | Entry point | Used by |
|---|---|---|
| logistic (binary or binomial rows) | logistic_separation | ERGM's MPLE and its variants, TERGM's CMPLE, SNA's netlogit |
| Poisson log-linear | poisson_separation | Poisson GLMs |
| conditional logit (strata of alternatives) | clogit_separation | REM's case-control partial likelihood, relational-event models, ERGMCount's count pseudo-likelihood (a conditional logit over each dyad's support) |
| any of the above, as margin rows | separation_from_margins | the core criterion |
The criterion: the log-likelihood has a direction of recession d, one along which it never decreases and somewhere increases. For these families that is a set of linear inequalities on d, one per observation. A success row needs x'd ≥ 0 and a failure row x'd ≤ 0. A Poisson row needs x'd ≤ 0, and x'd = 0 if its count is positive. A chosen alternative needs (x_c − x_j)'d ≥ 0 against every alternative in its stratum. Separation means all of them hold with at least one strict. The verdict decides this with a linear programme, as R ergm's mple.existence does. It then certifies the direction it found in exact arithmetic. A certified verdict is a proof, independent of tolerances. The certificate is built on the minimal set of coefficients, where most margins are zero, so the verdict costs about as much as a few floating-point linear programmes: well under a second on a relational-event design with 640,000 alternatives, whether or not it is separated. A direction that leaves every margin at exactly zero is a collinear design, not separation; the optimizer's rank check reports that case.
The verdict names the coefficients to flag (terms). They form an inclusion-minimal set that carries a direction of recession on its own, so a design separated by one covariate names that covariate rather than every coefficient the optimum happens to move. It also lists the observations predicted perfectly (units).
One policy. It is decided once, here, and every fitting function follows it, as R's glm, coxph and ergm do:
- warn, with the one sentence of
separation_message(emitted bywarn_separation); - return the fit with
converged == false; - flag the separated terms on the result;
- withhold inference. z values, p-values and confidence intervals are
NaN.z_pvalueswith the verdict as third argument does this.separation_caveatis the entry forapproximations(fit).
The estimates stay in the result, because they are what the user has to diagnose with, but nothing that pretends they are a maximum is reported.
using NetworkCore
# A nodematch-like design: no tie in the second dyad class
X = [1.0 0.0; 1.0 1.0]
v = NetworkCore.logistic_separation(X, [40.0, 10.0], [8.0, 0.0])
v.separated, v.terms, v.certified # (true, [2], true)
names = ["edges", "nodematch"]
NetworkCore.warn_separation("my_mple", v, names; estimate="MPLE") # warns
NetworkCore.separation_caveat(v, names) # the approximations() entry
z_pvalues([-1.39, -20.1], [0.4, 2900.0], v) # (z = [NaN, NaN], p = [NaN, NaN])NetworkCore.SeparationVerdict — Type
SeparationVerdictThe answer of logistic_separation, poisson_separation, clogit_separation and separation_from_margins: does the likelihood have a finite maximiser, and if not, which coefficients run off to infinity?
Fields:
separated::Bool:truewhen the log-likelihood has a direction of recession, so no finite maximum-likelihood (or pseudo-likelihood) estimate exists.terms::Vector{Int}: the coefficients to flag: an inclusion-minimal set that carries a direction of recession on its own (the other coefficients held fixed), so no proper subset of it does. A design can have more than one such set (two covariates that each separate the data); the verdict names one, and a refit without it is checked again. Empty when not separated.direction::Vector{Float64}: a directiond, non-zero only onterms, along which the log-likelihood never decreases and somewhere increases, scaled tomaximum(abs, d) == 1. Empty when not separated.units::Vector{Int}: the observations predicted perfectly alongdirection: design rows for the logistic and Poisson families, stratum labels for the conditional logit, margin rows forseparation_from_margins.certified::Bool:truewhendirectionwas verified in exact arithmetic, so the verdict is a proof. A separated verdict that could not be certified (it rests on the linear programme's floating-point optimum alone) hascertified == false. That happens when the design is separated only up to the rounding of its entries, or when proving it would need more than 200,000 rows evaluated in big-integer arithmetic (a cap that keeps the verdict's cost bounded); neither has been observed on a fitter's design.family::Symbol::logistic,:poisson,:clogitor:margins.
verdict.separated is the whole policy trigger; see warn_separation for what a fitting function does with it.
Example
using NetworkCore
x = collect(-3.0:3.0)
v = NetworkCore.logistic_separation(hcat(ones(7), x), x .> 0)
v.separated, v.certified # (true, true)
v.terms # [2]: the slope alone separates the dataNetworkCore.logistic_separation — Function
logistic_separation(X, y::AbstractVector{Bool}; weights=nothing) -> SeparationVerdict
logistic_separation(X, n_tot::AbstractVector{<:Real}, n_one::AbstractVector{<:Real}) -> SeparationVerdictWhether the logistic (pseudo-)likelihood of the binary responses y (or of binomial rows, n_one[r] successes in n_tot[r] trials: ERGM's compressed MPLE design) on design X has a finite maximiser. Separation means a direction d with x_r'd ≥ 0 on every success row and x_r'd ≤ 0 on every failure row, strictly somewhere: complete or quasi-complete separation in the sense of Albert & Anderson (1984), the condition R ergm's mple.existence tests. A binomial row with both successes and failures forces x_r'd = 0. Rows with zero weight or n_tot[r] == 0 carry no information and are skipped. An offset does not change the answer (a finite shift of the linear predictor); drop rows fixed by an infinite offset first. units are the design rows predicted perfectly.
The verdict depends on the data alone, not on where an optimizer stopped: call it before or after the fit. See separation_from_margins for the criterion and warn_separation for the policy.
Example
using NetworkCore
X = hcat(ones(6), [-2.0, -1, 0, 0, 1, 2])
NetworkCore.logistic_separation(X, Bool[0, 0, 0, 1, 1, 1]).separated # true: quasi-complete
NetworkCore.logistic_separation(X, Bool[0, 1, 0, 1, 0, 1]).separated # false
# the binomial-row form: a nodematch-like column with no ties in its cell
Xb = [1.0 0.0; 1.0 1.0]
NetworkCore.logistic_separation(Xb, [40.0, 10.0], [8.0, 0.0]).terms # [2]NetworkCore.poisson_separation — Function
poisson_separation(X, y::AbstractVector{<:Real}; weights=nothing) -> SeparationVerdictWhether the Poisson log-linear likelihood Σ_r y_r η_r − exp(η_r), η = Xθ (plus any finite offset), has a finite maximiser. Along d the term exp(η_r) grows without bound unless x_r'd ≤ 0, and a positive count y_r stops η_r from falling, so the condition is: x_r'd ≤ 0 on every row, x_r'd = 0 on every row with y_r > 0, and x_r'd < 0 somewhere. That is the zero-count boundary (Haberman 1974): a rate whose every observation is zero has its maximum at a log-rate of -Inf. Counts must be non-negative; zero-weight rows are skipped. units are the design rows whose fitted rate goes to zero.
The ERGM family's count models condition on each dyad's support instead of fitting a Poisson GLM: their likelihood is a conditional logit over the support values, so they call clogit_separation.
Example
using NetworkCore
X = [1.0 0.0; 1.0 0.0; 1.0 1.0; 1.0 1.0]
NetworkCore.poisson_separation(X, [3, 1, 0, 0]).terms # [2]: the x = 1 rate is 0
NetworkCore.poisson_separation(X, [3, 1, 0, 2]).separated # falseNetworkCore.clogit_separation — Function
clogit_separation(X, chosen::AbstractVector{Bool}, strata::AbstractVector{<:Integer};
weights=nothing) -> SeparationVerdictWhether a conditional-logit (multinomial-choice, Cox partial) likelihood has a finite maximiser. Row i of X is one alternative of stratum strata[i]; chosen[i] marks the alternatives that were observed (the case: one per stratum for a relational event, any number for a stratum with case weights, such as the support values observed in one dyad class of a count ERGM). Rows with weights[i] == 0 are not in the stratum's choice set (an alternative with zero weight in the denominator).
Along d a stratum's contribution stays bounded below only if every chosen alternative scores at least as high as every alternative, (x_c − x_j)'d ≥ 0; separation is that for every stratum, with a strict inequality somewhere. Two chosen alternatives in one stratum must therefore tie on d. This is what survival::coxph diagnoses as "coefficient may be infinite", decided here exactly rather than from the Newton increment. Strata are those of the risk sets actually used: with sampled controls the question is about the sampled likelihood, which is the one being fitted. A stratum without a chosen alternative is an ArgumentError. units are the stratum labels in which the case beats some alternative strictly.
Example
using NetworkCore
# Three events, each against two controls; one statistic.
X = reshape([1.0, 0.0, 0.0, 2.0, 1.0, 1.0, 1.0, 0.0, 1.0], :, 1)
chosen = Bool[1, 0, 0, 1, 0, 0, 1, 0, 0]
strata = [1, 1, 1, 2, 2, 2, 3, 3, 3]
v = NetworkCore.clogit_separation(X, chosen, strata)
v.separated, v.units # (true, [1, 2, 3]): the case always scores highest
X[9] = 2.0 # in event 3 a control now beats the case
NetworkCore.clogit_separation(X, chosen, strata).separated # falseNetworkCore.separation_from_margins — Function
separation_from_margins(M::AbstractMatrix{<:Real}; family=:margins) -> SeparationVerdictThe core criterion every family entry point reduces to. Each row m_k of M is a linear form the direction must keep non-negative: the design is separated iff some d has M d ≥ 0 with at least one strictly positive entry. A d with M d == 0 only (a collinear design) is not separation.
The decision is the linear programme max 1'M u subject to M u ≥ 0 and -1 ≤ u ≤ 1, solved by a revised simplex on its q-row dual (q = size(M, 2)), after the rows and columns are equilibrated. Its optimum is positive iff the design is separated. The direction it returns is reduced to an inclusion-minimal set of columns and then certified exactly: the margins that are numerically zero are set exactly to zero inside their exact null space, and the sign of every margin is proved, by a rigorous floating-point bound when it is far from zero and in exact integer arithmetic otherwise. The cost is that of a few floating-point programmes: a REM design of 640,000 margin rows takes about a second whether or not it is separated. units lists the rows of M with a strictly positive margin. A row of zeros constrains nothing and is ignored. Non-finite entries are an ArgumentError.
Use it directly for a likelihood that is none of the three families, after writing down its margin rows; otherwise call the family entry point, which builds them.
Example
using NetworkCore
# Two forms a direction must keep non-negative: d₁ ≥ 0 and d₂ − d₁ ≥ 0.
v = NetworkCore.separation_from_margins([1.0 0.0; -1.0 1.0])
v.separated # true: d = (0, 1) makes the second one positive
# d₁ ≥ 0 and −d₁ ≥ 0 force d₁ = 0: an equality, nothing can grow
NetworkCore.separation_from_margins([1.0; -1.0;;]).separated # falseNetworkCore.separation_message — Function
separation_message(context, verdict::SeparationVerdict, names=nothing;
estimate="maximum-likelihood estimate", note="") -> StringThe ONE warning sentence for a separated fit, prefixed with context (the fitting function's name). It names the separated terms (names[verdict.terms], or their indices when names is nothing), says how many observations are predicted perfectly, and states the policy: the coefficients are where the optimizer stopped, the fit is reported with converged == false, and z values, p-values and confidence intervals are withheld. estimate names what does not exist ("MPLE" for a pseudo-likelihood); note is appended as is, for the R function's own wording.
Example
using NetworkCore
v = NetworkCore.logistic_separation([1.0 0.0; 1.0 1.0], [40.0, 10.0], [8.0, 0.0])
msg = NetworkCore.separation_message("mple", v, ["edges", "nodematch.g"]; estimate="MPLE")
occursin("`nodematch.g`", msg) # trueNetworkCore.warn_separation — Function
warn_separation(context, verdict::SeparationVerdict, names=nothing; kwargs...) -> BoolApply the ecosystem's separation policy's warning: when verdict.separated, emit separation_message as a warning and return true; otherwise do nothing and return false. The policy, defined once here and followed by every fitting function (R's glm, coxph and ergm's mple.existence behave the same way):
- warn with this message;
- return the fit with
converged == false; - flag the separated terms (
verdict.terms) on the result; - withhold inference: z values and p-values are
NaN(z_pvalueswith the verdict does this), and so are confidence intervals;separation_caveatis the entry forapproximations.
Bootstrap refits and other internal fits pass on the warning but keep the verdict.
Example
using NetworkCore
x = collect(-3.0:3.0)
v = NetworkCore.logistic_separation(hcat(ones(7), x), x .> 0)
NetworkCore.warn_separation("my_fit", v, ["(Intercept)", "x"]) # warns; trueNetworkCore.separation_caveat — Function
separation_caveat(verdict::SeparationVerdict, names=nothing) -> Union{String,Nothing}
separation_caveat(separated_terms::AbstractVector{<:AbstractString}) -> Union{String,Nothing}The entry a separated fit lists in approximations(fit) (and prints under its coefficient table): which terms are infinite at the maximum, and that inference is withheld. nothing when the verdict is not separated, so a caller can write c = separation_caveat(v, names); c === nothing || push!(out, c). The second form serves a result that stores only the names of its separated terms (fit.separated); it gives the same sentence without the count of observations, and nothing for an empty list.
Example
using NetworkCore
v = NetworkCore.poisson_separation([1.0 0.0; 1.0 1.0], [4, 0])
NetworkCore.separation_caveat(v, ["(Intercept)", "x"])
NetworkCore.separation_caveat(NetworkCore.poisson_separation([1.0 0.0; 1.0 1.0], [4, 2])) === nothing # true
NetworkCore.separation_caveat(["x"]) # the same sentence, from stored names
NetworkCore.separation_caveat(String[]) === nothing # true