Learn R Programming

spartan (version 3.0.2)

aa_getATestResults: Calculates the A-Test scores observed for all sets, for each sample size

Description

Examines the summary CSV file produced either by the method aa_summariseReplicateRuns or provided by the user, analysing each sample size independently, to determine how 'different' the results of each of the subsets are. For each sampple size, the distribution of responses for each subset are compared with the first subset using the Vargha-Delaney A-Test. These scores are stored in a CSV file, with filename as stated in parameter ATESTRESULTSFILENAME. The A-Test results for a sample size are then graphed, showing how different each of the subsets are. If doing this analysis over multiple timepoints, the timepoint will be appended to the filename given in ATESTRESULTSFILENAME and appended to the name of the graph.

Usage

aa_getATestResults(FILEPATH, SAMPLESIZES, NUMSUBSETSPERSAMPLESIZE,
  MEASURES, ATESTRESULTSFILENAME, LARGEDIFFINDICATOR,
  AA_SIM_RESULTS_FILE = NULL, AA_SIM_RESULTS_OBJECT = NULL,
  TIMEPOINTS = NULL, TIMEPOINTSCALE = NULL, GRAPHNAME = NULL,
  check_done = FALSE)

Arguments

FILEPATH

Directory where the results of the simulation runs, in folders or in single CSV file format, can be found

SAMPLESIZES

The sample sizes chosen (i.e. in our case, this would be an array containing 1,5,50,100,300,800

NUMSUBSETSPERSAMPLESIZE

The number of subsets for each sample size (i.e in the tutorial case, 20)

MEASURES

An array containing the names of the simulation output measures to be analysed.

ATESTRESULTSFILENAME

Name of the file that will contain the A-Test scores for each sample size

LARGEDIFFINDICATOR

The A-Test determines there is a large difference between two sets if the result is greater than 0.2 either side of the 0.5 line. Should this not be suitable, this can be changed here

AA_SIM_RESULTS_FILE

The name of the CSV file containing the simulation responses, if reading from a CSV file

AA_SIM_RESULTS_OBJECT

The name of the R object containing the simulation responses, if not reading from a CSV file

TIMEPOINTS

Implemented so this method can be used when analysing multiple simulation timepoints. If only analysing one timepoint, this should be set to NULL. If not, this should be an array of timepoints, e.g. c(12,36,48,60)

TIMEPOINTSCALE

Implemented so this method can be used when analysing multiple simulation timepoints. Sets the scale of the timepoints being analysed, e.g. "Hours"

GRAPHNAME

Used internally by the getATestResults method when producing graphs for multiple timepoints. Should not be set in function call.

check_done

If multiple timepoints, has the input been checked