predict: Predicted values from GAMLj models

predictR Documentation

Predicted values from GAMLj models

Description

Returns predicted values from the estimated model

Usage

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

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

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

## S3 method for class '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(s)

Marcello Gallucci

Examples

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

mcfanda/gamlj documentation built on April 15, 2024, 11:16 a.m.