lincom: Create estimates, CIs and P-values for a linear combination...

Description Usage Arguments Value Examples

Description

Create estimates, CIs and P-values for a linear combination of two coefficients

Usage

1
2
lincom(model, lc, robust = FALSE, expo = TRUE, digits = 3,
  type = "HC1", level = 0.95, df = Inf)

Arguments

model

The fit of a generalized linear model (lm or glm)

lc

Character vector for the linear combination(s) set equal to null value(s) (usually zero) to test. Written in terms of variable names.

robust

Logical expression indicating whether robust standard errors are to be used

expo

Logical expression indicating whether exponentiated linear combination of coefficients is requiested

digits

Number of digits to round to in output

type

Character string giving type of robust standard error from sandwich package

level

Numeric confidence coefficient for CIs (as proportion)

df

Degrees of freedom for reference t distribution (Inf means Normal distribution)

Value

A table of linear combination values or exponentiated linear combination values with CI(s)s (robust or not) and P-value(s).

Examples

1
2
3
4
5
6
7
x1 <- rbinom(100, 2, .5)
x2 <- rbinom(100, 2, .5)
expit <- function(x) exp(x)/(1 + exp(x))
y <- rbinom(100, 1, p = expit(x1 + x2 + .1))
model <- glm(y~x1*x2, family = "binomial")
variable.names(model)
lincom(model, lc = "x1 + x1:x2 == 0")

bmckuw/UWbe536 documentation built on May 31, 2019, 1:54 p.m.