Hello together,
here is the summary of the responses to my question.
#####################################
>From ripley@stats.ox.ac.uk Fri Feb 19 10:39 MET 1999
function:
Function multinom in library nnet.
download and literature:
http://www.stats.ox.ac.uk/pub/MASS2
is the nearest site to you. This is described in the book for which this
is the supporting software.
################# Lutz Prechelt #######################
tree() and the related functions such as prune.tree() etc.
Lutz
##########################################
From: "Byers, Bob" <rhb1@cdc.gov>
For problems like this I use discriminant analysis (SAS has a good one).
The assumption of multivariate normality is approximately OK if you
code your categorical variables as (0,1) (Binomial is asymptotically normal)
and my experience is that the discrimination works whether the assumption
is true or not.
-Bob Byers
original message:
>
> Dear members of the S+ list,
>
> I am looking for a procedure that allows the prediction of the probability
> to be in category A,B,C or D (nominal scale, not ordinal!) given the
> predictors which can be as well as categorical and interval scaled. Very
> similar to a logistic regression, but allowing for a nominally scaled
> dependent variable with more than two categories.
>
> An application would be to estimate the probability to be treated in
> hospital A,B,C or D given the patients initial characteristics like
> symptom severity, age, diagnosis etc...
>
> I tried SAS proc CATMOD, but this allows only to a limited degree interval
> scaled predictors.
>
> Does anybody know if there is a procedure or library for S+ that can do
> this kind of multinomial regression? Can I download it somewhere? Are
> there references?
From: "Zack, Matthew M." <mmz1@cdc.gov>
You state that
I tried SAS proc CATMOD, but this allows only to a limited degree
interval scaled predictors.
I presume that you declared the interval scaled predictors in the DIRECT
statement of PROC CATMOD and that you used the maximum likelihood method of
estimation (option ML in the MODEL statement). If not, perhaps you should
retry PROC CATMOD.
Matthew Zack
From: "Brian P. Flaherty" <bxf4@psu.edu>
Matthias,
I asked the very same question last year. The easiest thing I found was
to
use the multinom() command in Ripley's nnet library (available at Statlib
and Dr. Ripley's website, I think). Also, you might seach the Archive of
the snews postings (also at statlib) for multinomial logistic regression
(or variants thereof). Finally, Stata does it quite simply, if you have
access to that package. Good luck.
Brian Flaherty
From: Bill Venables <wvenable@attunga.stats.adelaide.edu.au>
If you install the Venables and Ripley libraries (MASS, spatial,
treefix, nnet, class) in the nnet library there is a function
multinomial() that does precisely what you want. You call it
like an ordinary model fitting function:
library(nnet)
fm <- multinomial(H ~ x1 + x2 + ...., data = Stuttgart)
where H is a factor giving the hospital that the patient is
assigned to and x1, x2 .... are the predictors, with no
restrictions on them. There are the usual method functions for
doing things with the fitted model object, too, including predict().
I would caution against trying it with too big a data set,
though. A couple of hundred patients should be fine, but a
couple of thousand might be pushing it a bit.
MR> I tried SAS proc CATMOD, but this allows only to a
MR> limited degree interval scaled predictors.
Yes, that's often the snag with SAS.
MR> Does anybody know if there is a procedure or library for
MR> S+ that can do this kind of multinomial regression? Can I
MR> download it somewhere? Are there references?
All that and more...if you have access to a certain notorious
yellow book.
Cheers from Australia, where the weather is very hot,
Bill.
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
multinom(), not multinomial() !!!!!
> I would caution against trying it with too big a data set,
> though. A couple of hundred patients should be fine, but a
> couple of thousand might be pushing it a bit.
That seems fine to me: I have actually used 20000 or so.
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|