update_U | R Documentation |
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)
U |
The current utility vector of length |
y |
An integer from |
sys |
A vector of length |
Sigmainv |
The inverted error term covariance matrix of dimension |
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,…,N and choice occasions t=1,...,T_n, the utility vectors (U_{nt})_{n,t} in the linear utility equation U_{nt} = X_{nt} β + ε_{nt} follow a J-1-dimensional truncated normal distribution, where J is the number of alternatives, X_{nt} β the systematic (i.e. non-random) part of the utility and ε_{nt} \sim N(0,Σ) the error term. The truncation points are determined by the choices y_{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.
An updated utility vector of length J-1
.
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.
U <- c(0,0,0) y <- 3 sys <- c(0,0,0) Sigmainv <- solve(diag(3)) update_U(U, y, sys, Sigmainv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.