relative_risk {eudract}R Documentation

Calculate relative risks to be reported or plotted as dot plot

Description

Calculate relative risks to be reported or plotted as dot plot

Usage

relative_risk(
  safety,
  type = c("non_serious", "serious"),
  reference = safety$GROUP$title[1],
  size = 95
)

relative_risk_table(
  safety,
  type = c("non_serious", "serious"),
  reference = safety$GROUP$title[1],
  size = 95,
  digits = 3,
  valid_estimates = TRUE
)

order_filter(rel_risk, threshold = 10)

Arguments

safety

an object created by safety_summary

type

a choice of "non_serious" (default) or "serious" as to which type of AE to report on

reference

character vector naming the reference arm for the calculations. Defaults to the first row of the safety$GROUP.

size

a number between 0-100, giving the size of the confidence interval. Default is 95.

digits

integer giving the number of significant figures to report to. Default of 3.

valid_estimates

a logical, which determines if only terms with valid estimates of relative risk are included in the table. The alternative is to include terms with zeroes.

rel_risk

a relative risk object

threshold

a threshold on the percent scale, the max percentage for a term the incidence rate needs to exceed

Value

relative_risk returns of list of three items. "relative_risk" a data.frame that has the relative risk estimate and confidence intervals. "percentage" a data.frame with absolute percentages. "GROUP" a copy from the original safety_summary object. No adjustment made to deal with zeroes. This is suitable input for the dot_plot function, and in most cases will not be used directly, but may potentially be modified with filtration, or editing of terms, see order_filter.

relative_risk_table returns a data frame that is suitable for printing to a report, giving relative risks

order_filter returns a revised relative risk object, with the terms concatenated with SOC if there are any duplicates, then ordered by relative risk, into a factor, and filtered to only those terms with an incidence rate above the threshold.

See Also

safety_summary dot_plot

Examples

safety_statistics <- safety_summary(safety,
           exposed=c("Experimental"=60,"Control"=67))
head( relative_risk(safety_statistics, type="serious") )
relative_risk_table(safety_statistics, type="serious")
rr <- relative_risk(safety_statistics)
rr2 <- order_filter(rr, threshold=2)
dot_plot(rr2)

[Package eudract version 1.0.0 Index]