---
output: html_fragment
---

# {ordinalsimr} Shiny Application

The {ordinalsimr} package is intended to assist applied statisticians with running simulation studies on ordinal data. This Shiny application provides a point-and-click approach to setting simulation parameters including setting the number of iterations, the total sample size, the group size ratio between group 1 and group 2, and the distribution probabilities of the ordinal endpoint for each group. 

## Help Files



Three vignettes are included with this package:

1. `ordinalsimr-options`: options available in the `ordinalsimr` package. This vignette is intended for those who wish to change the default settings of the Shiny app.
2. `coding-simulations`: how to code your own simulation studies using the `ordinalsimr` package, particularly for simulation scenarios that are not supported by the Shiny app.
3. `ordinalsimr`: overview of the `ordinalsimr` package itself, including the included tests and the Shiny app. It also provides some details on how to interact with objects downloaded from the Shiny application.

The package vignettes can be accessed using the following code:

```{r, eval=FALSE}
vignette("ordinalsimr-options", package = "ordinalsimr")
vignette("coding-simulations", package = "ordinalsimr")
vignette("ordinalsimr", package = "ordinalsimr")
```


## Included Tests

* Wilcoxon Test: `stats::wilcox.test()`
* Fisher Test: `stats::fisher.test(simulate.p.value = TRUE)`
* Chi-Squared without Continuity Correction: `stats::chisq.test(correct = FALSE)`
* Chi-Squared with Continuity Correction: `stats::chisq.test(correct = TRUE)`
* Proportional Odds model: `rms::lrm()`
* Independence Test: `coin::independence_test(ytrafo = coin::rank_trafo)`

## Pages

### Simulation

This page is for parameter entries, and includes a "Run Test" button to press once all parameters have been determined. Processing is completed when the p-value tables at the bottom of the page appear.

### Distributions

Results of a simulation run can be seen here included a visualization of the p-value densities by test as well as Power, Type II error, Type I error, and associated confidence intervals for these values. The CI percentiles can be adjusted as well as the nominal significance level \alpha.

### Report & Downloads

The metadata, data, and results of the simulation can be downloaded here. The metadata includes the parameters used in the simulation, the data includes the simulated data, and the results include the p-values and test statistics for each iteration.

**Experimental feature: a report can be generated in PDF format. This feature is still in development.**






