View source: R/get_summaryNlme.R
| get_summaryNlme | R Documentation |
xpdbProduces a single tibble combining fixed effects, random
effects, residual errors, and secondary parameters, along with their
estimates and %RSE on the chosen scale. Shrinkage for random effects
and residual errors is also included. The transform applied to each row
controls both the displayed Estimate and the corresponding %RSE,
which is computed on the transformed scale via the delta method.
Built-in presets carry analytic derivatives; for transforms outside the
catalog, supply a custom fn with its derivative dfn.
get_summaryNlme(
xpdb,
.problem = 1,
.subprob = 0,
.method = NULL,
transform = list(),
units = list(),
shrinkage = c("engine", "sd", "var"),
digits = NULL,
append_flag = TRUE,
emit_advisories = TRUE
)
## S3 method for class 'summaryNlme'
print(x, ...)
xpdb |
An |
.problem |
Problem number (default 1). Mirrors |
.subprob |
Subproblem number (default 0). Mirrors |
.method |
Estimation method filter (default |
transform |
Named list of per-parameter transforms keyed by
|
units |
Named character vector keyed by |
shrinkage |
Shrinkage calculation method, one of
The recompute paths ( |
digits |
Optional significant-digits count. When non- |
append_flag |
When |
emit_advisories |
When |
x |
A |
... |
Further arguments passed to the underlying tibble print method. |
Default transforms per section:
Fixed effects: raw.
Random effects (omegas): lognormal_cv, defined as
100 \sqrt{\exp(\omega^2) - 1}, where \omega^2 is the
variance stored in prmTable$value.
Residual error (sigmas): multiplicative_cv (100\sigma).
This default is applied uniformly to every sigma, regardless of
the error-model shape declared in PML – and choosing the wrong
scale doesn't correct itself, it just mislabels the number. For
purely additive or combined error models the %CV label is
misleading – override with transform = list(<sigma> = "raw")
(the engine reports the residual error as a standard deviation) or
a custom fn.
When the PML source is available, each sigma's shape is inferred
directly from its observe() expression by differentiating it with
respect to the error variable (base R's stats::D()) and checking
whether that derivative is a constant (additive error) or
proportional to the noise-free prediction with no curvature
(proportional error – the one shape multiplicative_cv is exact
for). This inference is syntax-only and best-effort: it works
directly on whatever PML the xpdb happens to embed, without
assuming it came from any particular model-building tool. The
advisory message is skipped only when every defaulted sigma is
proven proportional; it fires for additive error, for any other
non-proportional shape (combined, power, ...), and whenever the
shape can't be determined at all (a function outside D()'s
derivative table, unusual syntax, or no PML source) – in that last
case the safer default is to warn rather than assume. An extra
per-sigma warning fires for any sigma whose inferred role is
additive or otherwise non-proportional. Set emit_advisories = FALSE to silence both the message and the per-sigma warnings, or
options(xposeNlme.summary.quiet_default_warning = TRUE) to
silence only the message. get_bootSummaryNlme()'s bootResult-only
and embedded-fitSummary input modes have no PML to check either, so
they inherit this same "no PML source" behaviour: the default message
always fires for a defaulted sigma, while the per-sigma warning (which
needs a known shape to name) stays silent.
Secondary: raw.
Built-in preset catalog:
Fixed effects: raw (custom fn always available).
Random effects: raw, lognormal_cv, normal_sd. normal_sd
returns the standard deviation \sqrt{\Omega} (i.e.
fn = sqrt(value)), not the variance.
Residual error: raw, log_additive_cv, multiplicative_cv.
log_additive_cv is 100 \sqrt{\exp(\sigma^2) - 1} and
multiplicative_cv is 100\sigma.
Custom transform spec:
transform = list(<label> = list(fn = function(x) ..., dfn = function(x) ..., name = ...)).
dfn is optional; when omitted, %RSE falls back to the raw scale and a
single warning per call lists the affected parameters. name is the
optional scale flag appended to the parameter name; a custom transform
supplied without name triggers a warning and leaves the name unflagged.
Scale flag and units: when a non-identity transform is active the scale
label is appended to Parameter in parentheses – nV (CV%),
CEps (SD), or the custom name. Identity / raw rows keep the bare
name. The Unit column carries physical units only (user units or the
model's structural-parameter units) and is dropped when every row is
dimensionless.
Off-diagonal omega/sigma rows are excluded entirely. transform and
units are keyed by prmTable$label (the PML-source name – tvCl,
nV, CEps); names not present among the labels emit a single warning
per call and are ignored.
A tibble (class summaryNlme) with columns Section,
Parameter (carrying a (CV%) / (SD) / custom scale flag when a
non-identity transform is active), Estimate, %RSE, Shrinkage (%),
and – only when at least one row resolves to a non-empty physical
unit – Unit. The summaryNlme class carries a print method that honours
the digits argument for displayed precision.
get_prmNlme(), get_overallNlme(), get_etaSubjectNlme()
## Not run:
# 1) Default output on a log-normal IIV + proportional error model.
xp <- xposeNlmeModel(fit)
get_summaryNlme(xp)
# 2) Per-parameter override on an additive error model. The engine
# reports residual error as a standard deviation, so `raw` shows the
# SD directly (no misleading %CV flag).
get_summaryNlme(
xp,
transform = list(EEps = "raw"),
units = list(EEps = "ng/mL")
)
# 3) Custom transform for combined add-mult error.
get_summaryNlme(
xp,
transform = list(
CEps = list(
fn = function(s) 100 * s,
dfn = function(s) 100
)
)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.