# NOT RUN {
# estimate power
power = powerConLogistic.bin(
N = 59,
power = NULL,
OR = 3.5,
pE = 0.15,
nD = 1,
nH = 2,
R2 = 0,
alpha = 0.05,
nTests = 1)
print(power) # 0.80
# estimate N (number of sets)
N = powerConLogistic.bin(
N = NULL,
power = 0.80,
OR = 3.5,
pE = 0.15,
nD = 1,
nH = 2,
R2 = 0,
alpha = 0.05,
nTests = 1)
print(ceiling(N)) # 59
# estimate OR
OR = powerConLogistic.bin(
N = 59,
power = 0.80,
OR = NULL,
pE = 0.15,
nD = 1,
nH = 2,
R2 = 0,
alpha = 0.05,
nTests = 1,
OR.low = 1.01,
OR.upp = 100)
print(OR) # 3.49
# }
Run the code above in your browser using DataLab