run_algos: Run Multiple Algorithms

Description Usage Arguments Value Methods (by class) Examples

View source: R/stats.R

Description

Run a multiple number of mdsstat algorithms on a single input dataset.

Usage

1
2
3
4
5
6
7
run_algos(data, algos, dataframe = T, non_dpa = "skip", ...)

## S3 method for class 'list'
run_algos(data, algos, dataframe = T, non_dpa = "skip", ...)

## Default S3 method:
run_algos(data, algos, dataframe = T, non_dpa = "skip", ...)

Arguments

data

Required input dataset. Note that the dataset must satisfy the dataset requirements for each algorithm specified (parameter df). An mds times series object (class mds_ts) is a natural fit.

algos

Input list of algorithms to run. Must be a list generated by define_algos.

dataframe

Logical on whether to output results as a mdsstat_tests data frame. If FALSE, will output as a list of mdsstat_test lists.

Default: TRUE

non_dpa

What to do when input data is not prepared for disproportionality analysis (DPA) data. Three values are accepted: "skip", "warn", and "stop". "skip" skips the DPA test without warnings or errors. "warn" outputs a warning and then skips the DPA test. "stop" stops the function call.

Default: "skip"

...

Further arguments for future work.

Value

A mdsstat_tests data frame or list of mdsstat_test lists with the results of the algorithm runs.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
9
data <- mds_ts[[1]]
data$rate <- data$nA / data$exposure
x <- list(prr=list(),
  xbar=list(),
  xbar=list(ts_event=c(Rate="rate"), we_rule=2),
  poisson_rare=list(p_rate=0.3))
algos <- define_algos(x)
run_algos(data, algos)
run_algos(data, algos, FALSE)

mdsstat documentation built on March 13, 2020, 2:58 a.m.