residuals.dglm: Extract Residuals of an dglm Model

Description Usage Arguments Value Examples

View source: R/dglm.R

Description

This function extracts model residuals of an dglm model in a darray. The abbreviated function is resid. This function is only available for complete models.

Usage

1
2
3
## S3 method for class 'dglm'
residuals(object, type = c("deviance", "pearson", 
         "working", "response", "partial"), trace=FALSE, ...)

Arguments

object

an dglm model

type

can be "deviance", "pearson", "working", "response", or "partial".

trace

when TRUE, intermediate steps of the progress are displayed.

...

further arguments passed to or from other methods.

Value

darray of residuals

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 ## Not run: 
    library(glm.ddR)

    Y <- as.darray(as.matrix(mtcars$am),
                   c(ceiling(length(mtcars$am)/4),1))
    X <- as.darray(as.matrix(cbind(mtcars$wt,mtcars$hp)),
                   c(ceiling(length(mtcars$hp)/4),2))

    myModel <- dglm(responses=Y, predictors=X, 
                      family=binomial(logit), completeModel=TRUE)
    res <- resid(myModel)
 
## End(Not run)

glm.ddR documentation built on May 29, 2017, 6:49 p.m.