win_prob {stRoke}R Documentation

Calculates the probability of winning

Description

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.

Usage

win_prob(
  data,
  response = NULL,
  group = NULL,
  alpha = 0.05,
  beta = 0.2,
  group.ratio = 1,
  sample.size = FALSE,
  print.tables = FALSE,
  dec = 3
)

Arguments

data

A data frame containing the response and group variable.

response

The name of the response variable. Takes first column if empty.

group

The name of the group variable. Takes second column if empty.

alpha

The alpha level for the hypothesis test. Default is 0.05.

beta

The beta level for the sample size calculation. Default is 0.2.

group.ratio

The ratio of group sizes. Default is 1.

sample.size

Flag to include sample size calculation. Default is FALSE.

print.tables

Flag to print cumulative tables. Default is FALSE.

dec

Numeric for decimals to print. Default is 3.

Value

A list containing the win_prob statistics.

Source

doi:10.1161/STROKEAHA.121.037744

Examples

win_prob(data=stRoke::talos,response="mrs_6",group="rtreat")

[Package stRoke version 23.9.1 Index]