Skip to content
Prev 274692 / 398506 Next

Creation of mlogit models from text file

I'm not at all familiar with mlogit or Biogene so I can't really give
a definitive answer, but it seems that this would be a very dangerous
thing to try.

Looking at the mlogit manual, I see that, like most model objects in
R, mlogit has a variety of elements including many of those you
specifically seem to be avoiding: data, likelihood functions, etc. You
could perhaps make a trivial mlogit object and directly modify the
elements you mention, but then you'd want to check each of the
functions you run on your object to make sure they don't access the
unmodified list elements. A fair compromise is probably to run mlogit
on a small sample of your data (I suppose you are using this Biogene
program for speed reasons?) to create a "best-approximation object"
and then modify directly; that will at least reduce the chance of
something too bad happening.

I suppose this could be automated to save you a little trouble (just
create your own class whose methods consist of getting the mlogit
methods, deparsing them and making sure they don't look at an
unmodified element, and then passing to the mlogit method) but the
smarter path is probably to extract the code from those functions you
want to use for prediction and tweak them to use the object you read
in directly.

Someone may have already implemented a work around though if this is a
common problem.

Best of luck,

Michael

On Mon, Oct 17, 2011 at 12:01 PM, Bhargava Sana
<Bhargava.Sana at rsginc.com> wrote: