Learn R Programming

coefplot (version 1.2.9)

extract.coef: extract.coef

Description

Extract Coefficient Information from glm Models

Usage

extract.coef(model, ...)

Value

A data.frame containing the coefficient, the standard error and the variable name.

Arguments

model

Model object to extract information from.

...

Further arguments

Author

Jared P. Lander

Details

Gets the coefficient values and standard errors, and variable names from a glm model.

Examples

Run this code
if (FALSE) {
library(ggplot2)
data(diamonds)
library(coefplot)
mod1 <- lm(price ~ carat + cut + x, data=diamonds)
mod2 <- glm(price > 10000 ~ carat + cut + x, data=diamonds, family=binomial(link="logit"))
mod3 <- lm(price ~ carat*cut + x, data=diamonds)
extract.coef(mod1)
extract.coef(mod2)
extract.coef(mod3)

mod4 <- rxLinMod(price ~ carat*cut + x, diamonds)
}

Run the code above in your browser using DataLab