Description Usage Arguments Details Value Author(s) See Also Examples
Functions to extract the coefficients for regression models fit in Madlib.
1 2 3 4 5 6 7 8 |
object |
The regression model object, fit using |
... |
Other arguments, not used. |
Extract the fitted coefficients for a linear or logistic regression model, or a grouped list of such models.
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: Hong Ooi, Pivotal Inc. hooi@pivotal.io
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
coef
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.