Returns residuals values from the estimated model

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

# S3 method for gamljglmResults
residuals(object, type = "deviance", ...)

# S3 method for gamljmixedResults
residuals(object, ...)

# S3 method for gamljgmixedResults
residuals(object, type = "deviance", ...)

Arguments

object

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

...

additional arguments for specific residuals methods.

type

the type of residuals for generalized models. The alternatives are: 'deviance' (default), 'pearson', 'working', 'response', and 'partial'. Can be abbreviated. Cf. stats::residuals(), stats::residuals.lm(), stats::residuals.glm()

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<-residuals(gmod)