[R] what does this multinom error mean?

Paul E. Johnson pauljohn at ku.edu
Thu Nov 13 07:04:58 CET 2003


I have RedHat linux 9 with R 1.8.

I'm estimating models with multinom with a dependent variable that has 3 
different values.  Sometimes the models run fine and I can understand 
the results.

Sometimes when I put in another variable, I see an indication that the 
estimation did work, but then I can't get the summary method to work.  
It's like this:

 > votemn1 <-  multinom(vote~V023022+rep+V023027+ V023131,data=nes2002)
# weights:  18 (10 variable)
initial  value 914.045424
iter  10 value 474.831205
iter  20 value 449.612637
iter  20 value 449.612636
iter  20 value 449.612636
final  value 449.612636
converged

 > summary(votemn1)
Error in model.frame(formula, rownames, variables, varnames, extras, 
extranames,  :
    invalid variable type

In this model, rep is a dichotomous (0,1) variable indicating if a 
person is a republican or not. If I drop that variable, the model does 
run and the summary method produces estimates & standard errors.

 > votemn2 <-  multinom(vote~V023022+V023027+ V023131,data=nes2002)
# weights:  15 (8 variable)
initial  value 917.341261
iter  10 value 529.137064
final  value 527.178682
converged

 > summary(votemn2)
Call:
multinom(formula = vote ~ V023022 + V023027 + V023131, data = nes2002)

Coefficients:
  (Intercept)    V023022    V023027     V023131
3  -2.2033403  0.9227144 -0.3835378 0.017960208
5  -0.8411559 -0.1853416 -0.2174085 0.005808468

Std. Errors:
  (Intercept)    V023022   V023027    V023131
3   0.5883961 0.07054401 0.0894393 0.05655965
5   1.2438595 0.14582161 0.1963035 0.12453307

Residual Deviance: 1054.357
AIC: 1070.357
...

-- 
Paul E. Johnson                       email: pauljohn at ukans.edu
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700




More information about the R-help mailing list