Returns the paths to all available toy examples, or to a specific toy example. Load via readRDS().

toy_example(name = NULL)

Arguments

name

Name of the example, default: return all

Value

A named vector of file system paths.

Examples

toy_example()
#>                                                             Conflict 
#>         "/home/runner/work/_temp/Library/mlfit/extdata/Conflict.rds" 
#>                                                        Joint-Grouped 
#>    "/home/runner/work/_temp/Library/mlfit/extdata/Joint-Grouped.rds" 
#>                                                                Joint 
#>            "/home/runner/work/_temp/Library/mlfit/extdata/Joint.rds" 
#>                                                     Separate-Grouped 
#> "/home/runner/work/_temp/Library/mlfit/extdata/Separate-Grouped.rds" 
#>                                                             Separate 
#>         "/home/runner/work/_temp/Library/mlfit/extdata/Separate.rds" 
#>                                                               Single 
#>           "/home/runner/work/_temp/Library/mlfit/extdata/Single.rds" 
#>                                                                 Tiny 
#>             "/home/runner/work/_temp/Library/mlfit/extdata/Tiny.rds" 
#>                                                             dummytoy 
#>         "/home/runner/work/_temp/Library/mlfit/extdata/dummytoy.rds" 
#>                                                                 flat 
#>             "/home/runner/work/_temp/Library/mlfit/extdata/flat.rds" 
#>                                                          minitoy-1x3 
#>      "/home/runner/work/_temp/Library/mlfit/extdata/minitoy-1x3.rds" 
#>                                                          minitoy-2x2 
#>      "/home/runner/work/_temp/Library/mlfit/extdata/minitoy-2x2.rds" 
#>                                                          minitoy-2x3 
#>      "/home/runner/work/_temp/Library/mlfit/extdata/minitoy-2x3.rds" 
#>                                                               onetoy 
#>           "/home/runner/work/_temp/Library/mlfit/extdata/onetoy.rds" 

# Load example with results from Ye et al. (2009)
readRDS(toy_example("Tiny"))
#> An object of class ml_problem
#>   Reference sample: 23 observations
#>   Control totals: 1 at individual, and 1 at group level
#>   Results for algorithms: entropy_o(1,0), entropy_o(0,1), entropy_o(1,1), entropy, ml_ipf, ipu