"normal" is in the list in the current versions of MASS, but not that 
released with R 1.8.1.  Try update.packages() in R.

On Mon, 16 Feb 2004, Spencer Graves wrote:

>       I got the same error message in R 1.8.1 and S-Plus 6.1.  Then I 
> read the error message:  "'start' must be a named list".  Then I read 
> help("fitdistr") and learned that "fitdistr" required 3 arguments, the 
> third of which was "start: A named list giving the parameters to be 
> optimized with initial values.  This can be omitted for some of the 
> named distributions (see Details)."  The normal distribution was NOT one 
> of the named distributions.  When I supplied a named list for "start", 
> it worked: 
> 
>  > fitdistr(x, "normal", list(mean=0, sd=1))
>       mean          sd   
>   2.97093013   0.88852969
>  (0.08885297) (0.06281083)
> 
>       hope this helps.  spencer graves
> 
> Rau, Roland wrote:
> 
> >Hi,
> >
> >  
> >
> >>-----Original Message-----
> >>From:       [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> >>Sent:       Sunday, February 15, 2004 10:24 PM
> >>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >>Subject:    Re: [R] Maximum likelihood estimation in R
> >>
> >>Hello,
> >>
> >>Use
> >>
> >>    
> >>
> >>>x=rnorm(100, mean=3, sd=1)
> >>>library(MASS)
> >>>fitdistr(x, "normal")
> >>>      
> >>>
> >>      mean          sd    
> >>  2.93666631   0.99673982 
> >> (0.09967398) (0.07048015)
> >>
> >>    
> >>
> >     For me, this example does not work. As it looks like copy+paste, I
> >guess this something platform dependent? At least I have to specify some
> >starting values as shown below. But maybe I did something wrong?
> >
> >     Best,
> >     Roland
> >     (I am using at the moment R 1.8.1 on WinNT)
> >
> >     > x=rnorm(100, mean=3, sd=1)
> >     > library(MASS)
> >     > fitdistr(x, "normal")
> >     Error in fitdistr(x, "normal") : 'start' must be a named list
> >     > fitdistr(x, "normal", start=list(mean=1, sd=0.4))
> >           mean          sd    
> >       3.03167815   1.06637851 
> >      (0.10663786) (0.07539617)
> >     > 
> >
> >
> >+++++
> >This mail has been sent through the MPI for Demographic Research.  Should you 
> >receive a mail that is apparently from a MPI user without this text displayed, then 
> >the address has most likely been faked.   If you are uncertain about the validity 
> >of this message, please check the mail header or ask your system administrator for 
> >assistance.
> >
> >______________________________________________
> >[EMAIL PROTECTED] mailing list
> >https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> >  
> >
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
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

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to