ResidualCorrelation
Estimated residual correlation structure.
Usage
ResidualCorrelation(
covariance,
correlation,
responses,
)Returned by MultiResponseGAM.residual_correlation() when the model was fit with correlation="unstructured". Holds the empirical residual covariance and correlation matrices across the k jointly modeled responses, estimated from each response’s fitted-model residuals.
Attributes
covariance: NDArray-
Residual covariance matrix (
k x k) wherek= number of responses, computed asR'R / (n - 1)whereRis the(n, k)matrix of residuals (observed minus fitted, one column per response). correlation: NDArray-
Residual correlation matrix (
k x k), the covariance matrix rescaled to unit diagonal. responses: list[str]- Response names (ordering matches matrix rows/columns).