mnpProb                package:bayesm                R Documentation

_C_o_m_p_u_t_e _M_N_P _P_r_o_b_a_b_i_l_i_t_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'mnpProb' computes MNP probabilities for a given X matrix
     corresponding to one  observation.  This function can be used with
     output from 'rmnpGibbs' to simulate the posterior distribution of
     market shares or fitted probabilties.

_U_s_a_g_e:

     mnpProb(beta, Sigma, X, r)

_A_r_g_u_m_e_n_t_s:

    beta: MNP coefficients 

   Sigma: Covariance matrix of latents 

       X: X array for one observation - use 'createX' to make 

       r: number of draws used in GHK (def: 100)

_D_e_t_a_i_l_s:

     see 'rmnpGibbs' for definition of the model and the interpretation
     of the beta, Sigma parameters. Uses the GHK method to compute
     choice probabilities. To simulate a distribution of probabilities,
     loop over the beta, Sigma draws from 'rmnpGibbs' output.

_V_a_l_u_e:

     p x 1 vector of choice probabilites

_A_u_t_h_o_r(_s):

     Peter Rossi, Graduate School of Business, University of Chicago,
     Peter.Rossi@ChicagoGsb.edu.

_R_e_f_e_r_e_n_c_e_s:

     For further discussion, see _Bayesian Statistics and Marketing_ by
     Rossi,Allenby and McCulloch,  Chapters 2 and 4. 
      <URL:
     http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html>

_S_e_e _A_l_s_o:

     'rmnpGibbs', 'createX'

_E_x_a_m_p_l_e_s:

     ##
     ## example of computing MNP probabilites
     ##  here I'm thinking of Xa as having the prices of each of the 3 alternatives
     Xa=matrix(c(1,.5,1.5),nrow=1)
     X=createX(p=3,na=1,nd=NULL,Xa=Xa,Xd=NULL,DIFF=TRUE)
     beta=c(1,-1,-2)  ## beta contains two intercepts and the price coefficient
     Sigma=matrix(c(1,.5,.5,1),ncol=2)
     mnpProb(beta,Sigma,X)

