relrisk: Regression Adjusted Relative Risks

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/relrisk.R

Description

This function calculates the relative risks RR adjusted for covariates (acting on a previous log-binomial regression fit) and confidence intervals (by default 95 percent) for the estimated RR. The confidence interval is calculated from the log(RR) and backtransformed.

Usage

1
relrisk(object, alpha = 0.05, dispersion = FALSE)

Arguments

object

object of class 'lbreg'.

alpha

1 - desired confidence level.

dispersion

logical. TRUE if standard errors should be adjusted for dispersion estimate based on Pearson residuals.

Value

value

table with estimated relative risks, lower and upper bounds of condifidence intervals.

Author(s)

Bernardo B. Andrade

References

Andrade, BB; Andrade JML (2018) Some results for Maximum Likelihood Estimation of Adjusted Relative Risks. Communications in Statistics - Theory and Methods.

See Also

lbreg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require(lbreg)

# ungrouped data
# data preparation
data(PCS)
w <- PCS
w <- w[,-1]
w$race <- factor(w$race)
w$dpros <- factor(w$dpros)
w$dcaps <- factor(w$dcaps)

# log-binomial regression
fm <- lbreg(tumor ~ ., data=w)

# relative risks
relrisk(fm)
relrisk(fm, alpha=.10)

# grouped data 
require(lbreg)
data(Caesarian)
m1 <- lbreg( cbind(n1, n0) ~ RISK + NPLAN + ANTIB, data=Caesarian)
relrisk(m1)
relrisk(m1, dispersion=TRUE)

lbreg documentation built on Dec. 26, 2019, 5:06 p.m.