Learn R Programming

PivotalR (version 0.1.18.5)

groups: Summary information for Logistic Regression output

Description

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

Usage

# S3 method for lm.madlib
groups(x)

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

# S3 method for logregr.madlib groups(x)

# S3 method for 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.

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

Run this code
# NOT RUN {
<!-- %% @test .port Database port number -->
<!-- %% @test .dbname Database name -->
## 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)
# }

Run the code above in your browser using DataLab