anova.RRlog | R Documentation |
Compute an analysis of deviance table for two logistic RR regression models.
## S3 method for class 'RRlog' anova(object, ...)
object |
object of class |
... |
a second |
Daniel W. Heck
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.