Learn R Programming

lame (version 1.3.4)

predict.ame_als: Predictions from a fast AME fit

Description

Returns predictions from an ame_als or lame_als fit: the fitted linear predictor on the link scale (type = "link") or the response scale (type = "response", the default).

Usage

# S3 method for ame_als
predict(object, newdata = NULL, type = c("response", "link"), ...)

Value

A matrix (cross-sectional) or list of matrices (longitudinal).

Arguments

object

an ame_als object.

newdata

optional dyadic covariate array matching object$X ([n_row, n_col, p, T]); a matrix or 3D array is coerced.

type

"response" (default) or "link".

...

ignored.

Details

With newdata = NULL the training-data fitted values are returned. Supplying newdata -- a dyadic covariate array with the same actors and dimensions as the fitted design -- substitutes the dyadic covariate contribution while holding the intercept, additive effects and multiplicative term fixed; it predicts counterfactual dyadic covariates for the same network, not out-of-sample actors.