[R] Help with the Error Message in R "Error in 1:nchid : result would be too long a vector"

Rahul Chakraborty ch@kr@r@hu| @end|ng |rom gm@||@com
Mon Sep 21 21:55:01 CEST 2020


Hello everyone,

I am using *mlogit* to analyse my choice experiment data. I have *3
alternatives* for each individual and for each individual I have *9
questions*. I have a response from *516 individuals*. So it is a panel of
9*516 observations. I have arranged the data in long format (it contains
100 columns indicating different variables and identifiers).

In mlogit I tried the following command---

*mldata<- mlogit.data(mydata, shape = "long", alt.var = "Alt_name", choice
= "Choice_binary", id.var = "IND")*

It is giving me the following error message- Error in 1:nchid : result
would be too long a vector

Could you please help me with this? I don't think it is too big a data 100
ROWS*13932 columns. I faced no issue in Excel. I am stuck due to this issue.
Thanks in advance.

-- Best Regards,
Rahul Chakraborty
Research Fellow
National Institute of Public Finance and Policy
New Delhi- 110067

	[[alternative HTML version deleted]]



More information about the R-help mailing list