ferx_eta_cov.RdComputes Pearson correlations between empirical Bayes estimates (ETAs) and covariates in the original dataset. Identifies which covariates are most worth testing in a formal covariate search. Only columns that are constant within each subject are treated as covariates.
ferx_eta_cov(fit, data)Data frame with columns eta, covariate, r,
p_val, flag, sorted by descending |r|. Returned
invisibly; the full table is printed to the console.
ex <- ferx_example("warfarin")
fit <- ferx_fit(ex$model, ex$data, method = "gn", covariance = FALSE)
#> Warning: Model file [fit_options] sets `method = foce` but ferx_fit() argument overrides it with `gn`. The call-time value will be used.
#> Warning: Model file [fit_options] sets `covariance = true` but ferx_fit() argument overrides it with `false`. 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.
obs <- read.csv(ex$data)
ferx_eta_cov(fit, obs)
#> No numeric covariate columns found in data.