groups: Summary information for Logistic Regression output

Description Usage Arguments Value Author(s) See Also Examples

Description

The function prints the value of each element in the Logistic Regression output object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'lm.madlib'
groups(x)

## S3 method for class 'lm.madlib.grps'
groups(x)

## S3 method for class 'logregr.madlib'
groups(x)

## S3 method for class 'logregr.madlib.grps'
groups(x)

Arguments

x

The result of madlib.lm or madlib.glm

Value

A list that contains the value of each grouping colum. The elements of the list are the same as the grouping columns. If x is a lm.madlib object with one group's information in it, the elements of the resulting list contain one value for each grouping column. If x is lm.madlib.grps, which contains multiple groups' information, then each element of the resulting list is a vector with the length equal to the number of different groups. logregr.madlib and logregr.madlib.grps have the similar interpretation of the results.

If no grouping column is used, this funcion returns NULL.

Author(s)

Author: Predictive Analytics Team at Pivotal Inc.

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

See Also

madlib.glm wrapper for MADlib linear and logistic regressions.

madlib.lm wrapper for MADlib linear regression

predict.lm.madlib, predict.lm.madlib.grps, predict.logregr.madlib, predict.logregr.madlib.grps make predictions for new data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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 from the example data.frame
delete("abalone", conn.id = cid)
source_data <- as.db.data.frame(abalone, "abalone", conn.id = cid, verbose = FALSE)
lk(source_data, 10)

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

groups(fit) # all grouping column values

groups(fit[[1]]) # the first model's grouping column value

db.disconnect(cid, verbose = FALSE)

## End(Not run)

PivotalR documentation built on March 13, 2021, 1:06 a.m.