update_U function

Update latent utility vector

Update latent utility vector

This function updates the latent utility vector, where (independent across deciders and choice occasions) the utility for each alternative is updated conditional on the other utilities.

update_U(U, y, sys, Sigmainv)

Arguments

  • U: The current utility vector of length J-1.
  • y: An integer from 1 to J, the index of the chosen alternative.
  • sys: A vector of length J-1, the systematic utility part.
  • Sigmainv: The inverted error term covariance matrix of dimension J-1 x J-1.

Returns

An updated utility vector of length J-1.

Details

The key ingredient to Gibbs sampling for probit models is considering the latent utilities as parameters themselves which can be updated (data augmentation). Independently for all deciders n=1,,Nn=1,\dots,N and choice occasions t=1,...,Tnt=1,...,T_n, the utility vectors (Unt)n,t(U_{nt})_{n,t} in the linear utility equation Unt=Xntβ+ϵntU_{nt} = X_{nt} \beta + \epsilon_{nt}

follow a J1J-1-dimensional truncated normal distribution, where JJ is the number of alternatives, XntβX_{nt} \beta the systematic (i.e. non-random) part of the utility and ϵntN(0,Σ)\epsilon_{nt} \sim N(0,\Sigma) the error term. The truncation points are determined by the choices ynty_{nt}. To draw from a truncated multivariate normal distribution, this function implemented the approach of Geweke (1998) to conditionally draw each component separately from a univariate truncated normal distribution. See Oelschläger (2020) for the concrete formulas.

Examples

U <- c(0,0,0) y <- 3 sys <- c(0,0,0) Sigmainv <- solve(diag(3)) update_U(U, y, sys, Sigmainv)

References

See Geweke (1998) Efficient Simulation from the Multivariate Normal and Student-t Distributions Subject to Linear Constraints and the Evaluation of Constraint Probabilities for Gibbs sampling from a truncated multivariate normal distribution. See Oelschläger and Bauer (2020) Bayes Estimation of Latent Class Mixed Multinomial Probit Models for its application to probit utilities.