coef {PivotalR}R Documentation

Extract model coefficients for Madlib regression objects

Description

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

Usage

    ## S3 method for class 'lm.madlib'
coef(object, ...)
    ## S3 method for class 'lm.madlib.grps'
coef(object, ...)
    ## S3 method for class 'logregr.madlib'
coef(object, ...)
    ## S3 method for class 'logregr.madlib.grps'
coef(object, ...)

Arguments

object

The regression model object, fit using madlib.lm or madlib.glm.

...

Other arguments, not used.

Details

Extract the fitted coefficients for a linear or logistic regression model, or a grouped list of such models.

Value

For ungrouped regressions, a named numeric vector giving the fitted coefficients.

For grouped regressions, a list giving the coefficients for each of the component models.

Author(s)

Author: Hong Ooi, Pivotal Inc. hooi@pivotal.io

Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io

See Also

coef.

Examples

 ## 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)

## create a table
delete("abalone", conn.id = cid)
x <- as.db.data.frame(abalone, "abalone", conn.id = cid, verbose = FALSE)

fit <- madlib.glm(rings < 10 ~ . - id | sex, data = x, family =
"binomial")

coef(fit)

coef(fit[[1]])

db.disconnect(cid, verbose = FALSE)

## End(Not run) 

[Package PivotalR version 0.1.18.3.1 Index]