R/harmBound_functions.R
convertRisks.Rd
Convert the proportion of events in the experimental groups to risk differences and ratios and vice versa.
convertRisks(
eprop = NULL,
etotal = NULL,
rd = NULL,
rr = NULL,
or = NULL,
r0 = NULL,
n0,
n1 = n0
)
vector with risks in control and experimental group (r0, r1), the risk difference (rd), risk ratio (rr) and odds ratio (or)
convertRisks(eprop=0.5,etotal=100,n0=200)
#> eprop etotal n0 n1 r0 r1 rd rr or
#> 0.50 100.00 200.00 200.00 0.25 0.25 0.00 1.00 1.00
convertRisks(eprop=0.6,etotal=100,n0=200)
#> eprop etotal n0 n1 r0 r1 rd
#> 0.600000 100.000000 200.000000 200.000000 0.200000 0.300000 0.100000
#> rr or
#> 1.500000 1.714286
convertRisks(rr=1.5,n0=200,r0=0.2)
#> eprop etotal n0 n1 r0 r1 rd
#> 0.600000 100.000000 200.000000 200.000000 0.200000 0.300000 0.100000
#> rr or
#> 1.500000 1.714286