Reconstruct EZ and UVPM matrices from AME model output
Source:R/reconstruct_matrices.R
reconstruct_EZ.RdHelper 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.