llmnp
evaluates the log-likelihood for the multinomial probit model.llmnp(X, y, beta, Sigma, r)
createX
with DIFF=TRUE
to create X.
Model for each obs: $w = Xbeta + e$. $e$ $\sim$ $N(0,Sigma)$.
censoring mechanism:
if $y=j (jmax(w_{-j})$ and $w_j >0$ if $y=p, w < 0$ To use GHK, we must transform so that these are rectangular regions e.g. if $y=1, w_1 > 0$ and $w_1 - w_{-1} > 0$. Define $A_j$ such that if j=1,...,p-1, $A_jw = A_jmu + A_je > 0$ is equivalent to $y=j$. Thus, if y=j, we have $A_je > -A_jmu$. Lower truncation is $-A_jmu$ and $cov = A_jSigmat(A_j)$. For $j=p$, $e < - mu$.
createX
, rmnpGibbs