Skip to contents

The Julia bridge is halted/deferred future work. This compatibility method is for inspecting an existing drmTMB_julia object, not for a new Julia analysis. Use native TMB fits for new prediction work.

Usage

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

Arguments

object

A drmTMB_julia fit.

newdata

Optional data frame. When supplied, predictions are population-level (random effects set to zero).

dpar

Distributional parameter to predict. Defaults to the first (mu). With newdata, must be a location parameter (mu / mu1 / mu2).

type

"response" (default) or "link".

...

Reserved.

Value

A numeric vector of predictions, length nrow(newdata) when newdata is supplied.

Details

With newdata = NULL, predict() returns the stored fitted values for the requested distributional parameter. With newdata supplied, it returns a population-level, fixed-effect prediction for the location parameter (mu / mu1 / mu2): the linear predictor X %*% beta built from the fit's fixed-effect coefficients and a design matrix constructed from newdata using the training-data model terms. Group-level random effects (phylogenetic / spatial / study) are held at zero – a newdata row need not belong to any fitted group – so the result is the marginal mean at the population level, matching the native predict.drmTMB() contract for newdata. type = "link" returns the linear predictor; type = "response" applies the model's inverse link.

Predicting sigma / rho12 for fresh newdata is not implemented; refit with engine = "tmb" for those.