Re: [R] Multinomial Logit Regression

From: _Fede_ <>
Date: Sat, 12 Apr 2008 05:16:34 -0700 (PDT)

Hi again. I believe that I described the things bad before.

I want to make the analysis with a sample data (train.set) of dataset for later see if the predictions adjust to the rest of data non selected with the sample train.  

Then, of the same form in glm:  

net <- nnet(response.variable~., data = dataset, subset=train.set)  


z=zelig(response.variable ~., model = "mlogit",data=dataset, subset=train)  

But this don't work. I don't know yet if I do the MLR of this way. The function multinom from nnet library maybe can help but I don't know how can be the sintaxis in my case.  

In case it serves as help in glm I do:  

z <- glm(response.variable~., data=dataset, subset=train.set, family=binomial(link="logit))

Thank you.


_Fede_ wrote:
> Hi all,
> I have a dataset with a response variable with three categories (1, 2, 3)
> and a lot of continuous variables. I'd like to make a MLR with these
> variables. I've been watching the libraries nnet and zelig for this
> purpose but I don't understand them well.
> I use a training sample data to make the MLR.
> train.set <- sample(1:1000,1000*0.7)
> I have done this:
> library(nnet)
> net <- nnet(response.variable~., data = train.set)
> Error in terms.formula(formula, data = data) :
> '.' in formula y there is no 'data' argument
> library(Zelig)
> z=zelig(response.variable ~., model = "mlogit",data=train.set)
> Error in terms.formula(object[[i]], specials = c("id", "tag")) :
> '.' in formula y there is no 'data' argument
> What's wrong here? How can I make this in the correct form?
> Thank you in advance.
> _Fede_

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 12 Apr 2008 - 12:40:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Apr 2008 - 15:30:28 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive