The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Using {ordinalsimr}

library(ordinalsimr)

Shiny App

The {ordinalsimr} package wraps a Shiny application and supporting functions for running simulation studies on several pre-selected statistical tests applicable to ordinal data. The Shiny app is particularly suited for calculating Power and Type II error for a proposed 2-group comparison of an ordinal endpoint. Available parameters to manipulate before running the tests include:

In addition to these parameters for running the simulation, the following can be adjusted in the Distributions page

Bug reports and feature requests can be submitted as issues at https://github.com/NeuroShepherd/ordinalsimr/issues

Using Downloaded Data

Data downloaded after running a simulation is stored as a .rds file, and can be loaded into your R session using readRDS(). The data is structured as a named list with 3 elements at the top level, and several sub-elements. A summary of the available information is available in the code below.

output <- readRDS("data-2025-01-19-d8621b-1.rds")
output$comparison_data$distribution_statistics
#> # A tibble: 36 × 10
#> # Groups:   Sample Size [6]
#>    `Sample Size` test   lower_power_bound upper_power_bound power `Power 95% CI`
#>            <int> <chr>              <dbl>             <dbl> <dbl> <chr>         
#>  1            30 Wilco…             0.452             0.736  0.6  [0.452, 0.736]
#>  2            30 Fisher             0.337             0.626  0.48 [0.337, 0.626]
#>  3            30 Chi S…             0.374             0.663  0.52 [0.374, 0.663]
#>  4            30 Chi S…             0.374             0.663  0.52 [0.374, 0.663]
#>  5            30 Prop.…             0.472             0.753  0.62 [0.472, 0.753]
#>  6            30 Coin …             0.472             0.753  0.62 [0.472, 0.753]
#>  7            31 Wilco…             0.512             0.788  0.66 [0.512, 0.788]
#>  8            31 Fisher             0.337             0.626  0.48 [0.337, 0.626]
#>  9            31 Chi S…             0.374             0.663  0.52 [0.374, 0.663]
#> 10            31 Chi S…             0.374             0.663  0.52 [0.374, 0.663]
#> # ℹ 26 more rows
#> # ℹ 4 more variables: lower_t2error_bound <dbl>, upper_t2error_bound <dbl>,
#> #   t2_error <dbl>, `TII Error 95% CI` <chr>
str(output, max.level = 2)
#> List of 3
#>  $ comparison_data:List of 3
#>   ..$ run_info               : tibble [300 × 13] (S3: tbl_df/tbl/data.frame)
#>   ..$ distribution_statistics: gropd_df [36 × 10] (S3: grouped_df/tbl_df/tbl/data.frame)
#>   .. ..- attr(*, "groups")= tibble [6 × 2] (S3: tbl_df/tbl/data.frame)
#>   .. .. ..- attr(*, ".drop")= logi TRUE
#>   ..$ distribution_plot      :List of 11
#>   .. ..- attr(*, "class")= chr [1:2] "gg" "ggplot"
#>  $ group1_data    :List of 2
#>   ..$ run_info      : tibble [300 × 13] (S3: tbl_df/tbl/data.frame)
#>   ..$ group1_t1error: gropd_df [36 × 6] (S3: grouped_df/tbl_df/tbl/data.frame)
#>   .. ..- attr(*, "groups")= tibble [6 × 2] (S3: tbl_df/tbl/data.frame)
#>   .. .. ..- attr(*, ".drop")= logi TRUE
#>  $ group2_data    :List of 2
#>   ..$ run_info      : tibble [300 × 13] (S3: tbl_df/tbl/data.frame)
#>   ..$ group2_t1error: gropd_df [36 × 6] (S3: grouped_df/tbl_df/tbl/data.frame)
#>   .. ..- attr(*, "groups")= tibble [6 × 2] (S3: tbl_df/tbl/data.frame)
#>   .. .. ..- attr(*, ".drop")= logi TRUE

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.