0

For binary choice, I know I can use glm to estimate a binary Probit model. However, for teaching purpose, since I am going to move on to multinomial choice at a later stage (with more than two alternatives), I try to use mlogit package all the way through. The odd thing is that mlogit package seems to be unable to deal with a binary Probit problem.

Suppose the data set I imported is called "data.set". The CSV file can be downloaded from this link.

Here is my program

Given the CSV data has been imported as data.set. I run the following lines.

library(mlogit)

data.set2<-mlogit.data(data.set,choice='GRADE',shape='wide')

mlogit(GRADE~ 0 | GPA+TUCE+PSI ,data=data.set2,probit=TRUE)

Then I get the error message:

Error in M[, ((i - 1):(J - 2))] : subscript out of bounds In addition: Warning message: In rbind(0, diag(J - 2)) : number of columns of result is not a multiple of vector length (arg 1)

My "data.set2" is a mlogit data frame, which looks like:

     GPA TUCE PSI GRADE chid alt
1.0 2.66   20   0  TRUE    1   0
1.1 2.66   20   0 FALSE    1   1
2.0 2.89   22   0  TRUE    2   0
2.1 2.89   22   0 FALSE    2   1
3.0 3.28   24   0  TRUE    3   0
3.1 3.28   24   0 FALSE    3   1
  • OP needs `binary probit`. Although, it works when `probit` is set to `FALSE`, the answer doesn't match with `glm`. – user227710 May 22 '15 at 02:32
  • And why should there be a "match" for some unspecified bit of code, anyway? There's no "probit" link in `glm`'s list of "families". – IRTFM May 22 '15 at 03:18
  • 1
    For a probit model with `glm` the link is `binomial` and the family is `probit`. – eipi10 May 22 '15 at 03:52
  • Isn't it the other way around? See http://www.ats.ucla.edu/stat/r/dae/probit.htm or http://data.princeton.edu/R/glms.html – Roman Luštrik May 22 '15 at 07:50

0 Answers0