[R] Runtime Error with multinom
Andreas Wittmann
andreas_wittmann at gmx.de
Tue Jul 14 17:27:13 CEST 2009
Dear R-users,
i try to fit a multinomial model in order to get an imputation for a
missing value in factor1.
library(nnet)
factor1 <- factor(c("a","b","c","d"))
factor2 <- factor(c("e","f","g","h"))
size <- c(3,8,2,1)
factor1[3] <- NA
Z<-ifelse(is.na(factor1), 0, 1)
assign("data", cbind.data.frame(factor1,factor2,size),pos=1)
multinom(formula(data),data=data[Z,])
when entering the last line i get a runtime error and R crashes down.
my system is windows xp and R 2.9.1, i tried it also with ubuntu 9.04
and R.2.8.1 but i get a quite similar error.
Many thanks if anyone could tell me what i do wrong and what is the
problem here.
best regards
Andreas
More information about the R-help
mailing list