0

I am trying to estimate a latent class logit model using panel data. I tried following this example: https://rpubs.com/msarrias1986/335556.

I was told that the following code should work:

RM <- mlogit.data(rm01, id.var = "ID", 
      choice = "Choice", 
      varying = 3:14, 
      shape = "wide", sep = "")

I get the error:

Error in reshapeLong(data, idvar = idvar, timevar = timevar, varying = varying,  : 
  'varying' arguments must be the same length

What am I doing wrong?

Adriaan
  • 17,741
  • 7
  • 42
  • 75
Ping Guo
  • 1
  • 1

0 Answers0