View source: R/regWO_data_frame.R

regWO.data.frame | R Documentation |

Win odds regression using a data frame

```
## S3 method for class 'data.frame'
regWO(x, AVAL, TRTP, COVAR, ref, 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. |

`COVAR` |
a numeric covariate. |

`ref` |
the reference treatment group. |

`alpha` |
significance level. The default is 0.05. |

`WOnull` |
the null hypothesis. The default is 1. |

`...` |
additional parameters. |

a data frame containing the win odds and its confidence interval.

WO_beta adjusted win odds.

LCL lower confidence limit for adjusted WO.

UCL upper confidence limit for adjusted WO.

SE standard error of the adjusted 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.

N total number of patients in the analysis.

beta adjusted win probability.

SE_beta standard error for the adjusted win probability.

SD_beta standard deviation for the adjusted win probability.

WP (non-adjusted) win probability.

SE_WP standard error of the non-adjusted win probability.

SD_WP standard deviation of the non-adjusted win probability.

WO non-adjusted win odds.

COVAR_MEAN_DIFF mean difference between two treatment groups of the numeric covariate.

COVAR_VAR sum of variances of two treatment groups of the numeric covariate.

COVAR_COV covariance between the response and the numeric covariate.

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.

`regWO()`

.

```
# A baseline covariate that is highly correlated with the outcome
set.seed(2023)
dat <- COVID19
n <- nrow(dat)
dat$Severity <- ifelse(dat$GROUP > 4, rnorm(n, 0), rnorm(n, 100))
tapply(dat$Severity, dat$TRTP, mean)
regWO(x = dat, AVAL = "GROUP", TRTP = "TRTP", COVAR = "Severity", ref = "Placebo")
# Without adjustment
calcWO(x = dat, AVAL = "GROUP", TRTP = "TRTP", ref = "Placebo")
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.