impCovControl: Options for the importance-sampling covariance in setCov()

View source: R/covControl.R

impCovControlR Documentation

Options for the importance-sampling covariance in setCov()

Description

Used by setCov(fit, "imp"), which runs frozen importance-sampling EM iterations at the fit's estimates.

Usage

impCovControl(nIter = 1L, isample = 300L, impSeed = 42L)

Arguments

nIter

frozen EM iterations (0 is an E-step-only evaluation)

isample

Number of importance samples drawn per subject per iteration (NONMEM ISAMPLE). Either a single count used for every subject, or a vector of length 'nsub' giving a count **per subject**.

Per-subject counts are the NM7 Technical Guide's own remedy for poor coverage (its derivation is Gaussian throughout and never mentions a t proposal): a subject whose weights are badly behaved can be given more samples without charging every other subject for them. Note this treats the symptom rather than the cause – more draws from a proposal whose tails are too light still gives weights with infinite variance, which 'fit$env$impPsisK' will show. See 'df' for the shape-based remedy.

impSeed

Base seed for the per-subject thread-safe (threefry) RNG streams; results are reproducible and independent of the thread count.

Value

impCovControl object

Author(s)

Matt Fidler

See Also

setCov(), impmapControl()

Examples

impCovControl(isample = 1000)

nlmixr2est documentation built on Sept. 20, 2026, 9:08 a.m.