Skip to contents

Standard model-object accessors for a multivariate fit returned by gllvmTMB(), whether the call started from wide traits(...) data or already-stacked long data. Internally the fit has class gllvmTMB_multi, which is what these S3 methods dispatch on, but you call print(fit) and summary(fit) as usual. Likelihood and inference accessors depend on the estimator, as described below.

Usage

# S3 method for class 'gllvmTMB_multi'
AIC(object, ..., k = 2)

# S3 method for class 'gllvmTMB_multi'
BIC(object, ...)

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

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

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

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

# S3 method for class 'gllvmTMB_multi'
nobs(object, ...)

Arguments

...

Currently unused.

k

Penalty per parameter for AIC(); default 2 (ordinary AIC).

x, object

A fit returned by gllvmTMB().

digits

Decimal digits in the printed summary. Default 3.

Details

  • For ML fits, print() shows the active covstructs, the number of fixed effects, and the converged log-likelihood.

  • For ML fits, summary() adds a fixed-effects table with SEs, the global and local trait correlation matrices, per-trait ICCs, and global / local communalities.

  • For an unpenalised native-Laplace ML fit, logLik() is the converged maximum with df = length(opt$par) and nobs equal to the number of likelihood-contributing response cells. AGHQ has a distinct integration objective; a loading ridge is penalised MAP; and non-unit likelihood weights define an estimating objective. Ordinary likelihood comparison is unavailable on each of those restricted surfaces.

  • For estimator = "mspl", print() and summary() identify the experimental softly penalised Laplace point estimator and show the unpenalised Laplace value at that point only as provenance. logLik(), AIC, BIC, likelihood-ratio tests, standard errors, intervals, and profiles fail closed because the point is not the ordinary likelihood maximum and repeated-sampling inference is not calibrated.

nobs() returns the number of likelihood-contributing observations – the observed-response cells. This equals fit$missing_data$counts$likelihood_rows and the nobs attribute of logLik(). Under the default miss_control(response = "drop") every fitted row is observed, so it equals length(fit$tmb_data$y); under response = "include" the masked rows are excluded. Original-row counts live in fit$missing_data, never in nobs().