residuals: Residuals methods for Madlib regression objects

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Functions to extract the residuals for regression models fit in Madlib.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## 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, ...)

Arguments

object

The regression model object, of class lm.madlib, lm.madlib.grps or logregr.madlib, logregr.madlib.grps obtained using madlib.lm or madlib.glm respectively.

...

Other arguments, not used.

Details

See the documentation for residuals

Value

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(s)

Author: Predictive Analytics Team, Pivotal Inc.

Maintainer: Frank McQuillan, Pivotal Inc. [email protected]

See Also

AIC, extractAIC, logLik.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 ## 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)

PivotalR documentation built on May 30, 2017, 8:18 a.m.