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:
library(nnet)
net <- nnet(response.variable~., data = dataset, subset=train.set)
Or...
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_
_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:
http://www.nabble.com/Multinomial-Logit-Regression-tp16628196p16648683.html
Sent from the R help mailing list archive at Nabble.com.