Dear R experts, I am trying to use the R MASS library fitdistr() to fit the following list: k21stsList<-c(0.76697,0.57642,0.75938,0.82616,0.93706,0.77377,0.58923,0.37157,0.60796,1.00070,0.97529,0.62858,0.63504,0.68697,0.61714,0.75227,1.16390,0.66702,0.83578) as follows, library(MASS) fitdistr(k21stsList, "normal") But, I get Error in fitdistr(k21stsList, "normal") : 'start' must be a named list What am I doing wrong (probably alot!) Thanks, Oscar
On Thu, 27 Nov 2003, Oscar Linares wrote:> Dear R experts, > > I am trying to use the R MASS library fitdistr() to fit the following > list:Well, that is not a list!> k21stsList<-c(0.76697,0.57642,0.75938,0.82616,0.93706,0.77377,0.58923,0.37157,0.60796,1.00070,0.97529,0.62858,0.63504,0.68697,0.61714,0.75227,1.16390,0.66702,0.83578) > > as follows, > > library(MASS) > fitdistr(k21stsList, "normal") > > But, I get > > Error in fitdistr(k21stsList, "normal") : 'start' must be a named listYou omitted the `start' argument, and "normal" is not in the list specified in the Details section.> What am I doing wrong (probably alot!)It always helps to read through the whole help page rather than guessing. Given that the MLEs for a normal are known explicitly, why are you doing this? -- Brian D. Ripley, ripley at 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
At 15:49 27-11-2003, you wrote:>Dear R experts, > >I am trying to use the R MASS library fitdistr() to fit the following >list: > >k21stsList<-c(0.76697,0.57642,0.75938,0.82616,0.93706,0.77377,0.58923,0.37157,0.60796,1.00070,0.97529,0.62858,0.63504,0.68697,0.61714,0.75227,1.16390,0.66702,0.83578) > >as follows, > >library(MASS) >fitdistr(k21stsList, "normal") > >But, I get > >Error in fitdistr(k21stsList, "normal") : 'start' must be a named listHi You don?t put the start list, something like this fitdistr(k21stsList, "normal",list(mean = 0.5 sd = 0.1)) mean sd 0.74584591 0.17908744 (0.04108548) (0.02904255) Bernardo Rangel Tura, MD, MSc National Institute of Cardiology Laranjeiras Rio de Janeiro Brazil
Reasonably Related Threads
- Basic question on function "identical"
- fitting distributions using fitdistr (MASS)
- Help with function "fitdistr" in "MASS"
- Is possible, on biological grounds, suggest to fitdistr (MASS library) that the estimated parameters must be between two values?
- MASS fitdistr with plyr or data.table?