0

I want to build an error component logit using R's mlogit library.

I have considered my dataset as a panel dataset (i.e. each row indicates an alternative) and then build an error component logit model.

While I understand that in order to build a mixed-logit model, I need to add the list of covariates in rpar command. However, I do not want to estimate random parameters for the covariates but for the intercept term.

1 Answers1

0

In a multinomial logit model you can estimate J-1 alternative specific constants (intercepts). The easiest way to make them random is to create alternative specific indicators.

For example, let's say that you have three alternatives: 1, 2 and 3, and that these are stored in the variable alt. Now you can create two new variables called alt_1 and alt_2, which are equal to 1 for alternative 1 and 2, respectively, and 0 otherwise.

data$alt_1 <- ifelse(data$alt == 1, 1, 0)
data$alt_2 <- ifelse(data$alt == 2, 1, 0)

Now use the mlogit.data() function.

In your model you would then specify alt_1 and alt_2 to be random parameters following some distribution. Now you have random alternative specific constants and you estimate the mean and standard deviation. If you want them to be simple error components with zero mean and unit standard deviation, you can fix the mean and sd parameters for the intercepts to 0 and 1 respectively.

edsandorf
  • 757
  • 7
  • 17