View source: R/stratWO_data_frame.R
stratWO.data.frame | R Documentation |
Stratified win odds with adjustment
## S3 method for class 'data.frame'
stratWO(
x,
AVAL,
TRTP,
STRATA,
ref,
COVAR = NULL,
alpha = 0.05,
WOnull = 1,
...
)
x |
a data frame containing subject-level data. |
AVAL |
variable in the data with ordinal analysis values. |
TRTP |
the treatment variable in the data. |
STRATA |
a character variable for stratification. |
ref |
the reference treatment group. |
COVAR |
a numeric covariate. |
alpha |
the reference treatment group. |
WOnull |
the null hypothesis. The default is 1. |
... |
additional parameters. |
a data frame containing the following columns:
WO stratified (or adjusted/stratified) win odds.
LCL lower confidence limit for adjusted (or adjusted/stratified) WO.
UCL upper confidence limit for adjusted (or adjusted/stratified) WO.
SE standard error of the adjusted (or adjusted/stratified) win odds.
WOnull win odds of the null hypothesis (specified in the WOnull
argument).
alpha two-sided significance level for calculating the confidence interval (specified in the alpha
argument).
Pvalue p-value associated with testing the null hypothesis.
WP adjusted (or adjusted/stratified) win probability.
SE_WP standard error for the adjusted (or adjusted/stratified) win probability.
SD_WP standard deviation of the adjusted (or adjusted/stratified) win probability.
N total number of patients in the analysis.
Type "STRATIFIED" or "STRATIFIED/ADJUSTED" depending on whether COVAR
is specified.
Gasparyan SB et al. (2021) "Adjusted win ratio with stratification: calculation methods and interpretation." Statistical Methods in Medical Research 30.2: 580-611. doi:10.1177/0962280220942558.
stratWO()
.
# Stratified win odds
res <- stratWO(x = KHCE, AVAL = "AVAL", TRTP = "TRTP",
STRATA = "STRATAN", ref = "P")
res
## Compare with the win odds in each stratum separately
lapply(split(KHCE, KHCE$STRATAN), calcWO, AVAL = "AVAL", TRTP = "TRTP", ref = "P")
# Stratified and adjusted win odds
res <- stratWO(x = KHCE, AVAL = "AVAL", COVAR = "EGFRBL",
TRTP = "TRTP", STRATA = "STRATAN", ref = "P")
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.