coeffs: GLM Coefficients Summary

Description Usage Arguments Value Author(s) Examples

Description

Reports GLM regression model coefficients alongside associated standard error, z-score, p-value and odds-ratio [exp(B)], plus, optionally, confidence intervals.

Usage

1
coeffs(model, conf.int=FALSE)

Arguments

model

The fitted model from a general linear model.

conf.int

If TRUE the confidence intervals of each regression coefficient are reported in addition to the standard outputs. The default (FALSE) is not to report the confidence intervals.

Value

A data frame (one row per regression coefficient) comprising:

B

Regression coefficient

Std.Error

The standard error of the regression coefficient

z.value

The z-score of the standard error

p.value

The significance level (p-value) of the regression coefficient

expB

The odds ratio (exponent of the regression coefficient)

CI.L95pct

The lower bound of the 95% Confidence Interval

CI.U95pct

The upper bound of the 95% Confidence Interval

Author(s)

Paul Williamson

Examples

1
2
3
4
5
6
7
8
## Fit logistic regression model
model <- glm(Sex ~ Age, data=survey, family=binomial)

## Standard function output
coeffs(model)

## Standard output plus confidence intervals
coeffs(model, conf.int=TRUE)

DrPaulWilliamson/ENVS450 documentation built on May 9, 2019, 3:23 a.m.