genodds {genodds} | R Documentation |
Performs Agresti's Generalized Odds Ratios (GenOR) for two-group ordinal data.
genodds(response, group, strata=NULL, alpha=0.05,ties="split", nnt=FALSE,verbose=FALSE,upper=TRUE)
response |
A (non-empty) vector. Gives the outcome measure. If a factor, level order is used to determine ranking of outcomes. |
group |
A factor vector of equal length to |
strata |
An optional factor vector of equal length to |
alpha |
The acceptable type 1 error used in the test. |
ties |
A string specifying how ties should be treated. See Details. |
nnt |
A boolean.
If |
verbose |
A boolean.
If |
upper |
A boolean specifying if the upper triangle
of relative risk ratios should be printed.
If |
Agresti's generalized odds ratios (GenOR) calculates the odds that,
if a pair of observations are randomly selected from
two groups, the outcome in one group is higher than the other.
This implementation determines the direction of this comparison
using factor levels. Odds are given with reference to
observations corresponding to the higher group
level
resulting in a higher value in response
.
The opposite direction can be calculated by either calculating 1/genodds,
or by specifying response=1-response
in function input.
If nnt=TRUE
, the Number Needed to Treat (NNT) is printed.
NNT is a health economics measure and is related to generalized
odds ratios through the formula NNT=1+2/(GenOR-1).
It measures the expected number of patients required for a
treatment to have impacted a patient's outcome.
In this implementation, a positive NNT occurs when GenOR>1
and corresponds to the number needed to treat in the higher
group
level to observe a higher response
value,
while a negative NNT occurs when GenOR<1 and corresponds
to the number needed to treat in the higher group
level to observe a lower response
value.
If the confidence interval for GenOR straddles 1,
the confidence interval for NNT is given as the union of disjoint
intervals.
ties
changes how ties are treated. If "split"
is provided,
then ties are equally split between favoring both groups
(following the approach set out by O'Brien et. al. (2006)).
If "drop"
is provided, then ties are ignored
(following the approach set out by Agresti (1980)).
By default, "split"
is used.
If strata
is specified, generalized odds ratios are calculated
separately for each individual strata. If in-stratum odds ratios are not
significantly different from each other (with significance level alpha
),
these odds are pooled to obtain a global odds ratio which is adjusted
for strata. If in-stratum odds ratios are significantly different, a matrix containing
the relative risk ratios between stratum is printed, along with Z-scores
corresponding to the significance of these differences.
If verbose=TRUE
is supplied, both pooled odds and relative risk ratios
are printed regardless of if the between-stratum odds ratios are
significantly different.
Options verbose
, nnt
and upper
may be re-specified when using print method.
A list with class "Genodds
" containing the following:
The pooled log(odds).
(1-alpha
)% Confidence intervals for pooled log(odds).
Standard error of pooled log(odds).
Standard error of pooled log(odds) under the null hypothesis.
The p-value of the test of pooled log(odds) = 1.
Statistic of test that strata odds are equal.
p-value for test that strata odds are equal.
A matrix giving the log of the ratio of odds between strata (generalized relative risk ratio).
A matrix containing the standard error of the log(relative risk ratio).
A list containing a summary of each strata measure.
A list containing parameters used in the test.
Agresti, A. (1980). Generalized odds ratios for ordinal data. Biometrics, 59-67.
O'Brien, R. G., & Castelloe, J. (2006, March). Exploiting the link between the Wilcoxon-Mann-Whitney test and a simple odds statistic. In Thirty-first Annual SAS Users Group International Conference.
Churilov, L., Arnup, S., Johns, H., Leung, T., Roberts, S., Campbell, B. C., Davis, S. M. & Donnan, G. A. (2014). An improved method for simple, assumption-free ordinal analysis of the modified Rankin Scale using generalized odds ratios. International Journal of Stroke, 9(8), 999-1005.
# Use the alteplase dataset provided by package and calculate genodds df <- alteplase x <- genodds(df$mRS,df$treat,df$time) x print(x,nnt=TRUE)