Generate predictions from a fitted longitudinal AME model. Returns a list of matrices (one per time point) on the requested scale.
Arguments
- object
Fitted LAME model object.
- newdata
Optional list of
Tdyadic covariate arrays ([n_row, n_col, p]each, with the same actors as the fit) to compute counterfactual predictions. WhenNULL, the training-data predictions are returned.- type
Character;
"response"(default) or"link".- h
Integer >= 0: forecast horizon. When
h = 0(default), returns in-sample predictions as before. Whenh > 0, propagates the AR(1) (or RW1) state-space model forward byhperiods and returns a list ofhmatrices (one per future period). Requires at least one dynamic component on the fit. Warns when posterior \(\rho_\beta\) is near 1.- by_draw
When
TRUEandh > 0, returns ann x n x h x n_drawsarray of per-draw forecasts instead of per-period means.- interval
One of
"none"(default) or"credible". Whenh > 0and"credible", the per-period output is a list of length-3 lists with$lower,$median,$uppermatrices computed at theprobsquantiles across posterior draws. Ignored for in-sample (h = 0) predictions.- probs
Length-2 vector of lower / upper quantiles for the credible interval when
interval = "credible". Defaultc(0.025, 0.975).- newexposure
Optional length-
hnon-negative numeric vector of future-period exposures (Poisson only). When omitted and the fit hasperiod_exposurestored, defaults to the last observed exposure; when both are absent, defaults to 1.- n_draws
Number of posterior draws to use when
h > 0. DefaultNULLuses all stored draws. Ignored for in-sample (h = 0) predictions.- seed
Optional RNG seed for the
h > 0forecast draws, making forecasts reproducible. Ignored whenh = 0.- ...
Additional arguments (not used).