nmf.rrr.inference: Statistical Inference for NMF-AE Parameter Matrix

View source: R/nmfae.R

nmf.rrr.inferenceR Documentation

Statistical Inference for NMF-AE Parameter Matrix

Description

Performs post-estimation inference for \Theta in the three-layer NMF model Y_1 \approx X_1 \Theta X_2 Y_2, conditional on (\hat{X}_1, \hat{X}_2). Uses sandwich covariance estimation and one-step wild bootstrap with non-negative projection.

Usage

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

Arguments

object

An object of class "nmfae" returned by nmf.rrr.

Y1

Output matrix Y_1 (P1 x N). Must match the data used in nmf.rrr().

Y2

Input matrix Y_2 (P2 x N). Default is Y1 (autoencoder).

wild.bootstrap

Logical. If TRUE (default), performs wild bootstrap for bootstrap SE and confidence intervals. If FALSE, only sandwich SE and z-test p-values are computed (faster).

...

Additional arguments:

wild.B

Number of bootstrap replicates. Default is 500.

wild.seed

Seed for bootstrap. Default is 123.

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

An object of class c("nmfae.inference", "nmfae"), inheriting all components from the input object, with additional inference components:

sigma2.used

Estimated \sigma^2 used for inference.

C.se

Sandwich standard errors for \Theta (Q x R matrix).

C.se.boot

Bootstrap standard errors for \Theta (Q x R matrix).

C.ci.lower

Lower CI bounds for \Theta (Q x R matrix).

C.ci.upper

Upper CI bounds for \Theta (Q x R matrix).

coefficients

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

C.p.side

P-value type used.

identified.approx

Whether the factorization is unique up to permutations of both latent spaces, i.e. under X_1\to X_1T_1, \Theta\to T_1^{-1}\Theta T_2^{-1}, X_2\to T_2X_2. A sufficient condition: the diagnostic of nmfkc.inference passes on (X_1, \Theta X_2) (pinning T_1) and on (X_1\Theta, X_2) (pinning T_2), and Y_2 has full row rank. Zeros are judged relative only (pin.tol, sep.tol through ...). An algebraic check on the point estimate: no re-fits.

identification

The two checks, left and right.

Lifecycle

This function is experimental. The interface may change in future versions; details are to be described in an upcoming paper.

See Also

nmf.rrr, summary.nmfae.inference

Examples

Y <- matrix(c(1,0,1,0, 0,1,0,1, 1,1,0,0), nrow=3, byrow=TRUE)
res <- nmf.rrr(Y, rank1=2, rank2=2)
res2 <- nmf.rrr.inference(res, Y)
summary(res2)


nmfkc documentation built on Oct. 30, 2026, 9:06 a.m.