summary.gComp: Print a summary of a gComp class object.

View source: R/summary.gComp.R

summary.gCompR Documentation

Print a summary of a gComp class object.

Description

Takes a gComp object produced by gComp() and produces various useful summaries from it.

Usage

## S3 method for class 'gComp'
summary(object, ...)

## S3 method for class 'summary.gComp'
print(x, ...)

Arguments

object

(Required) An object of class gComp as produced by gComp().

...

Further arguments passed to or from other methods.

x

(Required) An object of class summary.gComp as produced by summary.gComp().

Value

Returns the formula, family (with link function), contrast evaluated, resulting point estimate and 95% confidence intervals of the parameters estimated, and the underlying glm used for model predictions.

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(4832)
diabetes.result <- gComp(cvdd, 
   formula = "cvd_dth ~ DIABETES + AGE + SEX + BMI + CURSMOKE + PREVHYP",
   outcome.type = "binary", R = 20)
summary(diabetes.result)


riskCommunicator documentation built on June 1, 2022, 1:07 a.m.