Fits the NMF-SEM model $$ Y_1 \approx X \bigl( \Theta_1 Y_1 + \Theta_2 Y_2 \bigr) $$ under non-negativity constraints with orthogonality and sparsity regularization. The function returns the estimated latent factors, structural coefficient matrices, and the implied equilibrium (input–output) mapping.
At equilibrium, the model can be written as $$ Y_1 \approx (I - X \Theta_1)^{-1} X \Theta_2 Y_2 \equiv M_{\mathrm{model}} Y_2, $$ where \(M_{\mathrm{model}} = (I - X \Theta_1)^{-1} X \Theta_2\) is a Leontief-type cumulative-effect operator in latent space.
Internally, the latent feedback and exogenous loading matrices are stored as
C1 and C2, corresponding to \(\Theta_1\) and \(\Theta_2\),
respectively.
nmf.sem(
Y1,
Y2,
rank = NULL,
X.init = NULL,
X.L2.ortho = 100,
C1.L1 = 1,
C2.L1 = 0.1,
epsilon = 1e-06,
maxit = 20000,
seed = 123,
...
)A non-negative numeric matrix of endogenous variables with rows = variables (P1), columns = samples (N).
A non-negative numeric matrix of exogenous variables with
rows = variables (P2), columns = samples (N).
Must satisfy ncol(Y1) == ncol(Y2).
Integer; number of latent factors \(Q\). If NULL,
\(Q\) is taken from a hidden argument in ... or defaults to
nrow(Y2).
Optional non-negative initialization for the basis matrix
X (\(P_1 \times Q\)). If supplied, it is projected to be
non-negative and column-normalized.
L2 orthogonality penalty for X. This controls
the penalty term \(\lambda_X \lVert X^\top X - \mathrm{diag}(X^\top X)
\rVert_F^2\). Default: 100.
L1 sparsity penalty for C1 (i.e., \(\Theta_1\)).
Default: 1.0.
L1 sparsity penalty for C2 (i.e., \(\Theta_2\)).
Default: 0.1.
Relative convergence threshold for the objective function.
Iterations stop when the relative change in reconstruction loss falls
below this value. Default: 1e-6.
Maximum number of iterations for the multiplicative updates.
Default: 20000.
Random seed used to initialize X, C1, and C2.
Default: 123.
Additional arguments. Currently used to pass a hidden rank
Q (e.g., via Q = 3) if rank is NULL.
A list with components:
Estimated basis matrix (\(P_1 \times Q\)).
Estimated latent feedback matrix (\(\Theta_1\), \(Q \times P_1\)).
Estimated exogenous loading matrix (\(\Theta_2\), \(Q \times P_2\)).
Feedback matrix \(X \Theta_1\).
Direct-effect matrix \(X \Theta_2\).
Spectral radius \(\rho(X \Theta_1)\).
Induced 1-norm \(\lVert X \Theta_1 \rVert_{1,\mathrm{op}}\).
Leontief-type inverse \((I - X \Theta_1)^{-1}.\)
Equilibrium mapping \(M_{\mathrm{model}} = (I - X \Theta_1)^{-1} X \Theta_2\).
Latent amplification factor \(\lVert M_{\mathrm{model}} \rVert_{1,\mathrm{op}} / \bigl\lVert X \Theta_2 \bigr\rVert_{1,\mathrm{op}}\).
Geometric-series upper bound
\(1 / (1 - \lVert X \Theta_1 \rVert_{1,\mathrm{op}})\) if
\(\lVert X \Theta_1 \rVert_{1,\mathrm{op}} < 1\), otherwise Inf.
Effective latent dimension used in the fit.
Correlation between sample and model-implied covariance (flattened) of \(Y_1\).
Mean absolute error between \(Y_1\) and its equilibrium prediction \(\hat Y_1 = M_{\mathrm{model}} Y_2\).
Vector of reconstruction losses per iteration.
Vector of penalized objective values per iteration.
Number of iterations actually performed.