Estimates an Ising model by nodewise L1-penalized logistic regression with
EBIC selection, combined by the AND (default) or OR rule. Equivalent in
purpose to IsingFit::IsingFit(), but pure base R and self-certified: each
node's regression reports its stationarity (KKT) residual (see
glm_lasso_kkt()).
Arguments
- data
Binary (0/1) data frame or matrix (rows = observations).
- gamma
EBIC hyperparameter. Default 0.25.
- rule
Edge-combination rule:
"AND"(default) or"OR".- nlambda
Number of penalties per nodewise path. Default 100.
- lambda_min_ratio
Smallest penalty as a fraction of the largest.
- min_sum
Minimum row sum-score (number of endorsed items); rows below it are dropped before fitting.
NULL(default) keeps every row.- weights
Optional non-negative observation weights, one per retained row.
NULL(default) is unweighted.- na_method
Missing-data handling:
"pairwise"(default) single-imputes each column over its observed values (mode for binary), keeping the full sample;"listwise"drops incomplete rows. Identical for complete data.- native
Solver switch.
TRUE(default) uses psychnet's own pure-R, dependency-free, self-certified L1 logistic path (KKT ~1e-9).FALSEdelegates each per-node fit to theglmnetpackage with the IsingFit EBIC path, so the returned$weights/$thresholdsbyte-matchIsingFit::IsingFit()(to ~1e-16) at the cost of glmnet's looser self-certificate.native = FALSEneeds the optionalglmnetpackage (Suggests);weights/min_sumare supported withnative = TRUEonly.- labels
Optional node labels.
Value
A psychnet object whose $weights is the symmetric weight matrix,
with $thresholds (node intercepts) and $kkt (the worst nodewise
stationarity residual).