Converts the parameter covariance matrix (already stored on the fit object) into a correlation matrix, making off-diagonal structure immediately visible. A correlation close to \(\pm 1\) between two parameters flags a structural identifiability problem in the model.

ferx_cor_matrix(fit)

Arguments

fit

A ferx_fit object returned by ferx_fit.

Value

Named correlation matrix (invisibly). Printed to the console.

See also

ferx_estimates for SEs and \

Examples

ex  <- ferx_example("warfarin")
fit <- ferx_fit(ex$model, ex$data, method = "gn", covariance = TRUE)
#> Warning: Model file [fit_options] sets `method = foce` but ferx_fit() argument overrides it with `gn`. The call-time value will be used.
#> Mu-referencing detected for: ETA_CL, ETA_KA, ETA_V
#> Negative IWRES autocorrelation detected (Durbin-Watson = 2.61, lag-1 r = -0.37).
#> Possible over-parameterisation or misspecified residual error model.
if (!is.null(fit$cov_matrix)) ferx_cor_matrix(fit)
#>            TVCL    TVV   TVKA ETA_CL  ETA_V ETA_KA PROP_ERR
#> TVCL      1.000 -0.746 -0.155  0.002  0.084  0.006    0.629
#> TVV      -0.746  1.000  0.139 -0.001 -0.111 -0.006   -0.355
#> TVKA     -0.155  0.139  1.000  0.000 -0.016 -0.041   -0.157
#> ETA_CL    0.002 -0.001  0.000  1.000  0.000  0.000    0.001
#> ETA_V     0.084 -0.111 -0.016  0.000  1.000  0.001    0.040
#> ETA_KA    0.006 -0.006 -0.041  0.000  0.001  1.000    0.006
#> PROP_ERR  0.629 -0.355 -0.157  0.001  0.040  0.006    1.000