Returns predicted values from the estimated model

# S3 method for gamljlmResults
predict(object, ...)

# S3 method for gamljglmResults
predict(object, type = "response", ...)

# S3 method for gamljmixedResults
predict(object, re.form = NULL, type = "response", ...)

# S3 method for gamljgmixedResults
predict(object, re.form = NULL, type = "response", ...)

Arguments

object

a gamlj results object of the class `gamlj*Results`

...

additional arguments for specific predict methods other than the ones specified here.

type

the type of prediction required. The default is on the scale of the response variables ('response'); Thus for binomial models the default is to compute the predicted probabilities. 'link' gives the scale of the linear predictors; is on the scale of the linear predictors; The 'terms' option returns a matrix giving the fitted values of each term in the model formula on the linear predictor scale. Cf. stats::predict(), stats::predict.lm()

re.form

(formula, NULL, or NA) specify which random effects to condition on when predicting. If NULL, include all random effects; if NA or ~0, include no random effects. Used only for the mixed models.

Value

a R object of the class of the estimated model

Author

Marcello Gallucci

Examples

data('qsport')
gmod<-GAMLj3::gamlj_lm(
   formula = performance ~ hours,
   data = qsport)
 preds<-predict(gmod)