[R-lang] new user's question about miltinom

Donald Derrick dderrick@interchange.ubc.ca
Tue Feb 1 17:49:48 PST 2011


Hello all.  I have a truly embarrassing question to ask:

I want to find a test in R that lets me look at the effect of an independent variable on a dependent result that can be either a 1, 2, or 3.  But alas I'm amazed how difficult it is to look at such multinomial data.

I have been trying to use the R function multinom() for some time, and I realize that I simply don't understand how it works.  

I know this because with a simple test table like this:

dependent	independent
1	2
1	2
1	2
1	2
1	2
1	2
2	2
2	2
2	2
3	2

I would expect this formula:

test.multinom = multinom(test$dependent ~ test$independent, data=test)

to utterly fail because all the independent data is the same.

But instead, I get this result:

/////

# weights:  9 (4 variable)
initial  value 10.986123 
final  value 8.979457 
converged
Call:
multinom(formula = test$dependent ~ test$independent, data = test)

Coefficients:
  (Intercept) test$independent
2  -0.1386294       -0.2772589
3  -0.3583519       -0.7167038

Residual Deviance: 17.95891 
AIC: 21.95891 

****

I'm clearly doing something ridiculously wrong, but I don't know what.


DD

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucsd.edu/pipermail/ling-r-lang-l/attachments/20110201/9fad2bf1/attachment.html 


More information about the ling-r-lang-L mailing list