plot.gComp {riskCommunicator} | R Documentation |
Plot estimates of difference and ratio effects obtained in the bootstrap computations of the g-computation
Description
Plot histograms and Q-Q plots for each the difference and ratio estimates
Usage
## S3 method for class 'gComp'
plot(x, ...)
Arguments
x |
(Required) An object of class |
... |
(Optional) additional arguments to be supplied to the
' |
Value
a plot containing histograms and Q-Q plots of the difference and ratio estimates returned from R bootstrap iterations
Examples
## Obtain the risk difference and risk ratio for cardiovascular disease or death
## between patients with and without diabetes, while controlling for
## age,
## sex,
## BMI,
## whether the individual is currently a smoker, and
## if they have a history of hypertension.
data(cvdd)
set.seed(58)
diabetes.result <- gComp(data = cvdd, Y = "cvd_dth", X = "DIABETES",
Z = c("AGE", "SEX", "BMI", "CURSMOKE", "PREVHYP"), outcome.type = "binary", R = 60)
plot(diabetes.result)
[Package riskCommunicator version 1.0.1 Index]