s-news
[Top] [All Lists]

Re: Problems extracting model.matrix from multinom fit (nnet

To: Frederico Zanqueta Poleto <fred@poleto.com>
Subject: Re: Problems extracting model.matrix from multinom fit (nnet
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Thu, 25 Dec 2003 07:37:22 +0000 (GMT)
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <3FEA11C7.3060505@poleto.com>
On Wed, 24 Dec 2003, Frederico Zanqueta Poleto wrote:

> Dear All,
> 
> I have a fit from multinom (nnet library).
> 
> When I try the command model.matrix(fit) in S-Plus 2000 or in R 1.7.1, 
> everything is ok. But in S-Plus 6.1 I receive:
> Problem in formula$terms: function "$" not defined for non-vector class 
> "multinom"
> Use traceback() to see the call stack
> 
> Anybody know what is happening?

Yes.  There is no model.matrix method for the S4 class "multinom" (just 
as the error message says).  multinom is not an S4 class in the S3-based 
systems you quote, but in fact `everything is not OK' and this would only 
work for some sets of arguments.

What do you actaully want to do?

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


<Prev in Thread] Current Thread [Next in Thread>