Description Usage Arguments Value Author(s) Examples
Inference on relative risk under multinomial logistic regression
1 2 |
formula |
a formula term that is passed into |
basecov |
a baseline value of exposure variable. Defaults to |
fixcov |
a data frame of fixed value for each of adjusted confounders. If there is no confounder other than the 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 |
|
(adjusted) relative risk ratio of |
|
(adjusted) relative risk of |
|
estimated variance of relative risk ( |
|
if |
|
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 | n <- 500
set.seed(1234)
X <- rbinom(n, 1, 0.3)
W <- rbinom(n, 1, 0.3)
W[sample(1:n, n/3)] = 2
Y <- rbinom(n, 1, plogis(X - W))
dat <- as.data.frame(cbind(Y, X, W))
result <- multiRR(W ~ X + Y, basecov = 0, data = dat, boot = TRUE, n.boot = 100)
print(apply(result$boot.rr, 2, sd)) # estimated standard errors using Delta method
print(sqrt(result$delta.var)) # estimated standard errors using bootstrap
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.