excl.glm: Easily exclude columns in glm()

Description Usage Arguments Examples

Description

Preserve the " Y ~ . " formula in a glm, but exclude specific named columns from the "." (i.e., exclude a column or columns from the rest of the variables in the dataset).

Usage

1
excl.glm(depvar, indata, excl.cols = NULL, ...)

Arguments

indata

Dataset

excl.cols

Vector of column names or vector of column numbers to exclude

Y

Dependent variable

Examples

1
2
3
4
5
6
7
8
9
data(infert)
m1 <- excl.glm("conc", Theoph, excl.cols="Subject")
summary(m1)

m2 <- excl.glm("conc", Theoph, excl.cols=c(1,2))
summary(m2)

m3 <- excl.glm("case", infert, excl.cols="Subject", family=binomial())
summary(m3)

kippjohnson/kippr documentation built on May 12, 2019, 2:02 p.m.