<div dir="ltr">In addition, I tried installing <b><i>mlogit version 0.4-2 </i></b>and the error persists. I'm beginning to think the error is due to another library mlogit depends on unless all the older versions and their requirements / dependencies have changed.<div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">> install.packages("~/Downloads/mlogit_<b>0.4-2</b>.tar.gz", repos=NULL, type="source")      </span><br>Installing package into ‘/home/sreezach/R/x86_64-pc-linux-gnu-library/4.0’
<br>(as ‘lib’ is unspecified)
<br>* installing *source* package ‘mlogit’ ...
<br>** package ‘mlogit’ successfully unpacked and MD5 sums checked
<br>** using staged installation
<br>** R
<br>** data
<br>** inst
<br>** byte-compile and prepare package for lazy loading
<br>** help
<br>*** installing help indices
<br>** building package indices
<br>** installing vignettes
<br>** testing if installed package can be loaded from temporary location
<br>** testing if installed package can be loaded from final location
<br>** testing if installed package keeps a record of temporary installation path
<br>* DONE (mlogit)
<br>> library(mlogit)
<br>> cbc.mlogit <- mlogit.data(data=cbc.df, choice="choice", shape="long",
<br>+ varying =3:6, alt.levels= paste("pos" ,1:3), id.var="<a href="http://resp.id">resp.id</a> ")
<br>Error in guess(varying) :  <br>  failed to guess time-varying variables from their names
<br>In addition: Warning message:
<br>In dfidx::dfidx(data = data, dfa$idx, drop.index = dfa$drop.index,  :
<br>  the levels shouldn't be provided with a data set in wide format<br>
<br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 6:47 PM sree datta <<a href="mailto:sreedta8@gmail.com">sreedta8@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi<div><br></div><div>I was training some colleagues on use of mlogit (version 1.0-1 as specified in the errata) for cbc using R and your example data set cbc.df in the book. It still failed. Here is the output. I installed the package from a local file</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">> install.packages("~/Downloads/mlogit_<b>1.0-1</b>.tar.gz", repos=NULL, type="source")
</span><br>Installing package into ‘/home/datasci/R/x86_64-pc-linux-gnu-library/4.0’
<br>(as ‘lib’ is unspecified)
<br>* installing *source* package ‘mlogit’ ...
<br>** package ‘mlogit’ successfully unpacked and MD5 sums checked
<br>** using staged installation
<br>** R
<br>** data
<br>** inst
<br>** byte-compile and prepare package for lazy loading
<br>** help
<br>*** installing help indices
<br>** building package indices
<br>** installing vignettes
<br>** testing if installed package can be loaded from temporary location
<br>** testing if installed package can be loaded from final location
<br>** testing if installed package keeps a record of temporary installation path
<br>* DONE (mlogit)
<br>> library(mlogit)
<br>> cbc.mlogit <- mlogit.data(data=cbc.df, choice="choice", shape="long",
<br>+ varying =3:6, alt.levels= paste("pos" ,1:3), id.var="<a href="http://resp.id" target="_blank">resp.id</a> ")
<br>Error in guess(varying) :  <br>  failed to guess time-varying variables from their names
<br>In addition: Warning message:
<br>In dfidx::dfidx(data = data, dfa$idx, drop.index = dfa$drop.index,  :
<br>  the levels shouldn't be provided with a data set in wide format<br>
<br></span></div><div><span style="font-family:monospace">Next I tried version 1.0-0 of mlogit but no success still:</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">> install.packages("~/Downloads/mlogit_1.0-0.tar.gz", repos=NULL, type="source")  </span><br>Installing package into ‘/home/sreezach/R/x86_64-pc-linux-gnu-library/4.0’
<br>(as ‘lib’ is unspecified)
<br>* installing *source* package ‘mlogit’ ...
<br>** package ‘mlogit’ successfully unpacked and MD5 sums checked
<br>** using staged installation
<br>** R
<br>** data
<br>** inst
<br>** byte-compile and prepare package for lazy loading
<br>** help
<br>*** installing help indices
<br>** building package indices
<br>** installing vignettes
<br>** testing if installed package can be loaded from temporary location
<br>** testing if installed package can be loaded from final location
<br>** testing if installed package keeps a record of temporary installation path
<br>* DONE (mlogit)
<br>> library(mlogit)
<br>> cbc.mlogit <- mlogit.data(data=cbc.df, choice="choice", shape="long",
<br>+ varying =3:6, alt.levels= paste("pos" ,1:3), id.var="<a href="http://resp.id" target="_blank">resp.id</a> ")
<br>Error in guess(varying) :  <br>  failed to guess time-varying variables from their names
<br>In addition: Warning message:
<br>In dfidx::dfidx(data = data, dfa$idx, drop.index = dfa$drop.index,  :
<br>  the levels shouldn't be provided with a data set in wide format<br>
<br></span></div><div><span style="font-family:monospace">Any help/feedback would be great. Thanks for an excellent book - my top go-to reference book for my day-to-day R analytics and one I recommend the most for a lot of colleagues and new R learners in analytics</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">Sree</span></div></div>
</blockquote></div>