Learn R Programming

glm.ddR (version 0.1.0)

residuals.dglm: Extract Residuals of an dglm Model

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

"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

Run this code
 ## 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)

Run the code above in your browser using DataLab