Description Usage Arguments Details Value Author(s) See Also Examples
Functions to extract the AIC and log-likelihood for regression models fit in Madlib.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ## S3 method for class 'lm.madlib'
extractAIC(fit, scale=0, k=2, ...)
## S3 method for class 'lm.madlib.grps'
extractAIC(fit, scale=0, k=2, ...)
## S3 method for class 'lm.madlib'
logLik(object, ...)
## S3 method for class 'lm.madlib.grps'
logLik(object, ...)
## S3 method for class 'lm.madlib.grps'
AIC(object, ..., k=2)
## S3 method for class 'logregr.madlib'
extractAIC(fit, scale=0, k=2, ...)
## S3 method for class 'logregr.madlib.grps'
extractAIC(fit, scale=0, k=2, ...)
## S3 method for class 'logregr.madlib'
logLik(object, ...)
## S3 method for class 'logregr.madlib.grps'
logLik(object, ...)
## S3 method for class 'logregr.madlib.grps'
AIC(object, ..., k=2)
## S3 method for class 'glm.madlib'
extractAIC(fit, scale=0, k=2, ...)
## S3 method for class 'glm.madlib.grps'
extractAIC(fit, scale=0, k=2, ...)
## S3 method for class 'glm.madlib'
logLik(object, ...)
## S3 method for class 'glm.madlib.grps'
logLik(object, ...)
## S3 method for class 'glm.madlib.grps'
AIC(object, ..., k=2)
|
fit, object |
The regression model object, of class |
scale |
The scale parameter for the model. Currently unused. |
k |
Numeric, specifying the equivalent degrees of freedom part in the AIC formula. |
... |
Other arguments, not used. |
See the documentation for AIC
and extractAIC
.
For ungrouped regressions, logLik
returns an object of
class logLik
, and extractAIC
returns a length-2
numeric vector giving the edf and AIC.
For grouped regressions, logLik
and extractAIC
return
a list 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: Hong Ooi, Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
AIC
, extractAIC
, logLik
.
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")
AIC(fit)
AIC(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.