residuals {PivotalR} | R Documentation |
Functions to extract the residuals for regression models fit in Madlib.
## S3 method for class 'lm.madlib' residuals(object, ...) ## S3 method for class 'lm.madlib.grps' residuals(object, ...) ## S3 method for class 'logregr.madlib' residuals(object, ...) ## S3 method for class 'logregr.madlib.grps' residuals(object, ...) ## S3 method for class 'glm.madlib' residuals(object, ...) ## S3 method for class 'glm.madlib.grps' residuals(object, ...)
object |
The regression model object, of class |
... |
Other arguments, not used. |
See the documentation for residuals
For ungrouped regressions, residuals
returns an object of class db.Rquery
For grouped regressions, residuals
returns a list of db.Rquery
objects giving the output of these methods for each of the component models. Similarly, AIC
for a grouped regression returns a vector of the AICs for each of the component models.
Author: Predictive Analytics Team, Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
AIC
, extractAIC
, logLik
.
## Not run: ## set up the database connection ## Assume that .port is port number and .dbname is the database name cid <- db.connect(port = .port, dbname = .dbname, verbose = FALSE) x <- as.db.data.frame(abalone, conn.id = cid, verbose = FALSE) lk(x, 10) fit <- madlib.glm(rings < 10 ~ . - id | sex, data = x, family = "binomial") residuals(fit) db.disconnect(cid) ## End(Not run)