anova.RRlog {RRreg}R Documentation

Analysis of Deviance for Logistic RR Regression Models

Description

Compute an analysis of deviance table for two logistic RR regression models.

Usage

## S3 method for class 'RRlog'
anova(object, ...)

Arguments

object

object of class RRlog, that is, logistic RR regression models fitted with the function RRlog.

...

a second RRlog model

Author(s)

Daniel W. Heck

Examples

# generate data
n <- 500
x <- data.frame(x1 = rnorm(n))
pi.true <- 1 / (1 + exp(.3 + 1.5 * x$x1))
true <- rbinom(n, 1, plogis(pi.true))
dat <- RRgen(n, trueState = true, model = "Warner", p = .1)
x$response <- dat$response

# fit and plot RR logistic regression
mod1 <- RRlog(response ~ x1, data = x, model = "Warner", p = .1)
mod0 <- RRlog(response ~ 1, data = x, model = "Warner", p = .1)
anova(mod1, mod0)


[Package RRreg version 0.7.5 Index]