Skip to contents

Displays a concise summary of an NMF-RE model fit, including dimensions, convergence, variance components, and a coefficient table following standard R regression output conventions.

Usage

# S3 method for class 'nmfre'
summary(object, ci.show = FALSE, by = c("covariate", "basis"), ...)

Arguments

object

An object of class nmfre, returned by nmfre.

ci.show

Logical. If TRUE, show confidence interval columns (default FALSE). Named object-first to match the package style (C.signed, X.init, ...). Legacy show_ci is accepted via ....

by

Grouping order of the coefficient rows: "covariate" (default; list all bases for each covariate) or "basis" (list all covariates for each basis).

...

Additional arguments (currently unused).

Value

The input object, invisibly.

Examples

Y <- matrix(cars$dist, nrow = 1)
A <- rbind(intercept = 1, speed = cars$speed)
res <- nmfre(Y, A, rank = 1, maxit = 5000)
summary(res)
#> NMF-RE: Y(1,50) = X(1,1) [C(1,2) A + U(1,50)]
#> Iterations: 43 (converged, epsilon = 1e-05)
#> R-squared (cor^2):    0.9328 (XB+blup), 0.6511 (XB)
#> R-squared (uncentered):     0.9799 (XB+blup), 0.9091 (XB)
#> R-squared (centered): 0.9227 (XB+blup), 0.6511 (XB)
#> 
#> Variance components:
#>   sigma2 = 106.9  (residual)
#>   tau2   = 120.2  (random effect)
#>   lambda = 0.8888  (sigma2 / tau2)
#>   ICC    = 0.5294  (tau2*tr(X'X) / (tau2*tr(X'X) + sigma2*P))
#>   dfU    = 26.47
#> 
#> Coefficients (Theta): run nmfre.inference(fit, Y, A) for SE / p-values.