Learn R Programming

PivotalR (version 0.1.18.5)

vcov: vcov methods for Madlib regression objects

Description

Functions to extract the variance-cocariance matrix for regression models fit in Madlib.

Usage

# S3 method for lm.madlib.grps
vcov(object, na.action = NULL, ...)
    # S3 method for lm.madlib
vcov(object, na.action = NULL, ...)
    # S3 method for logregr.madlib.grps
vcov(object, na.action = NULL, ...)
    # S3 method for logregr.madlib
vcov(object, na.action = NULL, ...)

Arguments

object

The regression model object, of class lm.madlib, lm.madlib.grps, logregr.madlib, logregr.madlib.grps.

na.action

A function, default is NULL. Possible choice is na.omit,db.obj-method.

...

Other arguments, not used.

Value

For lm.madlib and logregr.madlib objects, this function returns the variance-covariance matrix of the main parameters.

For lm.madlib.grps and logregr.madlib.grps objects, which are a list of models for multiple groups of data, returns a list, each of which is the variance-cocariance matrix for the model of each group of data.

See Also

madlib.lm, madlib.glm for MADlib regression wrappers

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)

x <- as.db.data.frame(abalone, conn.id = cid, verbose = FALSE)
lk(x, 10)

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

vcov(fit)

vcov(fit[[1]])

db.disconnect(cid, verbose = FALSE)
# }

Run the code above in your browser using DataLab