Factor

open class Factor(name: String, values: DoubleArray = doubleArrayOf(-1.0, 1.0)) : Identity

This class represents an individual factor within a factorial design. The name of the factor must be provided and will be required to be unique when placed within a design. The supplied values of the levels must be strictly increasing. That is, they must be unique and increasing in value.

Parameters

values

the value for each level as an array. There must be 2 or more values supplied.

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, values: List<Double>)
constructor(name: String, values: IntProgression)
constructor(name: String, low: Double, high: Double)

Creates a two level factor with provided low and high values.

constructor(name: String, values: DoubleArray = doubleArrayOf(-1.0, 1.0))

Properties

Link copied to clipboard

The levels as coded values.

Link copied to clipboard

The half-range of the levels.

Link copied to clipboard
override val id: Int
Link copied to clipboard
Link copied to clipboard
open override var label: String?
Link copied to clipboard

The levels as a list

Link copied to clipboard

The mid-point of the levels.

Link copied to clipboard
override val name: String

Functions

Link copied to clipboard

The coded levels as an array.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isInRange(value: Double): Boolean

True if the value is within the range limits of the factor

Link copied to clipboard

The levels as an array.

Link copied to clipboard
fun toCodedValue(rawValue: Double): Double

Converts the original raw value to the coded measurement scale. This conversion does not check if the raw value is within the range limits of the factor.

Link copied to clipboard
fun toOriginalValue(codedValue: Double): Double

Converts the coded value to the original measurement scale

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