Re: [R] mlogit: message "invalid 'row.names' length" after subsetting data

2014-01-30 Thread craux
Thanks a lot Bill! This works fine! Useful to know regarding subset. Charles -- View this message in context: http://r.789695.n4.nabble.com/mlogit-message-invalid-row-names-length-after-subsetting-data-tp4684465p4684470.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] mlogit: message "invalid 'row.names' length" after subsetting data

2014-01-30 Thread William Dunlap
> dd1 <- subset(dd, dd$Effect=='none') Try using dd1 <- dd[dd$Effect=='none', ] instead of that call to subset(). subset() strips the non-data.frame attributes from its output. It may be easier to use the subset argument to mlogit, as in mlogit(..., subset = Effect=="none"). Bill Dunlap TIBC

Re: [R] Mlogit error

2013-05-30 Thread Gary Dong
Hi, Graham, Thank you for sharing this. I encountered the same problem. My choice set was unbalanced because some alternatives were not available for some observations. If I forced the choice sets balanced, model estimation results would be biased. However, after including chid.var = "" and alt.va

Re: [R] mlogit error

2013-04-07 Thread arun
Hi, Try this:  Mult3$mode.ids  #[1] 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 #Levels: 1 2 3 4 5 6 I guess the key is to have equal number of alternatives.  Mult3$mode.ids<- as.numeric(as.character(Mult3$mode.ids))   res<-mlogit.data(Mult3[-25,],shape="long",choice="CHOICE",alt.var="mode.id

Re: [R] mlogit error

2013-04-07 Thread arun
- From: "Leask, Graham" To: arun Cc: Sent: Sunday, April 7, 2013 11:28 AM Subject: RE: [R] mlogit error Hi Arun, I think you are right the issue may be how to identify those obs where this doesn't apply for whatever reason. The issue I think is the size of the data which make

Re: [R] mlogit Package

2013-01-24 Thread ya
Hi Ehsan, What do you mean by percent correctly predicted? Could you provide more info about your model? It might be helpful to get a clue. ya From: ehsan rahimi Date: 2013-01-24 12:52 To: r-help Subject: [R] mlogit Package I have problem as follows: I use "mlogit package" to develop a multi

Re: [R] mlogit and model-based recursive partitioning

2012-10-02 Thread tudor
Hi Achim: Excellent points. Thank you so much for your prompt reply. Tudor -- View this message in context: http://r.789695.n4.nabble.com/mlogit-and-model-based-recursive-partitioning-tp4644743p4644767.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] mlogit and model-based recursive partitioning

2012-10-01 Thread Achim Zeileis
Tudor: Has anyone tried to model-based recursive partition (using mob from package party; thanks Achim and colleagues) a data set based on a multinomial logit model (using mlogit from package mlogit; thanks Yves)? Interesting question: in principle, this is possible but I wouldn't know of an

Re: [R] mlogit learning error

2012-04-19 Thread geek girl
I found out that this error means there is an underflow that is not handled by the default solve. The suggested solution is to use qr.solve() or svd instead of default.solve(). How can I modify mlogit to use qr.solve() instead of solve.default()? Thanks On Thu, Apr 19, 2012 at 2:10 PM, geek gir

Re: [R] mlogit learning error

2012-04-19 Thread geek girl
Thank you for your response. Each v can take a a value from 1 to 100. Input data subset: v1.data v1 v2 v3 v4 v5 1 1591 5152 2 1591783 3 1591 4611 4 1991 8411 5 1591 31 4 6 1

Re: [R] mlogit learning error

2012-04-19 Thread R. Michael Weylandt
There's something in your data that makes the model computationally singular when you take the various subsettings... Can you provide a small reproducible example so we can help narrow it down? It looks like you're using different data for each mlogit though so I'm not sure how the comparison that

Re: [R] Mlogit missing value problem

2011-12-19 Thread K. Elo
Hi, 19.12.2011 11:12, Ville Iiskola wrote: Error in if (abs(x - oldx)< ftol) { : missing value where TRUE/FALSE needed The reason for this error is in the row 563. There the choice has value 1 and Ie has missing value. If the choice has value 0 and Ie has missing values, then there is no erro

Re: [R] mlogit model that contains both individual-specific parameters and universal parameters

2011-06-22 Thread Achim Zeileis
On Wed, 22 Jun 2011, Quang Anh Duong wrote: Hello,? I am pretty new to mlogit, and still trying to figure out what models to use.I have a data set of N individuals, each of which faces I alternatives. The utility function of individual n, for choice i is:? u(i,n) = alpha(i) * x1(i,n) + beta

Re: [R] mlogit error

2011-02-28 Thread Peter Ehlers
On 2011-02-28 12:54, gmacfarlane wrote: I actually have exactly the same question as Maha, and I wish that Z had answered the question instead of providing a lesson in streamlined code (valuable, but not helpful). I think that Achim answered as best one could, given that Maha neglected, as you

Re: [R] mlogit error

2011-02-28 Thread gmacfarlane
I actually have exactly the same question as Maha, and I wish that Z had answered the question instead of providing a lesson in streamlined code (valuable, but not helpful). It seems as though mlogit.data repopulates the row.names field, and that this is where the duplication comes in. hbwtrips<-

Re: [R] mlogit error

2010-08-13 Thread Achim Zeileis
On Fri, 13 Aug 2010, Maha Bakoben wrote: Hi, I'm trying to fit a multinomial logistic regression to my data which consists of 5 discrete variables (scales 1:10) and 1000 observations. I get the following error: Error in `row.names<-.data.frame`(`*tmp*`, value = c("NA.NA", "NA.NA", : duplica

Re: [R] mlogit and weights

2010-06-03 Thread Achim Zeileis
On Wed, 2 Jun 2010, Misha Spisok wrote: Hello, I can't figure out why using and not using weights in mlogit yields identical results. My motivation is for the case when an "observation" or "individual" represents a number of individuals. For example, library(mlogit) library(AER) data("Travel

Re: [R] mlogit

2010-03-07 Thread Achim Zeileis
On Mon, 8 Mar 2010, yves croissant wrote: In the code of the mlogit function, the call is saved under the name 'mldata' that you use to store the result of the mlogit.data function. When calling mlogit with 'mldata' as the data argument, there is a conflict between these two objects with the sam

Re: [R] mlogit

2010-03-07 Thread yves croissant
In the code of the mlogit function, the call is saved under the name 'mldata' that you use to store the result of the mlogit.data function. When calling mlogit with 'mldata' as the data argument, there is a conflict between these two objects with the same name, one of class 'call' and one of class

Re: [R] mlogit

2010-03-07 Thread Peter Ehlers
On 2010-03-07 10:41, cmc wrote: I have tried doing it whithout attaching the mydata file, and i still get the same output. When i create mldata using mlogit.data i do not generate the chid and alt columns, is this where the problem is, if so how do i fix this problem. I've suggested not nami

Re: [R] mlogit

2010-03-07 Thread Peter Ehlers
David, Here's my sessionInfo: > sessionInfo() R version 2.11.0 Under development (unstable) (2010-03-02 r51195) i386-pc-mingw32 locale: [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C [5] LC_TIME=English_Canada.1252 attached bas

Re: [R] mlogit

2010-03-07 Thread David Winsemius
Looks like a problem that the maintainer should be copied with: > maintainer("mlogit") [1] "Yves Croissant " Not sure why it should affect your systems and not mine, but here is my sessionInfo() if it helps: > sessionInfo() R version 2.10.1 RC (2009-12-09 r50695) x86_64-apple-darwin9.8.0 lo

Re: [R] mlogit

2010-03-07 Thread cmc
I have tried doing it whithout attaching the mydata file, and i still get the same output. When i create mldata using mlogit.data i do not generate the chid and alt columns, is this where the problem is, if so how do i fix this problem. Cheers for any help -- View this message in context: http:

Re: [R] mlogit

2010-03-07 Thread Peter Ehlers
On 2010-03-07 10:30, David Winsemius wrote: On Mar 7, 2010, at 12:06 PM, cmc wrote: I am trying to follow this example for multinomial logistic regression http://www.ats.ucla.edu/stat/r/dae/mlogit.htm However, I cannot get it to work properly. This is the output I get, and I get an error

Re: [R] mlogit

2010-03-07 Thread David Winsemius
On Mar 7, 2010, at 12:06 PM, cmc wrote: I am trying to follow this example for multinomial logistic regression http://www.ats.ucla.edu/stat/r/dae/mlogit.htm However, I cannot get it to work properly. This is the output I get, and I get an error when I try to use the mlogit function. Any

Re: [R] mlogit is not an S4 object error

2010-02-24 Thread Steve_Friedman
2010 04:20 cc PMr-help@r-project.org Subject Re: [R] mlogit is not an S4 object

Re: [R] mlogit is not an S4 object error

2010-02-24 Thread Achim Zeileis
On Wed, 24 Feb 2010, steve_fried...@nps.gov wrote: Hello, I've been getting the following error when using the mlogit function from the mlogit package This is one of the examples provided in the Package "mlogit" January 27, 2010 description data("Fishing", package="mlogit") Fish <- mlogit.d

Re: [R] mlogit is not an S4 object error

2010-02-24 Thread Peter Ehlers
On 2010-02-24 6:51, steve_fried...@nps.gov wrote: Hello, I've been getting the following error when using the mlogit function from the mlogit package This is one of the examples provided in the Package "mlogit" January 27, 2010 description data("Fishing", package="mlogit") Fish<- mlogit.da

Re: [R] mlogit function cut off formular

2010-02-15 Thread Achim Zeileis
On Sun, 14 Feb 2010, Han Qin wrote: I'm trying to fit a multinominal logistic model using package mlogit. I have 15 independent variables. The code looks like this: m<-mlogit(score~0|f1+f2+f3+f4+f5+f6+f7+f8+f9+f10+f11+f12+f13+f14+f15, data, reflevel="1") And it gives the following error message