Hi, sorry for repeating the question but this is kind of important to me and i don't know whom should i ask. So as noted before when I do a parameter fit to the beta distr i get: fitdist(vectNorm,"beta"); Fitting of the distribution ' beta ' by maximum likelihood Parameters: estimate Std. Error shape1 2.148779 0.1458042 shape2 810.067515 61.8608126 Warning messages: 1: In dbeta(x, shape1, shape2, log) : NaNs produced 2: In dbeta(x, shape1, shape2, log) : NaNs produced 3: In dbeta(x, shape1, shape2, log) : NaNs produced 4: In dbeta(x, shape1, shape2, log) : NaNs produced 5: In dbeta(x, shape1, shape2, log) : NaNs produced 6: In dbeta(x, shape1, shape2, log) : NaNs produced Now im my vector has cca 900 points. are those 6 error messages some thing to be really concerned or ???? what does it mean ?? -- View this message in context: http://r.789695.n4.nabble.com/Beta-fit-returns-NaNs-tp3709139p3709139.html Sent from the R help mailing list archive at Nabble.com.
On Aug 1, 2011, at 10:33 , baxy77 wrote:> Hi, > > sorry for repeating the question but this is kind of important to me and i > don't know whom should i ask. > > So as noted before when I do a parameter fit to the beta distr i get: > > > fitdist(vectNorm,"beta"); > Fitting of the distribution ' beta ' by maximum likelihood > Parameters: > estimate Std. Error > shape1 2.148779 0.1458042 > shape2 810.067515 61.8608126 > Warning messages: > 1: In dbeta(x, shape1, shape2, log) : NaNs produced > 2: In dbeta(x, shape1, shape2, log) : NaNs produced > 3: In dbeta(x, shape1, shape2, log) : NaNs produced > 4: In dbeta(x, shape1, shape2, log) : NaNs produced > 5: In dbeta(x, shape1, shape2, log) : NaNs produced > 6: In dbeta(x, shape1, shape2, log) : NaNs produced > > > Now im my vector has cca 900 points. are those 6 error messages some thing > to be really concerned or ???? what does it mean ??They are probably harmless. It just means that in the search of the parameter space, the fitting algorithm ventured into forbidden territory (most likely, it tried a negative value for one of the shape parameters). You could try setting start= to something closer to the final estimates and see if the warnings go away. BTW: I assume this is using the fitdistrplus contributed package (and not just misspelling fitdistr from MASS)? You really should specify such things -- to make it easier for people to help, but also out of courtesy to the author. -pd -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com "D?den skal tape!" --- Nordahl Grieg
On 2011-08-01 01:33, baxy77 wrote:> Hi, > > sorry for repeating the question but this is kind of important to me and i > don't know whom should i ask. > > So as noted before when I do a parameter fit to the beta distr i get: > > > fitdist(vectNorm,"beta"); > Fitting of the distribution ' beta ' by maximum likelihood > Parameters: > estimate Std. Error > shape1 2.148779 0.1458042 > shape2 810.067515 61.8608126 > Warning messages: > 1: In dbeta(x, shape1, shape2, log) : NaNs produced > 2: In dbeta(x, shape1, shape2, log) : NaNs produced > 3: In dbeta(x, shape1, shape2, log) : NaNs produced > 4: In dbeta(x, shape1, shape2, log) : NaNs produced > 5: In dbeta(x, shape1, shape2, log) : NaNs produced > 6: In dbeta(x, shape1, shape2, log) : NaNs produced > > > Now im my vector has cca 900 points. are those 6 error messages some thing > to be really concerned or ???? what does it mean ??Those warnings are from optim(). You probably don't have to worry about them. I usually use fitdistr() in the MASS package. But it will require reasonable start values. To avoid the warnings, you could try using the parameter estimates from your fitdist(vectNorm, "beta") call as start values and re-run fitdist() with those values, and you might also set the optim method to BFGS (which, BTW, is the default in fitdistr()). library(fitdistrplus) fitdist(vectNorm, "beta", start = list(shape1 = 2.15, shape2 = 810), optim.method = "BFGS") Peter Ehlers> > -- > View this message in context: http://r.789695.n4.nabble.com/Beta-fit-returns-NaNs-tp3709139p3709139.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
yes it is the fitdistrplus package. Sorry form not mentioning it earlier. Usually i do those things but this time it somehow slipped my mind , sorry and Thank you both! -- View this message in context: http://r.789695.n4.nabble.com/Beta-fit-returns-NaNs-tp3709139p3709277.html Sent from the R help mailing list archive at Nabble.com.