View source: R/nicqFunctions.R
nimDiffOR | R Documentation |
For testing the alternative F2(t)< g(F1(t)). We give several built-in choices for the function g. All functions must be defined in terms of delta and q, where F1(t0)=q and t0 is defined implicitly, and delta = F2(t0) - g(F1(t0)).
nimDiffOR(p, delta = 0.1, q = 0.2)
nimOR(p, delta=0.1, q=0.2)
nimDiff(p,delta=.1, q=NULL)
p |
a vector of F1(t) values, where F1(t) is the proportion of control that failed by t. |
q |
the probability associated with the control quantile of interest, not used for calculations in |
delta |
the difference: F2(t0) - g(F1(t0)) |
The functions are defined in terms of delta
and q
so that the function can change as a function of delta
and we can use the function to get confidence intervals for delta (defined in terms of q, since q=F1(t0) which defines t0).
Functions should handle vectors of F1(t) values, and the output is a vector of the same length. The results should be between 0 and 1.
The function nimDiffOR
gives the minimum of the difference (defined by delta) or the odds ratio (defined in terms of q and delta) when delta>0, and the maximum when delta<0.
For plots of the functions see Fay and Follmann (2015).
a vector of values g(F1(t)).
Fay, MP and Follmann DA (2016). Non-inferiority Tests for Anti-Infective Drugs using Control Group Quantiles. (to appear in Clinical Trials).
nicqTest
## notice that the second values, F1(t)=0.20=q,
## all equal
## q+delta=0.30
nimDiff(c(1:9)/10)
nimOR(c(1:9)/10)
nimDiffOR(c(1:9)/10)
## for delta<0, take max of difference and odds ratio
nimDiffOR(c(1:9)/10,delta=-.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.