View source: R/samplesize.NIfrontier.binary.R
samplesize.NIfrontier.binary | R Documentation |
A function to estimate sample size of a trial designed with a non-inferiority frontier and analysed on either the risk difference, risk ratio, odds ratio or arc-sine difference scale.
samplesize.NIfrontier.binary(p.control.expected, p.experim.target=NULL, NI.frontier, sig.level=0.025,
summary.measure="RD", print.out=TRUE, unfavourable=TRUE,
power=0.9, r=1, round=T, ltfu=0)
p.control.expected |
Expected event risk in the control arm. |
p.experim.target |
Target event risk in the experimental arm under which to power the trial. |
NI.frontier |
Non-inferiority frontier, a function whos eonly input should be the control event risk and that returns the NI margin for that risk expressed as the specified summary measure. |
sig.level |
One-sided significance level for testing. Default is 0.025, i.e. 2.5%. |
power |
Power of the trial, i.e. one minus type-II error of the study. Default is 0.9, i.e. 90%. |
r |
Allocation ratio, i.e. ratio between sample sizes in the active and control goups. Default is 1. |
summary.measure |
The population-level summary measure to be estimated, i.e. the scale on which we define the non-inferiority margin. Can be one of "RD" (Risk Difference), "RR" (Risk Ratio), "OR" (Odds Ratio) or "AS" (Arc-Sine difference). |
print.out |
Logical. If FALSE, no output is printed. |
round |
A logical variable. If TRUE, sample sizes are rounded to the next integer, using the ceiling function. Otherwise, they are left unrounded. |
ltfu |
A numeric variable with the expected proportion of patients lost to follow-up. Default is 0. |
This function estimates sample size to acheiev certain power for a non-inferiority trial designed defining a non-inferiority frontier. The NI frontier can be defined using different sumamry measures. The method used for sample size calculation is "LRT".
A data.frame with estimated powers at each control event risk.
NI.frontier.RD<-function(p) return(0.1)
out<-try(samplesize.NIfrontier.binary(p.control.expected=0.1, p.experim.target=0.1,
NI.frontier=NI.frontier.RD, sig.level = 0.025,
power = 0.9, r = 1,
summary.measure = "RD", print.out = TRUE,
unfavourable=T))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.