[R]: multinom()

Bill Venables venables at acland.qld.cmis.csiro.au
Tue Mar 21 02:10:35 CET 2000


Peter Ho asks:

> Dear R users,
> 
> Does anyone know if it is possible to use multinom to do a polychotomous
> fit using one categorical  and one numeric variable as response. The
> doc. for multinom states that for formula, response can be K>2 classes.
> Is this 2 and more, or as I have understood it only greater than 2. I
> have tried fitting my data, but have only encountered error messages.

If you have a bivariate response, on variable categorical and one
continuous (if that't what you mean by "numeric"), then the
response is not "polychotomous" and multinom is of no use to you.

For multinom to be useful, you need to express your response
categories through a single factor variable.  If it is naturally
expressed with more than two factors, you have to combine them
into one factor in the way you intend the result to be
interpreted.

It should work with K = 2 categories and the result should be
comparable with glm(..., family = binom, ...) and contr.treatment
contrasts.

> On another note, Is it possible to get a set of discriminant scores for
> the multinom fit using predict.nnet or some other function like for lda
> using predict.lda?

There is a predict.multinom method in the nnet library that
allows some forms of prediction following on from a multinom fit.

-- 
Bill Venables,      Statistician,     CMIS Environmetrics Project
CSIRO Marine Labs, PO Box 120, Cleveland, Qld,  AUSTRALIA.   4163
Tel: +61 7 3826 7251           Email: Bill.Venables at cmis.csiro.au    
Fax: +61 7 3826 7304      http://www.cmis.csiro.au/bill.venables/



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list