Description Usage Arguments Value References Examples

This function minimizes the sample size for a given power and type-I error rate with respect to the allocation rate t = n_1/N.

1 2 | ```
WMWssp_minimize(x, y, alpha = 0.05, power = 0.8, simulation = FALSE,
nsim = 10^4)
``` |

`x` |
a vector of prior information for the first group |

`y` |
a vector of prior information for the second group |

`alpha` |
Type I error rate |

`power` |
Power to detect a relative effect based on the prior information |

`simulation` |
TRUE if a power simulation should be carried out |

`nsim` |
number of simulations for the power simulation |

Returns an object from class WMWssp containing

`result` |
A dataframe with the results. |

`t` |
The optimal allocation rate for minimizing the sample size. |

`alpha` |
The type-I error rate which was used. |

`power` |
The power which was used. |

`N` |
The minimized sample size. |

Brunner, E., Bathke A. C. and Konietschke, F. Rank- and Pseudo-Rank Procedures in Factorial Designs - Using R and SAS. Springer Verlag. to appear.

Happ, M., Bathke, A. C., & Brunner, E. (2019). Optimal Sample Size Planning for the Wilcoxon-Mann-Whitney-Test. Statistics in medicine, 38(3), 363-375.

1 2 3 4 5 6 7 8 | ```
# Prior information for the reference group
x <- c(315,375,356,374,412,418,445,403,431,410,391,475,379)
# generate data for treatment group based on a shift effect
y <- x - 20
# calculate optimal t
ssp <- WMWssp_minimize(x, y, alpha = 0.05, power = 0.8)
summary(ssp)
``` |

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.