| recalc_shk | R Documentation |
Unlike get_shk(), which parses the eta shrinkage NONMEM itself
reported in the output file, this recalculates shrinkage directly from
the individual (empirical Bayes) eta estimates found in the data, using
the standard 100 \times (1 - SD(\eta)/\omega) formula, where
\omega is the standard deviation implied by the associated
diagonal omega estimate.
recalc_shk(
xpdb,
...,
.etastype = 1,
.problem = NULL,
.subprob = NULL,
.method = NULL,
drop_fixed = TRUE,
quiet
)
xpdb |
< |
... |
< |
.etastype |
< |
.problem |
< |
.subprob |
< |
.method |
< |
drop_fixed |
< |
quiet |
< |
An eta is a "true zero" for an individual when NONMEM never had grounds
to move it away from its prior mean of 0, eg an individual with no
observations contributing to the objective function. That is different
from an eta that is merely shrunk close to 0 through legitimate
estimation, and including "true zero" individuals in the shrinkage
calculation biases it, since they carry no information about the actual
empirical distribution of etas. .etastype = 1 (the default) excludes
them from the calculation; .etastype = 0 reproduces the traditional,
unadjusted calculation.
A tibble with one row per eta, reporting the omega used, the
number of individuals excluded (if any), and the recalculated
shrinkage (as a percentage, to stay consistent with get_shk()).
recalc_shk(xpdb_x)
# Just a subset of etas...
recalc_shk(xpdb_x, ETA1)
# Including "true zero" etas in the calculation
recalc_shk(xpdb_x, .etastype = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.