powered by
Calculates the probability of winning (winP). In the referenced article Zou et al (2022) proposes a method for calculating probability of winning with a confidence interval an p-value testing.
win_prob( data, response = NULL, group = NULL, alpha = 0.05, beta = 0.2, group.ratio = 1, sample.size = FALSE, print.tables = FALSE, dec = 3 )
A list containing the win_prob statistics.
A data frame containing the response and group variable.
The name of the response variable. Takes first column if empty.
The name of the group variable. Takes second column if empty.
The alpha level for the hypothesis test. Default is 0.05.
The beta level for the sample size calculation. Default is 0.2.
The ratio of group sizes. Default is 1.
Flag to include sample size calculation. Default is FALSE.
Flag to print cumulative tables. Default is FALSE.
Numeric for decimals to print. Default is 3.
win_prob(data=stRoke::talos,response="mrs_6",group="rtreat")
Run the code above in your browser using DataLab