'Errors 'undefined columns selected' and 'no individual index'

I am working with a conjoint dataset and estimating multinomial logit models. To work with the mlogit package I had to convert the data, which I did like this:

dat <- mlogit.data(dat, choice="Selection_dummy", shape="long", alt.var="Alt_id", id = "Resp_id")

After converting the data, estimating the MNL model works fine. However, I cannot view the dataset anymore as it retrieves the following error:

View(dat)

Error in [.data.frame (x, start:min(NROW(x), start + len)) : undefined columns selected Error in [.data.frame (x, start:min(NROW(x), start + len)) : undefined columns selected

Then, when I want to estimate a latent class model this provides the error that there is no individual index. I think this might have to do with converting the dataset?

lc2<- gmnl(Selection_dummy ~ aa + ab + ba + bb + bc + ca + cb + cc + da + db + ea + eb + None | 0 | 0 | 0 | 1, data = dat, model = 'lc', Q = 2, panel = TRUE, method = "NR")

Error in gmnl(Selection_dummy ~ aa + ab + : No individual index

I can't seem to find the issue, so does someone know what's going wrong here and how it can be solved?

Thanks a lot!



Solution 1:[1]

Try head(dat, 5) instead. For some reason the converted dataframe will not show up with view.

It is possible that mlogit did not convert your data correctly. If you do not see : in the chid column, there is a problem with the conversion.

Setting the variables to the correct one solved my problem.

Solution 2:[2]

a coworker found out what i got wrong: the varnish sources list file specifies the path to the keyring where the gpg key is expected, but i had apt-key add the key to the default keyring.

we found https://packagecloud.io/varnishcache/varnish66/install which seems like the clean solution to the problem, a script that installs key and source entry in a consistent way. i will use the install script now.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rocky_raccoon
Solution 2 dbu