nmfre.inference performs statistical inference on the coefficient
matrix \(C\) (\(\Theta\)) from a fitted nmfre model,
conditional on the estimated basis matrix \(\hat{X}\) and random
effects \(\hat{U}\).
Under the working model \(Y^* = Y - X\hat{U} \approx X C A + \varepsilon\), inference is conducted via sandwich covariance estimation and one-step wild bootstrap with non-negative projection.
The result is compatible with nmfkc.DOT for visualization
(pass the result directly as x with type = "YXA").
Arguments
- object
An object of class
"nmfre"returned bynmfre.- Y
Observation matrix (P x N). Must match the data used in
nmfre().- A
Covariate matrix (K x N). Default is
NULL(intercept only).- wild.bootstrap
Logical. If
TRUE(default), performs wild bootstrap for confidence intervals and bootstrap standard errors.- ...
Additional arguments:
wild.BNumber of bootstrap replicates. Default is 500.
wild.seedSeed for bootstrap. Default is 123.
wild.levelConfidence level for bootstrap CI. Default is 0.95.
C.p.sideP-value type:
"one.sided"(default) or"two.sided".cov.ridgeRidge stabilization. Default is 1e-8.
print.traceLogical. Default is
FALSE.
Value
The input object with additional inference components:
- sigma2.used
Estimated \(\sigma^2\) used for inference.
- C.vec.cov
Full covariance matrix for \(vec(C)\).
- C.se
Sandwich standard errors for \(C\).
- C.se.boot
Bootstrap standard errors for \(C\).
- C.ci.lower
Lower CI bounds for \(C\).
- C.ci.upper
Upper CI bounds for \(C\).
- coefficients
Data frame with Basis, Covariate, Estimate, SE, BSE, z_value, p_value, CI_low, CI_high.
- C.p.side
P-value type used.
References
Satoh, K. (2026). Wild Bootstrap Inference for Non-Negative Matrix Factorization with Random Effects. arXiv:2603.01468. https://arxiv.org/abs/2603.01468
Examples
Y <- matrix(cars$dist, nrow = 1)
A <- rbind(intercept = 1, speed = cars$speed)
res <- nmfre(Y, A, rank = 1, wild.bootstrap = FALSE)
res2 <- nmfre.inference(res, Y, A)
res2$coefficients
#> Basis Covariate Estimate SE BSE z_value p_value
#> 1 Basis1 intercept 0.01426606 6.4271478 3.253820 0.002219656 4.991145e-01
#> 2 Basis1 speed 2.85065956 0.4564636 0.431663 6.245096893 2.117687e-10
#> CI_low CI_high
#> 1 0.000000 10.405754
#> 2 2.091174 3.869986