Skip to contents

nmf.sem.inference performs statistical inference on the exogenous parameter matrix \(C_2\) from a fitted nmf.sem model, conditional on the estimated basis matrix \(\hat{X}\) and the endogenous parameter matrix \(\hat{C}_1\).

Under the working model \(R = Y_1 - X C_1 Y_1 \approx X C_2 Y_2 + \varepsilon\), inference on \(C_2\) is conducted via sandwich covariance estimation and one-step wild bootstrap with non-negative projection.

Usage

nmf.sem.inference(object, Y1, Y2, wild.bootstrap = TRUE, ...)

Arguments

object

A list returned by nmf.sem, containing at least X, C1, and C2.

Y1

Endogenous variable matrix (P1 x N). Must match the data used in nmf.sem().

Y2

Exogenous variable matrix (P2 x N). Must match the data used in nmf.sem().

wild.bootstrap

Logical. If TRUE (default), performs wild bootstrap for confidence intervals and bootstrap standard errors.

...

Additional arguments:

wild.B

Number of bootstrap replicates. Default is 1000.

wild.seed

Seed for bootstrap. Default is 42.

wild.level

Confidence level for bootstrap CI. Default is 0.95.

sandwich

Logical. Use sandwich covariance. Default is TRUE.

C.p.side

P-value type: "one.sided" (default) or "two.sided".

cov.ridge

Ridge stabilization for information matrix inversion. Default is 1e-8.

print.trace

Logical. If TRUE, prints progress. Default is FALSE.

Value

The input object with additional inference components:

sigma2.used

Estimated \(\sigma^2\) used for inference.

C2.se

Sandwich standard errors for \(C_2\) (Q x P2 matrix).

C2.se.boot

Bootstrap standard errors for \(C_2\) (Q x P2 matrix).

C2.ci.lower

Lower CI bounds for \(C_2\) (Q x P2 matrix).

C2.ci.upper

Upper CI bounds for \(C_2\) (Q x P2 matrix).

coefficients

Data frame with Estimate, SE, BSE, z, p-value for each element of \(C_2\).

C2.p.side

P-value type used.

References

Satoh, K. (2025). Applying non-negative matrix factorization with covariates to structural equation modeling for blind input-output analysis. arXiv:2512.18250. https://arxiv.org/abs/2512.18250

See also

Examples

Y <- t(iris[, -5])
Y1 <- Y[1:2, ]; Y2 <- Y[3:4, ]
res <- nmf.sem(Y1, Y2, rank = 2)
res2 <- nmf.sem.inference(res, Y1, Y2)
res2$coefficients
#>     Basis    Covariate     Estimate           SE          BSE      z_value
#> 1 Factor1 Petal.Length 9.157274e-03 0.0007674188 0.0007462585 1.193256e+01
#> 2 Factor2 Petal.Length 2.602520e-09 0.0006634281 0.0003779676 3.922836e-06
#> 3 Factor1  Petal.Width 2.300680e-06 0.0023326828 0.0012550356 9.862806e-04
#> 4 Factor2  Petal.Width 2.134356e-10 0.0018436918 0.0009884945 1.157654e-07
#>        p_value      CI_low     CI_high
#> 1 4.003418e-33 0.007747119 0.010681964
#> 2 4.999984e-01 0.000000000 0.001239286
#> 3 4.996065e-01 0.000000000 0.004173533
#> 4 5.000000e-01 0.000000000 0.003146949