Control parameters for datagen()
Arguments
- method
Moment approximation used to generate
EandV:"mc"(default) draws Monte Carlo samples over the IIV distribution, as inest = "admc";"fo"uses the deterministic First-Order expansion (mu = f(theta, 0),V = J Omega J' + Sigma), matchingest = "adfo";"gh"uses deterministic Gauss-Hermite quadrature over the random-effects prior, matchingest = "adgh"– unbiased at any IIV magnitude and noise-free. Use"fo"or"gh"for design evaluation where the data-generating and data-analytic models must coincide.- n_sim
Number of Monte Carlo samples used to approximate population moments. Ignored when
method = "fo"or"gh".- n_nodes
Number of Gauss-Hermite nodes per eta dimension for
method = "gh"(default 5). Total nodes =n_nodes^n_eta. Ignored for"mc"and"fo".- sampling
Quasi-random sampling method:
"sobol"(default),"halton","torus","lhs", or"rnorm". Ignored whenmethod = "fo"or"gh".- seed
Integer seed. Applied before stochastic methods (
"rnorm","lhs"). Ignored whenmethod = "fo"or"gh".- cores
Number of
rxSolvethreads.- return_samples
Include the raw
n_sim x length(times)prediction matrix as$samplesin each study's output. No effect whenmethod = "fo"or"gh"(those methods draw no samples).
Examples
ctrl <- datagenControl(n_sim = 2000L)
ctrl$sampling # "sobol"
#> [1] "sobol"
# Deterministic FO moments for design evaluation:
datagenControl(method = "fo")$method # "fo"
#> [1] "fo"
# GH quadrature moments (unbiased, noise-free):
datagenControl(method = "gh", n_nodes = 5L)$n_nodes
#> [1] 5
