# eventProb: Calculate event probabilities In factorial2x2: Design and Analysis of a 2x2 Factorial Trial

## Description

Calculates the event probabilities for each of the four factorial groups C, A, B, AB. The time unit is in years, but of course, any time unit could be used. Average event probabilities across various combinations of the groups are also calculated. The event times are assumed to be exponentially distributed. The censoring times are assumed to be uniformly distributed and indepedent of the event times.

## Usage

 `1` ```eventProb(rateC, hrA, hrB, hrAB, mincens, maxcens) ```

## Arguments

 `rateC` group C one year event rate `hrA` group A to group C hazard ratio `hrB` group B to group C hazard ratio `hrAB` group AB to group C hazard ratio `mincens` minimum censoring time `maxcens` maximum censoring time

## Value

 `hazC ` group C's exponential hazard rate `probC ` event probability of the C group `probA ` event probability of the A group `probB ` event probability of the B group `probAB ` event probability of the AB group `avgprob ` average event probability across all factorial groups `probA_C` average event probablity of the A and C groups `probAB_C` average event probablity of the AB and C groups

## 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 25 26 27 28``` ```# Corresponds to scenario 5 of Table 2 from Leifer, Troendle, et al. (2019). rateC <- 0.0445 hrA <- 0.80 hrB <- 0.80 hrAB <- 0.72 mincens <- 4.0 maxcens <- 8.4 eventProb(rateC, hrA, hrB, hrAB, mincens, maxcens) # hazC #  0.04552052 # probC #  0.2446365 # probA #  0.201254 # probB #  0.201254 # probAB #  0.1831806 # avgprob #  0.2075813 # probAB_C #  0.2139086 ```

factorial2x2 documentation built on April 28, 2020, 1:09 a.m.