| derive_shk | R Documentation |
Computes, for each selected eta, a diagnostic column highlighting each
individual's contribution to shrinkage: \log((\eta_i -
\bar\eta)^2), ie the log of the squared deviation from the population
mean eta. Since shrinkage itself is 100 * (1 - SD(eta)/omega) (see
recalc_shk()), and SD(eta)^2 is the mean of these per-individual
squared deviations, this highlights which individuals are pulling
shrinkage down. The log spreads out values close to 0, ie
individuals contributing the least (the most heavily shrunk).
derive_shk() returns the augmented data as a plain data frame, like
xpose::get_data()'s output. backfill_shk() joins the new
column(s) back into xpdb and tags them with the shk variable type.
This has to be backfilled rather than parsed, since it isn't something
NONMEM (or any other supported software) reports directly.
derive_shk(xpdb, ..., .problem = NULL, quiet)
backfill_shk(xpdb, ..., .problem = NULL, quiet)
xpdb |
< |
... |
< |
.problem |
< |
quiet |
< |
For derive_shk(), a data frame with one new column per
selected eta, named <eta>_SHK. For backfill_shk(), the updated
xp_xtras object, with those columns joined in and typed shk.
derive_shk(xpdb_x) %>%
dplyr::select(ID, dplyr::ends_with("_SHK")) %>%
head()
xpdb_x %>%
backfill_shk() %>%
list_vars()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.