Skip to contents

Small S3 surface for fits returned by gllvmTMB(..., engine = "julia") or gllvm_julia_fit(). These methods expose the flat bridge payload that has already passed the R admission gates. They are point-estimate summaries: prediction and ordinary response/Pearson residuals are in-sample retained-payload reconstructions only. Simulation is conditional on retained fitted values for admitted one-family rows and complete balanced mixed-family rows. Unit-tier covariance honors native link_residual scale semantics, and raw ordination accessors are routed; richer extractor parity remains a separate bridge row. Confidence intervals are routed for admitted no-X Gaussian, Poisson, Bernoulli binomial, NB2, NB1, Beta, and Gamma rows; response-mask CIs are routed for the same non-Gaussian rows when X = NULL; complete-response fixed-effect-X CIs are routed for Gaussian, Poisson, Bernoulli binomial, NB2, Beta, and Gamma rows. They may be requested at fit time through gllvmTMB(ci_method = ...), or retrieved and recomputed through confint(). Predictor-informed latent(..., lv = ~ x) rows admit ci_method = "wald" at fit time; retained Wald payloads are surfaced as std.error, lower, and upper through extract_lv_effects() rather than confint().

Usage

# S3 method for class 'gllvmTMB_julia'
logLik(object, ...)

# S3 method for class 'gllvmTMB_julia'
print(x, ...)

# S3 method for class 'gllvmTMB_julia'
coef(object, ...)

# S3 method for class 'gllvmTMB_julia'
predict(
  object,
  newdata = NULL,
  type = c("link", "response", "prob", "class"),
  ...
)

# S3 method for class 'gllvmTMB_julia'
fitted(object, type = c("response", "link", "prob", "class"), ...)

# S3 method for class 'gllvmTMB_julia'
residuals(object, type = c("response", "pearson"), ...)

# S3 method for class 'gllvmTMB_julia'
simulate(
  object,
  nsim = 1,
  seed = NULL,
  newdata = NULL,
  condition_on_RE = TRUE,
  ...
)

# S3 method for class 'gllvmTMB_julia'
confint(
  object,
  parm,
  level = 0.95,
  method = c("stored", "wald", "profile", "bootstrap"),
  ci_nboot = 200L,
  ci_seed = 0L,
  ...
)

# S3 method for class 'gllvmTMB_julia'
summary(object, ...)

# S3 method for class 'summary.gllvmTMB_julia'
print(x, digits = 3, ...)

Arguments

object, x

A fit returned by gllvmTMB(..., engine = "julia") or gllvm_julia_fit().

...

Unused.

newdata

Unsupported for Julia bridge fits; current prediction and simulation methods return in-sample values from the retained bridge payload.

type

Prediction or residual scale. For predict() and fitted(), "link" returns the fitted linear predictor and "response" applies the inverse link for supported non-ordinal bridge families. For per-trait ordinal bridge fits, "response" and "prob" return fitted category probabilities and "class" returns the modal category. For residuals(), "response" returns observed-minus-fitted residuals on the response scale and "pearson" divides by the family-specific standard deviation. Binomial rows use the observed proportion, y / N, on the response scale.

nsim

Number of replicate response vectors to draw for simulate().

seed

Optional RNG seed for simulate().

condition_on_RE

Logical for simulate(). The Julia bridge currently routes only conditional, in-sample simulation from retained fitted values, so FALSE stops with a not-yet-routed message.

parm

Optional integer or character vector of CI terms for confint().

level

Confidence level requested by confint(). Stored Julia bridge payloads can only be read at their stored level; post-fit requests recompute the admitted Julia CI payload at the requested level.

method

CI route for confint(). "stored" reads an existing payload. "wald", "profile", and "bootstrap" recompute from retained bridge input for admitted no-X Gaussian, Poisson, Bernoulli binomial, NB2, NB1, Beta, and Gamma rows, including masked non-Gaussian rows when X = NULL. Complete-response fixed-effect-X recomputation is routed for Gaussian, Poisson, Bernoulli binomial, NB2, Beta, and Gamma rows. If omitted, confint() reads a stored payload when present and otherwise uses "wald" for current fits that retain their bridge input.

ci_nboot

Number of parametric bootstrap replicates when method = "bootstrap".

ci_seed

Seed passed to the Julia bootstrap CI route.

digits

Number of digits printed by summary methods.

Value

logLik() returns a "logLik" object. coef() returns a named list of available point-estimate components. confint() returns a conventional confidence-interval matrix for stored or recomputed Julia CI payloads. predict() returns an in-sample data frame. Non-ordinal rows use trait, unit, and est columns; ordinal probability rows use trait, unit, category, and prob; ordinal class rows use trait, unit, and est. fitted() returns the in-sample fitted matrix with traits in rows and units in columns for non-ordinal rows, and an array of category probabilities or a modal-class matrix for ordinal rows. residuals() returns an in-sample residual matrix with the same shape as fitted() for non-ordinal rows and keeps masked response cells as NA. simulate() returns an n_obs x nsim matrix in the same trait-major cell order as predict() and keeps masked response cells as NA. summary() returns a list with header, coefficients, covariance, and status fields.