Variable

scalation.modeling.Variable
See theVariable companion class
object Variable

The Variable companion object provides utilities for variables.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Variable.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def dummyVar(tt: Int, shf: Int, tmx: Int): VectorD

Assign values for dummy variables based on a single categorical/treatment value tt.

Assign values for dummy variables based on a single categorical/treatment value tt.

Value parameters

sht

the amount to shift the value

tmx

the maximum categorical/treatment after shifting

tt

the categorical/treatment value

Attributes

Assign values for the dummy variables based on the categorical/treatment vector 'tt'. A single categorical variable 'tt' with values 'ttmin' to 'ttmax' will be (1) shifted to the range 0 to 'tmax' and then replace by 'tmax' dummy variables/columns as follows: 0 => 0, 0, 0 OR 1, 1, 1 1 => 1, 0, 0 OR 2, 1, 1 2 => 0, 1, 0 OR 1, 2, 1 3 => 0, 0, 1 OR 1, 1, 2 Using (0, 1) for (VAL0, VAL1) is conventional, but using (1, 2) reduces collinearity, for example in QuadRegression. Note: one-hot encoding using 3 dummy variable leads to singular matrices.

Assign values for the dummy variables based on the categorical/treatment vector 'tt'. A single categorical variable 'tt' with values 'ttmin' to 'ttmax' will be (1) shifted to the range 0 to 'tmax' and then replace by 'tmax' dummy variables/columns as follows: 0 => 0, 0, 0 OR 1, 1, 1 1 => 1, 0, 0 OR 2, 1, 1 2 => 0, 1, 0 OR 1, 2, 1 3 => 0, 0, 1 OR 1, 1, 2 Using (0, 1) for (VAL0, VAL1) is conventional, but using (1, 2) reduces collinearity, for example in QuadRegression. Note: one-hot encoding using 3 dummy variable leads to singular matrices.

Value parameters

tt

the categorical/treatment vector

Attributes

def get_shift_tmax: (Int, Int)

Return the shift in categorical/treatment variable to make it start at zero as well as the maximum value after shifting. Must call 'dummyVars' first

Return the shift in categorical/treatment variable to make it start at zero as well as the maximum value after shifting. Must call 'dummyVars' first

Attributes

Concrete fields

val VAL0: Double
val VAL1: Double