Skip to contents

profile_targets() is an advanced inventory for users who need to diagnose or script profile confidence intervals. Most users should start with confint.gllvmTMB_multi() or a report-ready extractor such as extract_correlations(). This helper tells you which parm labels can be profiled directly.

Usage

profile_targets(object, ready_only = FALSE)

Arguments

object

A fit returned by gllvmTMB().

ready_only

If TRUE, return only rows with profile_ready = TRUE. Default FALSE returns the full inventory.

Value

A data frame with one row per target and the following columns:

parm

User-facing target label, e.g. b_fix[1], sigma_eps, or sd_B[2].

target_class

One of fixed_effect, variance, dispersion, loading_packed, threshold, or scaling.

tmb_parameter

TMB-side parameter name (matches names(fit$opt$par)).

index

1-based index within the TMB parameter vector. NA for scalars.

estimate

Point estimate on the natural scale (e.g. sigma_eps = exp(log_sigma_eps)).

link_estimate

Point estimate on the optimisation scale (the TMB internal scale).

scale

Either "natural" (after applying the transformation) or "link" (for raw packed entries).

transformation

One of linear_predictor, exp, logit, logit_p_tweedie, lambda_packed, or ordinal_threshold.

target_type

Always "direct" for currently returned rows.

profile_ready

TRUE iff the target can be passed directly to confint(fit, parm = ..., method = "profile").

profile_note

One of ready, tmb_object_required, missing_tmb_parameter, or latent_rotation_ambiguous.

Details

The returned tidy data frame has one row per profile target and records whether the target is profile-ready and, if not, why. Direct targets correspond to a single TMB parameter element (for example b_fix[1], sigma_eps, or sd_B[2]) and can be passed to confint(fit, parm = ..., method = "profile"). Nonlinear derived targets are excluded because their former penalty-profile routes are withheld.

Scope: the controlled vocabulary and direct-profile routing is covered for fitted models with retained TMB objects. Broader target-explicit profile calibration remains future work.

The output uses a controlled vocabulary for direct target classes, transformations, and readiness notes.

See also

confint.gllvmTMB_multi() for the routing of method = c("wald", "profile"), tmbprofile_wrapper() for direct-parameter profiling. For nonlinear summaries, consult the relevant extractor; a method token does not imply that a profile interval is currently available.

Examples

if (FALSE) { # \dontrun{
fit <- gllvmTMB(value ~ 0 + trait + latent(0 + trait | site, d = 1),
                data  = sim$data,
                trait = "trait",
                unit  = "site")
targets <- profile_targets(fit)
head(targets)
profile_targets(fit, ready_only = TRUE)
} # }