Skip to contents

Helper functions to recover EZ (linear predictor) and UVPM (posterior mean of the multiplicative product) matrices. When the fit stores the quantity (UVPM on asymmetric fits, ULUPM on symmetric fits), the stored posterior mean is returned directly; otherwise it is reconstructed from the saved factors.

Note: EZ returns the linear predictor (\(\eta\)), not the response:

  • For Gaussian: \(EZ = \eta = \mu\) (identity link)

  • For Poisson: \(EZ = \eta = \log(\lambda)\) (can be negative)

  • For Binary: \(EZ = \eta\) = probit inverse of p (can be any real value) Use YPM for predictions on the response scale.

Usage

reconstruct_EZ(fit, X = NULL)

reconstruct_UVPM(fit)

Arguments

fit

Fitted AME model object

X

Covariate array (optional, will use fit$X if available)

Value

Reconstructed matrix

Details

Fits that carry the stored posterior mean (UVPM or, for symmetric fits, ULUPM) have it returned as-is; older fit objects without one are rebuilt from the posterior factor means.

Author

Cassy Dorff, Shahryar Minhas, Tosin Salau