Package microsim.statistics.regression
Class OrderedRegression<E1 extends Enum<E1> & IntegerValuedEnum>
java.lang.Object
microsim.statistics.regression.OrderedRegression<E1>
- Type Parameters:
E1- event type.
- All Implemented Interfaces:
IDiscreteChoiceModel
public class OrderedRegression<E1 extends Enum<E1> & IntegerValuedEnum>
extends Object
implements IDiscreteChoiceModel
Ordered Discrete Variable Models.
Let y define a discrete valued set {y_0,y_1,..., y_n}.
Each y_i is an indicator variable for discrete value i,
where higher values of i reflect some natural ordering of the set.
ystar = Xb + e
y_j = 1 if cut_j-1 < ystar <= cut_j and 0 otherwise.
P(y_j=1|X) = P(cut_j-1<ystar).P(ystar<=cut_j) = (1 - P(ystar<=cut_j-1)).P(ystar<=cut_j)
= P(ystar<=cut_j) - P(ystar<=cut_j).P(ystar<=cut_j-1) = P(ystar<=cut_j) - P(ystar<=cut_j-1) = F(cut_j-Xb) - F(cut_j-1-Xb)
NB: P(ystar<=cut_j).P(ystar<=cut_j-1) = P(ystar<=cut_j-1) because cut_j-1 <= cut_j
- Author:
- Justin van de Ven
-
Constructor Summary
ConstructorsConstructorDescriptionOrderedRegression(RegressionType type, Class<E1> enumType, MultiKeyCoefficientMap map) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetCoefficient(String regressor) <E extends Enum<E> & IntegerValuedEnum,E2 extends Enum<E2>>
Map<E,Double> getProbabilities(IDoubleSource iDblSrc, Class<E2> Regressors) <E extends Enum<E> & IntegerValuedEnum,E2 extends Enum<E2>>
doublegetProbability(E event, IDoubleSource iDblSrc, Class<E2> Regressors)
-
Constructor Details
-
OrderedRegression
-
-
Method Details
-
getCoefficient
-
getEventList
- Specified by:
getEventListin interfaceIDiscreteChoiceModel
-
getProbability
public <E extends Enum<E> & IntegerValuedEnum,E2 extends Enum<E2>> double getProbability(E event, IDoubleSource iDblSrc, Class<E2> Regressors) - Specified by:
getProbabilityin interfaceIDiscreteChoiceModel
-
getProbabilities
public <E extends Enum<E> & IntegerValuedEnum,E2 extends Enum<E2>> Map<E,Double> getProbabilities(IDoubleSource iDblSrc, Class<E2> Regressors) - Specified by:
getProbabilitiesin interfaceIDiscreteChoiceModel
-