MultipleComparisonAnalyzer

class MultipleComparisonAnalyzer(dataMap: Map<String, DoubleArray>, responseName: String? = null) : IdentityIfc

Holds data to perform multiple comparisons Performs pairwise comparisons and computes pairwise differences and variances.

The user must supply the data samples over which the comparison will be made. This is supplied in a Map with key representing a name (identifier) for the data and an array representing the observations. This class computes all the pairwise differences and the variances of the differences in the form of tabulated statistics.

Parameters

dataMap

the map holding the data

responseName

the name of the response that is being analyzed

Constructors

Link copied to clipboard
constructor(dataMap: Map<String, DoubleArray>, responseName: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A 2-Dim array of the data each row represents the across replication average for each configuration (column)

Link copied to clipboard

Computes the difference between each dataset average and the maximum of the rest of the averages for each dataset. If d[] represents the differences then d0 is the difference between the first dataset average and the maximum over the averages of the other datasets and so on.

Link copied to clipboard

Computes the difference between each dataset average and the minimum of the rest of the averages for each dataset. If d[] represents the differences then d0 is the difference between the first dataset average and the minimum over the averages of the other datasets and so on

Link copied to clipboard

An array of all the averages of the data Each element is the average for each of the n data names

Link copied to clipboard

Suppose there are n data names. Then there are n(n-1)/2 pairwise differences. This method returns averages of the differences in an array. The elements of the array have correspondence to the array of strings returned by getNamesOfPairedDifferences()

Link copied to clipboard

The names of items being compared as an array of strings

Link copied to clipboard

The default indifference zone parameter must be greater than or equal to zero

Link copied to clipboard

The default level to use for confidence intervals and for probability of correct selection.

Link copied to clipboard
open override val id: Int
Link copied to clipboard

The index of the maximum average

Link copied to clipboard

Suppose there are n data names. Then there are n(n-1)/2 pairwise differences. This method returns the index of the maximum of the array given by getAveragesOfDifferences()

Link copied to clipboard

The index of the minimum of the average of all the data

Link copied to clipboard

The actual minimum average of the differences

Link copied to clipboard
open override var label: String?
Link copied to clipboard

The maximum of the average of all the data

Link copied to clipboard

The actual maximum average of the differences

Link copied to clipboard

The maximum variance of the differences

Link copied to clipboard

Forms all MCB intervals for the maximum given the default indifference zone

Link copied to clipboard

The MCB maximum intervals in the form of a map. The key names are the names of the data sets with indifference delta based on the default

Link copied to clipboard

Returns a StringBuilder representation of the MCB maximum intervals based on default indifference zone setting

Link copied to clipboard

Forms all MCB intervals for the minimum given the default indifference zone

Link copied to clipboard

The MCB minimum intervals in the form of a map. The key names are the names of the data sets with the default indifference zone

Link copied to clipboard

Returns a StringBuilder representation of the MCB minimum intervals

Link copied to clipboard

The minimum of the average of all the data

Link copied to clipboard

Returns the minimum value of the average of the differences

Link copied to clipboard
open override val name: String
Link copied to clipboard

The name of the maximum average

Link copied to clipboard

The name of the maximum average difference

Link copied to clipboard

The name of the minimum of the average of all the data

Link copied to clipboard

The name of the minimum average difference

Link copied to clipboard

Each paired difference is labeled with data name i - data name j for all i, j The returns the names as an array of strings

Link copied to clipboard

The number of data sets stored in the analyzer. There is a data set stored for each name.

Link copied to clipboard

A list holding the statistics for all the pairwise differences is returned

Link copied to clipboard

A list of statistics for all the data

Link copied to clipboard

An array of all the variances of the data

Link copied to clipboard

Suppose there are n data names. Then there are n(n-1)/2 pairwise differences. This method returns variances of the differences in an array. The elements of the array have correspondence to the array of strings returned by getNamesOfPairedDifferences()

Functions

Link copied to clipboard

Sets the underlying data map. Any data already in the analyzer will be replaced. The supplied dataMap must not be null. There needs to be at least 2 data arrays The length of each data array must be the same.

Link copied to clipboard
fun average(name: String): Double

The average for the named data or Double.NaN if the name is not in the collector

Link copied to clipboard

The average for the pair of data names given by the strings. If the data names don't exist or the difference "$s1 - $s2" does not exist, an exception will be thrown.

Link copied to clipboard
fun confidenceIntervalsOfData(level: Double = defaultLevel): List<Interval>

A list of confidence intervals for the data based on the supplied confidence level

Link copied to clipboard

Suppose there are n data names. Then there are n(n-1)/2 pairwise differences. This method returns a list of confidence intervals of the differences in an array. The elements of the array have correspondence to the array of strings returned by getNamesOfPairedDifferences()

Link copied to clipboard
fun confidenceIntervalsOnData(level: Double = defaultLevel): StringBuilder

A StringBuilder representation for the confidence intervals on the datasets at the provided level

Link copied to clipboard

A StringBuilder representation for the confidence intervals on the differences for the datasets at the provided level

Link copied to clipboard
operator fun contains(dataName: String): Boolean

Returns true if the analyzer has data for the name

Link copied to clipboard
fun data(name: String): DoubleArray

The data associated with the name. If the name is not in the map, the array will be empty

Link copied to clipboard

Gets the difference between the system average associated with the index and maximum of the rest of the averages

Gets the difference between the system average associated with the name and maximum of the rest of the averages

Link copied to clipboard

Gets the difference between the system average associated with the index and minimum of the rest of the averages

Gets the difference between the system average associated with the name and minimum of the rest of the averages

Link copied to clipboard

A StringBuilder representation for a summary report on the pairwise differences

Link copied to clipboard
fun halfWidthDifferenceSummaryStatistics(title: String? = null, level: Double = defaultLevel): StringBuilder

A StringBuilder representation for a half-width report on the pairwise differences

Link copied to clipboard
fun halfWidthSummaryStatistics(title: String? = null, level: Double = defaultLevel): StringBuilder

A half-width summary report on the statistics for each data set

Link copied to clipboard
fun indexOfName(name: String): Int

Returns the index associated with the data set name The supplied name must be contained in the analyzer. Use contains() to check.

Link copied to clipboard
fun maxScreeningIntervals(probCS: Double = defaultLevel): Map<String, Map<String, Interval>>

Returns the screening intervals for each alternative assuming bigger is better. Returns a map of maps. The keys for the maps are the names of the alternatives (in combination). The interval represents the screening interval for the case of bigger being better. The intervals are one-sided lower bound, positive infinity and can be checked to determine if the alternative should be retained after screening.

Link copied to clipboard
fun mcbIntervalData(delta: Double = defaultIndifferenceZone, probCS: Double = defaultLevel, context: String? = this.name, subject: String? = null): List<MCBIntervalData>

Captures the MCB interval data to MCBIntervalData instances

Link copied to clipboard
fun mcbMaxInterval(index: Int, delta: Double = defaultIndifferenceZone): Interval

Form the maximum comparison with the best (MCB) interval for the dataset at the supplied index using the supplied indifference delta.

Link copied to clipboard
fun mcbMaxIntervals(delta: Double = defaultIndifferenceZone): List<Interval>

Forms all MCB intervals for the maximum given the supplied delta

Link copied to clipboard
fun mcbMaxIntervalsAsMap(delta: Double = defaultIndifferenceZone): Map<String, Interval>

The MCB maximum intervals in the form of a map. The key names are the names of the data sets

Link copied to clipboard
fun mcbMaxIntervalsAsSB(delta: Double = defaultIndifferenceZone): StringBuilder

Returns a StringBuilder representation of the MCB maximum intervals

Link copied to clipboard
fun mcbMinInterval(index: Int, delta: Double = defaultIndifferenceZone): Interval

Form the maximum comparison with the best (MCB) interval for the dataset at the supplied index using the supplied indifference delta.

Link copied to clipboard
fun mcbMinIntervals(delta: Double = defaultIndifferenceZone): List<Interval>

Forms all MCB intervals for the minimum given the default indifference zone

Link copied to clipboard
fun mcbMinIntervalsAsMap(delta: Double = defaultIndifferenceZone): Map<String, Interval>

The MCB minimum intervals in the form of a map. The key names are the names of the data sets

Link copied to clipboard
fun mcbMinIntervalsAsSB(delta: Double = defaultIndifferenceZone): StringBuilder

Returns a StringBuilder representation of the MCB minimum intervals

Link copied to clipboard
fun mcbResultData(context: String? = this.name, subject: String? = null): List<MCBResultData>

Constructs an instance of MCBResultData to capture the performance results from the MCB analysis.

Link copied to clipboard
fun mcbScreeningIntervalData(probCS: Double = defaultLevel, context: String? = this.name, subject: String? = null): List<MCBScreeningIntervalData>

Captures the MCB screening interval data to MCBIntervalData instances

Link copied to clipboard
fun minScreeningIntervals(probCS: Double = defaultLevel): Map<String, Map<String, Interval>>

Returns the screening intervals for each alternative assuming smaller is better. Returns a map of maps. The keys for the maps are the names of the alternatives (in combination). The interval represents the screening interval for the case of smaller being better. The intervals are one-sided negative infinity, upper limit and can be checked to determine if the alternative should be retained after screening.

Link copied to clipboard
fun observationData(tableName: String = "tblObservations", context: String? = name, subject: String? = null): List<ObservationDataDb>

Returns the raw observations as a list of observation data for possible saving in a database.

Link copied to clipboard

The paired differences as an array for the pair of data names given by the strings. If the data names don't exist then an error occurs. The paired difference is assumed to be named "$s1 - $s2$". If the named difference is not found an empty array is returned.

Link copied to clipboard

The statistics for the pair of data names given by the strings. If the data names don't exist then an exception will occur. The name of the statistic is formed as "$s1 - $s2". If that difference does not exist, then null is returned.

Link copied to clipboard
fun print()
Link copied to clipboard
fun resultsAsDatabase(dbName: String, dir: Path = KSL.dbDir, deleteIfExists: Boolean = true, confidenceLevel: Double = defaultLevel, delta: Double = defaultIndifferenceZone, probCS: Double = defaultLevel, context: String? = this.name, subject: String? = null): DatabaseIfc

Returns the results as a database holding MCBResultData, MCBIntervalData, MCBScreeningIntervalData, StatisticDataDb, and ObservationDataDb tables (tblMCBResults, tblStatistic, tblMCBIntervals,tblMCBScreeningIntervals, tblObservations).

Link copied to clipboard
fun screenForMaximum(probCS: Double = defaultLevel): Set<String>

Screens for the maximum from the set of alternatives using the specified probability of correct selection probCS. Returns the set of alternatives that could be the maximum with the specified probability of correct selection.

Link copied to clipboard
fun screenForMinimum(probCS: Double = defaultLevel): Set<String>

Screens for the minimum from the set of alternatives using the specified probability of correct selection probCS. Returns the set of alternatives that could be the minimum with the specified probability of correct selection.

Link copied to clipboard
fun secondStageSampleSizeNM(indifference: Double, probCS: Double = defaultLevel): Int

As per Nelson and Matejcik (1995) computes the second stage sample size based on the input parameters using the maximum variance of the differences. Assumes that the supplied arrays are the initial samples and specify the number of samples.

Link copied to clipboard

Get statistics on the data associated with the name. If the name is not in the analyzer, then an empty Statistic is returned

Link copied to clipboard
fun statisticData(level: Double = 0.95, context: String? = this.name, subject: String? = null, tableName: String = "tblStatistic"): List<StatisticDataDb>

Captures the statistics computed on the raw data and the differences

Link copied to clipboard

The standard error for the pair of data names given by the strings. If the data names don't exist or the difference "$s1 - $s2" or "$s2 - $s1" does not exist then an exception will occur. The standard error of the differences are symmetric. That is standard error of "$s1 - $s2" is equal to the standard error of "$s2 - $s1".

Link copied to clipboard

Returns a StringBuilder representation of the statistics associated for each data set

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun variance(name: String): Double

The variance for the named data or Double.NaN if the name is not in the collector

Link copied to clipboard

The variance for the pair of data names given by the strings. If the data names don't exist or the difference "$s1 - $s2" or "$s2 - $s1" does not exist then an exception will occur. The variance of the differences are symmetric. That is variance of "$s1 - $s2" is equal to the variance of "$s2 - $s1".

Link copied to clipboard

Write the data as a csv file

Link copied to clipboard

Write a statistical summary of the difference data in the analyzer

Link copied to clipboard

Write a statistical summary of the data in the analyzer