Functions | |
def | mev |
Choice probability for a MEV model. | |
def | mev_selectionBias |
Choice probability for a MEV model, including the correction for endogenous sampling as proposed by Bierlaire, Bolduc and McFadden (2008). |
def mev::mev | ( | V, | |
Gi, | |||
av, | |||
choice | |||
) |
Choice probability for a MEV model.
V | A dictionary mapping each alternative id with the expression of the utility function. |
Gi | A dictionary mapping each alternative id with the function
where |
av | A dictionary mapping each alternative id with its availability condition. |
choice | Expression producing the id of the chosen alternative. |
def mev(V,Gi,av,choice) : H = {} for i,v in V.items() : H[i] = Elem({0:0, 1: v + log(Gi[i])},Gi[i]!=0) P = bioLogit(H,av,choice) return P
def mev::mev_selectionBias | ( | V, | |
Gi, | |||
av, | |||
correction, | |||
choice | |||
) |
Choice probability for a MEV model, including the correction for endogenous sampling as proposed by Bierlaire, Bolduc and McFadden (2008).
V | A dictionary mapping each alternative id with the expression of the utility function. |
Gi | A dictionary mapping each alternative id with the function
where |
av | A dictionary mapping each alternative id with its availability condition. |
correction | A dictionary mapping each alternative id with the expression of the correction. Typically, it is a value, or a parameter to be estimated. |
choice | Expression producing the id of the chosen alternative. |
def mev_selectionBias(V,Gi,av,correction,choice) : H = {} for i,v in V.items() : H[i] = v + log(Gi[i]) + correction[i] P = bioLogit(H,av,choice) return P