stratWO.data.frame {hce}R Documentation

Stratified win odds with adjustment

Description

Stratified win odds with adjustment

Usage

## S3 method for class 'data.frame'
stratWO(
  x,
  AVAL,
  TRTP,
  STRATA,
  ref,
  COVAR = NULL,
  alpha = 0.05,
  WOnull = 1,
  ...
)

Arguments

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.

Value

a data frame containing the following columns:

References

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.

See Also

stratWO().

Examples

# 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

[Package hce version 0.6.0 Index]