Description Usage Arguments Value Author(s) Examples
When response variable is binary and exposure variable is categorical this function derives adjusted relative risks conditional on fixed other confounders' value from logistic regression.
1 2 
formula 
a formula term that is passed into 
basecov 
a baseline value of exposure variable. Defaults to the first level. 
comparecov 
a value of exposure variable for comparison. Defaults to the first level. 
fixcov 
a data frame of fixed value for each of adjusted confounders. If there is no confounder other than an exposure variable of interest, 
data 
a data frame containing response variable and all the terms used in 
boot 
a logical value whether bootstrap samples are generated or not. Defaults to 
n.boot 
if 

an object of class 

(conditional) relative risk in response under exposure at baseline ( 

estimated variance of relative risk ( 

if 

estimated sampled variance using bootstraps if 

a data frame of fixed value for each of adjsuted confounders. 
Youjin Lee
1 2 3 4 5 6 7 8 9 10 11  n < 500
set.seed(1234)
W < rbinom(n, 1, 0.3); W[sample(1:n, n/3)] = 2
dat < as.data.frame(W)
dat$X < sample( c("low", "medium", "high"), size = n, replace = TRUE)
dat$Y < ifelse(dat$X == "low", rbinom(n, 1, plogis(W + 0.5)),
ifelse(dat$X == "medium", rbinom(n, 1, plogis(W + 0.2)),
rbinom(n, 1, plogis(W  0.4)) ))
dat$X < as.factor(dat$X)
result < nominalRR(Y ~ X + W, basecov = "low", comparecov = "high", data = dat,
boot = TRUE, n.boot = 200)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.