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).- resid_nodes
Gauss-Hermite nodes used to integrate the RESIDUAL for a transform-both-sides endpoint (
boxCox,yeoJohnson,logitNorm,probitNorm), wherey = g(h(f) + sigma*eps)has no closed-form mean and variance. Ignored by every other error model. Default 81 – the same default the four estimator controls use, sodatagen()and the fit it feeds agree unless you deliberately change one of them. SeeadmControl()for the measured convergence.
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
