# Re: [R] Multinomial Logit Regression

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

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:

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

Or...

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

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_

_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?
>
>
> _Fede_
>
>
>

```--
View this message in context: http://www.nabble.com/Multinomial-Logit-Regression-tp16628196p16648683.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help