Control parameters for gllvmTMB()
Usage
gllvmTMBcontrol(
d_B = NULL,
d_W = NULL,
spde_mode = c("per_trait", "shared"),
n_init = 1L,
optimizer = c("nlminb", "optim"),
optArgs = list(),
init_jitter = 0.3,
init_strategy = c("default", "single_trait_warmup"),
start_method = list(method = NULL, jitter.sd = 0),
start_from = NULL,
se = TRUE,
verbose = FALSE,
integration = c("laplace", "va"),
va_H = 7L,
va_eval_method = c("auto", "jj", "gh"),
aghq = FALSE,
aghq_iter_cap = 1L,
aghq_n_adapt = 400L,
aghq_ridge = 2,
aghq_continuation = TRUE,
aghq_shift_tol = 1e-04,
aghq_grad_tol = 1e-04,
aghq_grad_tol_rel = 1e-06,
aghq_multistart = TRUE,
aghq_f_tol = 1e-09,
aghq_escalate_patience = 3L,
aghq_rho_min = 1/64,
warn_runaway = TRUE,
allow_nongaussian_reml = FALSE,
loading_ridge = NULL,
optimizer_passes = 1L,
...
)Arguments
- d_B, d_W
Latent dimensions for the between-unit and within-unit reduced-rank components. Set to a positive integer to enable
latent()/indep()covariance structures at the corresponding tier.- spde_mode
"per_trait"(default) fits one independent SPDE field per trait when aspatial()term is present;"shared"fits one shared SPDE field with trait-specific scalar loadings.- n_init
Number of random-start replicates. Reduced-rank GLLVMs are often multimodal because the latent-factor likelihood has many equivalent local maxima; running several restarts with different starting values and keeping the fit with the lowest
-logLikreduces the risk of settling on a suboptimal solution. Default 1 (single fit). Increase to 5–10 for two-level rr models.- optimizer
One of
"nlminb"(default) or"optim". Use the latter together withoptArgsfor finicky two-level rr fits.- optArgs
A list of arguments passed to the optimiser. For
optimthe most useful islist(method = "BFGS").- init_jitter
Standard deviation of N(0, sigma) jitter applied to the starting parameter vector across the
n_initrestarts. Default 0.3.- init_strategy
One of
"default"(current behaviour) or"single_trait_warmup". The warmup option fits an intercept-only univariate GLM per trait — with that trait's family — and seeds the matchinglog_phi_*entries beforeMakeADFun(). Recommended for count families (especiallynbinom2) where the default initialisation can leave the optimiser walking the \((\psi_t, \phi_t)\) trade-off ridge. No effect for traits whose family doesn't carry aphiparameter (Gaussian, Poisson, binomial). Default"default".- start_method
Optional reduced-rank starting-value method, modelled after
glmmTMB::glmmTMBControl(start_method = ...)but extended for two-level gllvmTMB models. Uselist(method = "res", jitter.sd = 0.2)to seedlatent()loadings and latent scores from a reduced-rank decomposition of fixed-effect residuals. Uselist(method = "indep")to first fit the matching independent diagonal GLMM/GLLVM and copy its estimated fixed effects, per-trait variance starts, and random effects into the full latent covariance fit.jitter.sdadds Normal jitter to residual-start latent scores. Defaultlist(method = NULL, jitter.sd = 0)keeps the historical starts.- start_from
Optional fitted
gllvmTMBobject, usually a simpler model such as onelatent()tier or an independent diagonal model (indep()). Any estimated TMB parameters with shapes matching the current model are copied into the starting parameter list before optimisation. This implements the "fit simpler, then use it as starting values" workflow recommended for complex reduced-rank models.- se
Logical; if
TRUE, computeTMB::sdreport()after optimisation so Wald standard errors and Hessian diagnostics are available. IfFALSE, skip standard-error calculation and return the point-estimate fit withsd_report = NULLand a diagnostic note. This is useful for hard models where the point estimate is needed and uncertainty will be obtained by bootstrap or profile methods. DefaultTRUE.- verbose
If
TRUE, prints a one-line summary per restart so the user can see which seed led to the winning fit. DefaultFALSE.- integration
Which method evaluates the latent-variable integral.
"laplace"(default) is the Laplace approximation. For an unpenalised native-Laplace fit,logLik(),AIC(),BIC()and likelihood-ratio tests have their ordinary maximum-likelihood interpretation. AGHQ-refined fits also expose these methods, but use a different integration objective and must not be compared across engines; with a loading ridge, the fitted point is penalised MAP and ordinary likelihood-comparison interpretations do not apply."va"selects an opt-in research route whose objective is an evidence lower bound, not a marginal likelihood. Fixed-effectvcov()andconfint()use profiled-Schur VA-Wald information and are labelledcalibrated = FALSE;getLV()can return a variational posterior SD, which is not a frequentist random-effect standard error. No nominal coverage claim is made. A bound must not be compared across ranks or models, so it cannot be used for model or rank selection.It is admitted only inside the current experimental region —
latent(..., unique = FALSE), the 18 scalar family/link cells in the response-family registry,dup to 2, up to 80 responses, at least 100 units, and the native TMB engine — and requesting it outside that region is an error, not a warning. Thedlimit is retained from an earlier preregistered explicit-JJ recovery study:d = 4was measured and refused because, with few responses, the planted axes collapsed more often than the prespecified criterion allowed. This is an implementation admission fence, not recovery evidence for the current automatic GH-H7 route. In the current 36-cell family-by-rank campaign only the Poisson-logq = 5cell passed the overall point route, and that rank lies outside the publicd <= 2fence; VA therefore remains experimental andcalibrated = FALSE. It cannot be combined withaghq, which is an alternative evaluation of the same integral rather than an additional layer.Offering this value advertises nothing about its accuracy.
The ordination surface is available for a
"va"fit:extract_ordination(),getLV(),getLoadings()andextract_loadings()return latent scores and loadings as POINT ESTIMATES. Fixed-effectconfint()andvcov()expose uncalibrated VA-Wald uncertainty;getLV(se = TRUE)returns a variational posterior SD, not a frequentist standard error, and only wheneval_methodresolves to"gh". Loading/covariance intervals remain unavailable.Earlier explicit-JJ evidence. Recovery of the ordination below was measured with the earlier JJ evaluator against planted truth at the admitted cells (
d = 2, 8 responses, n = 150 and 400, 50 seeds per cell), with the Laplace route run on the same simulated data as a control. This campaign predates the current automatic Gauss-Hermite default and must not be used as evidence for the accuracy of the current GH-default route:Gaussian: the loading-implied variance is recovered at 0.98–1.02 of truth, and the mean paired difference in latent-score correlation against Laplace is below
2e-07at bothn.Poisson: also 0.98–1.02 of truth, with a paired latent-score difference of ~
4e-04— negligible in magnitude but statistically detectable, and the loading scale sits ~1% below Laplace.Binomial: latent scores recover at about r = 0.59. That ceiling is a limit of binary data at these cells rather than of the historical JJ route — the Laplace default reaches about r = 0.56–0.59 on the same data, and a third estimator (Gauss-Hermite) lands in the same place. The loading SCALE, however, is biased low (0.58–0.67 of truth) and this is a real bias relative to Laplace, whose median brackets 1. Read a binomial ordination's axes and relative positions, not the absolute magnitude of its loadings.
The comparison is not effort-matched: the historical JJ arm ran four starts and retained fits meeting agreement and gradient criteria, while the Laplace arm used one start and required a positive-definite Hessian.
"va"returns an object of class"gllvmTMB_va"(see gllvmTMB_va-methods) rather than an ordinary fit, so that every method which would treat its objective as a likelihood fails loudly instead of returning a number. Because the engine runs its own multi-start and optimiser policy, the search settings ofgllvmTMBcontrol()—n_init,optimizer,optArgs,start_from,init_*andse— have no effect on this route. Any model structure the route cannot represent (a latent term away from the unit grouping, a constrained ordination, an offset, weights,REML,lambda_constraint,Xcoef_fixed, or a further random effect) is an error, never a silent omission.There is no
"eva"value. The EVA engine exists in this package and is reachable as a research route, but it is not wired togllvmTMB(), and an argument value that could only ever raise an error would advertise a capability the package does not have. No general coefficient, covariance, interval, or calibration claim is made for EVA. Existing measurements are research diagnostics only and do not establish a public estimator route.- va_H
Gauss-Hermite quadrature order for the variational route, a single odd integer
>= 3(default7). Ignored unlessintegration = "va".Quadrature dominates the cost of a variational fit and the work is linear in
H, so this is the main speed control on that route. On a binomial probit cell with 20 traits,H = 7was indistinguishable fromH = 61in both the recovered loading scale and the recovered linear predictor, at two and at five latent dimensions, while running 3.4-6.7 times faster.H = 5was measurably worse at five latent dimensions. The default is thereforeH = 7;H = 61remains available as a diagnostic.- va_eval_method
How the variational route evaluates the per-observation expectation.
"auto"(default) selects Gauss-Hermite quadrature for every admitted scalar family/link cell and is what you want unless you are comparing methods."gh"uses Gauss-Hermite quadrature."jj"uses the Jaakkola-Jordan bound, which is defined only for pure binomial-logit fits and is substantially cheaper. The two differ in more than speed: on binary data the bound's recovered loading magnitudes are biased downward and do not improve as the sample grows, whereas quadrature's converge. Latent-variable scores, and therefore ordinations, are effectively unaffected by the choice. Ignored unlessintegration = "va".- aghq
Adaptive Gauss-Hermite quadrature for the between-unit latent block.
FALSE(default) fits by Laplace approximation. A positive integer requests that many quadrature nodes."auto"lets the package decide, and it declines to Laplace whenever the model is ineligible or the expected gain does not justify the cost. Opt-in and experimental: no capability claim is made for quadrature-fitted models, and eligibility is narrow — the random part must be a single ordinarylatent()block on the unit tier.- aghq_iter_cap
Optimiser iteration budget for the first adaptation pass. Default
1L. Later passes escalate when continuation is enabled.- aghq_n_adapt
Maximum number of adaptation passes. Default
400L.- aghq_ridge
Ridge penalty on the loadings, as the scale
tau;Infdisables it. Default2. Naming a numeric value explicitly also makes theLaplace + ridgecontrol reachable without quadrature. The default does not penalise an ordinary Laplace fit unless the caller explicitly namesaghq_ridge. AGHQ itself is opt-in, but once enabled it uses the defaulttau = 2penalised MAP route unlessInfis requested."auto"is an opt-in experimental route for pure single-trial Bernoulli models with one ordinary unit-tierlatent()block. It uses an unpenalised 9-node multi-start AGHQ pilot, thentau = min(6, max(1, ||Lambda_pilot||_F / sqrt(pq))). If the pilot or scale-aware final fit is unusable, the returned fit transparently falls back to the shippedtau = 2route; inspectfit$aghq$ridge_auto. Evidence supports failure/runaway avoidance in this scope, not a broad loading-accuracy improvement. The measured grid used a logit link withp = 6,q = 2, andn = 100,400, or1600; other links and dimensions are extrapolations. The"auto"route always uses 9-node multi-start AGHQ for both pilot and final fits; a conflicting node/start control is replaced with a warning, while an explicitaghq = FALSEis incompatible.- aghq_continuation
If
TRUE(default), the adaptation loop may raiseaghq_iter_capacross passes.FALSEpins the cap and disables escalation.- aghq_shift_tol, aghq_grad_tol, aghq_f_tol
Convergence tolerances for the adaptation loop: the quadrature-point shift, the gradient at the adaptation point, and the change in objective. Defaults
1e-4,1e-4,1e-9.- aghq_grad_tol_rel
Relative gradient tolerance, tested as
max|grad| / max(1, |objective|). Default1e-6. The gradient of a likelihood summed over many observations grows with the sample, so the absoluteaghq_grad_tolon its own becomes unreachable at scale. The two are combined withOR, so this can only ever admit more fits as converged, never fewer; set it to0to test the absolute tolerance only. Readfit$aghq$convergedfor the verdict — notfit$opt$convergence, which on the quadrature path records the optimiser's per-pass iteration cap and so reports a limit even on a healthy fit.- aghq_multistart
If
TRUE(default), the quadrature is run from two starting points — the Laplace optimum and a data-driven alternative that uses no knowledge of the truth — and the fit with the better final objective is kept.FALSEuses the Laplace warm start only, reproducing the behaviour of earlier versions. The extra start costs one additional adaptation run, and exists because the Laplace optimum is sometimes itself a runaway that the quadrature would otherwise inherit.- aghq_escalate_patience
Number of accepted passes before the iteration cap is escalated. Default
3L.- aghq_rho_min
Minimum trust-region-style acceptance ratio for a pass. Default
1/64.- warn_runaway
If
TRUE(default), warn once per session when a binomial latent-variable fit triggers the package's existing runaway-loading diagnostic. SetFALSEto silence the fit-time warning; the diagnostic remains available throughgllvmTMB_diagnose(). The same switch also governs the multinomial contrast-degeneracy warning (collapsed contrast variance, rail-correlated contrasts, or a collapsed spatial range), which uses its own once-per-session slot so neither family's warning can suppress the other's. Ordinal fits emit no fit-time warning: that row's arms ship disarmed because no threshold met its calibration targets, so it reports statistics throughcheck_gllvmTMB()only.- allow_nongaussian_reml
Permit
REML = TRUEfor non-Gaussian families. DefaultFALSE; the restricted likelihood is defined by a Gaussian marginalisation, so this is an escape hatch, not an endorsement.- loading_ridge
Integration-neutral alias for
aghq_ridge. Use this spelling to request the same loading MAP penalty on a Laplace fit without suggesting that the penalty belongs to AGHQ. The defaultNULLpreserves historical unpenalised Laplace fits. Supply at most one ofloading_ridgeandaghq_ridge; neither may be combined withestimator = "mspl".- optimizer_passes
Number of exact-gradient optimisation passes from the preceding estimate. The default
1retains the historical single pass. A later pass is retained only when it converges and does not increase the objective. It is available for native Laplace fits withaghq = FALSE. The setting is saved in the public call and replayed byupdate().- ...
Reserved for future use. Currently ignored with a warning.
Details
Recommended workflow for two-level latent models. Reduced-rank
likelihoods are notoriously multimodal in two-level fits like
value ~ 0 + trait + latent(0+trait|ID, d_B) + latent(0+trait|obs_ID, d_W).
The recommended workflow is:
Run several restarts (
n_init = 5to10) and keep the one with the lowest-logLik.If that fails to converge cleanly, switch the optimiser to
optimwithBFGS:gllvmTMBcontrol(optimizer = "optim", optArgs = list(method = "BFGS")).start_method = list(method = "res", jitter.sd = 0.2)is soft-deprecated as of 0.6.0 and warns once per session. It still fits: it decomposes the fixed-effect residual matrix into starting values for \(\Lambda\) and the latent scores. Do not reach for it.It was retired on measurement. Across 89 simulated fits — Gaussian, Poisson and negative-binomial,
d = 1to3, three and five traits — it was never materially better than the default start (its three best margins were 0.07, 0.29 and 0.66 log-likelihood units) and was materially worse eight times, once by 14.6 units. Atd >= 2it made no difference at all. Every failure reportedconvergence == 0and a positive-definite Hessian on both sides, so the worse fit was silent, and restarts did not detect it: in one such fit all fiven_init = 5restarts returned the same worse optimum.If you use it anyway, compare
fit$opt$objectiveagainst a default-start fit and keep the lower value.For Gaussian two-level models, prefer
start_method = list(method = "indep")or manually fit a simpler model and pass it throughstart_from = simpler_fit. This is a GLMM warm start rather than a fixed-effect-only GLM residual start.
Examples
# gllvmTMBcontrol() is a pure-R constructor: it builds and validates a
# control list without fitting anything.
gllvmTMBcontrol() # historical defaults
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "laplace"
#>
#> $va_H
#> [1] 7
#>
#> $va_eval_method
#> [1] "auto"
#>
#> $n_init
#> [1] 1
#>
#> $optimizer
#> [1] "nlminb"
#>
#> $optArgs
#> list()
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.3
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] FALSE
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] 2
#>
#> $aghq_ridge_explicit
#> [1] FALSE
#>
#> $loading_ridge
#> NULL
#>
#> $loading_ridge_explicit
#> [1] FALSE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
# Multi-start to guard against multimodal reduced-rank likelihoods, with
# jitter on the starting parameter vector across restarts.
gllvmTMBcontrol(n_init = 3, init_jitter = 0.2)
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "laplace"
#>
#> $va_H
#> [1] 7
#>
#> $va_eval_method
#> [1] "auto"
#>
#> $n_init
#> [1] 3
#>
#> $optimizer
#> [1] "nlminb"
#>
#> $optArgs
#> list()
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.2
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] FALSE
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] 2
#>
#> $aghq_ridge_explicit
#> [1] FALSE
#>
#> $loading_ridge
#> NULL
#>
#> $loading_ridge_explicit
#> [1] FALSE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
# Switch the optimiser to optim + BFGS for finicky two-level rr fits.
gllvmTMBcontrol(optimizer = "optim", optArgs = list(method = "BFGS"))
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "laplace"
#>
#> $va_H
#> [1] 7
#>
#> $va_eval_method
#> [1] "auto"
#>
#> $n_init
#> [1] 1
#>
#> $optimizer
#> [1] "optim"
#>
#> $optArgs
#> $optArgs$method
#> [1] "BFGS"
#>
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.3
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] FALSE
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] 2
#>
#> $aghq_ridge_explicit
#> [1] FALSE
#>
#> $loading_ridge
#> NULL
#>
#> $loading_ridge_explicit
#> [1] FALSE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
# Experimental, opt-in scale-aware ridge for the evaluated Bernoulli AGHQ
# scope. The route uses a fixed 9-node multi-start rule; this is not an
# interval-calibration certificate.
gllvmTMBcontrol(aghq_ridge = "auto")
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "laplace"
#>
#> $va_H
#> [1] 7
#>
#> $va_eval_method
#> [1] "auto"
#>
#> $n_init
#> [1] 1
#>
#> $optimizer
#> [1] "nlminb"
#>
#> $optArgs
#> list()
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.3
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] 9
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] "auto"
#>
#> $aghq_ridge_explicit
#> [1] TRUE
#>
#> $loading_ridge
#> NULL
#>
#> $loading_ridge_explicit
#> [1] FALSE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
# The same fixed loading MAP penalty, named independently of integration.
gllvmTMBcontrol(loading_ridge = 2)
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "laplace"
#>
#> $va_H
#> [1] 7
#>
#> $va_eval_method
#> [1] "auto"
#>
#> $n_init
#> [1] 1
#>
#> $optimizer
#> [1] "nlminb"
#>
#> $optArgs
#> list()
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.3
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] FALSE
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] 2
#>
#> $aghq_ridge_explicit
#> [1] TRUE
#>
#> $loading_ridge
#> [1] 2
#>
#> $loading_ridge_explicit
#> [1] TRUE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
# Experimental scalar variational route: public auto uses GH with H = 7.
gllvmTMBcontrol(integration = "va")
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "va"
#>
#> $va_H
#> [1] 7
#>
#> $va_eval_method
#> [1] "auto"
#>
#> $n_init
#> [1] 1
#>
#> $optimizer
#> [1] "nlminb"
#>
#> $optArgs
#> list()
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.3
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] FALSE
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] 2
#>
#> $aghq_ridge_explicit
#> [1] FALSE
#>
#> $loading_ridge
#> NULL
#>
#> $loading_ridge_explicit
#> [1] FALSE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
# H = 61 remains a diagnostic; JJ is explicit binomial-logit only.
gllvmTMBcontrol(integration = "va", va_H = 61, va_eval_method = "gh")
#> $d_B
#> NULL
#>
#> $d_W
#> NULL
#>
#> $spde_mode
#> [1] "per_trait"
#>
#> $integration
#> [1] "va"
#>
#> $va_H
#> [1] 61
#>
#> $va_eval_method
#> [1] "gh"
#>
#> $n_init
#> [1] 1
#>
#> $optimizer
#> [1] "nlminb"
#>
#> $optArgs
#> list()
#>
#> $optimizer_passes
#> [1] 1
#>
#> $init_jitter
#> [1] 0.3
#>
#> $init_strategy
#> [1] "default"
#>
#> $start_method
#> $start_method$method
#> NULL
#>
#> $start_method$jitter.sd
#> [1] 0
#>
#>
#> $start_from
#> NULL
#>
#> $se
#> [1] TRUE
#>
#> $verbose
#> [1] FALSE
#>
#> $aghq
#> [1] FALSE
#>
#> $aghq_iter_cap
#> [1] 1
#>
#> $aghq_n_adapt
#> [1] 400
#>
#> $aghq_ridge
#> [1] 2
#>
#> $aghq_ridge_explicit
#> [1] FALSE
#>
#> $loading_ridge
#> NULL
#>
#> $loading_ridge_explicit
#> [1] FALSE
#>
#> $aghq_continuation
#> [1] TRUE
#>
#> $aghq_shift_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol
#> [1] 1e-04
#>
#> $aghq_grad_tol_rel
#> [1] 1e-06
#>
#> $aghq_multistart
#> [1] TRUE
#>
#> $aghq_f_tol
#> [1] 1e-09
#>
#> $aghq_escalate_patience
#> [1] 3
#>
#> $aghq_rho_min
#> [1] 0.015625
#>
#> $warn_runaway
#> [1] TRUE
#>
#> $allow_nongaussian_reml
#> [1] FALSE
#>
