[R] Beta fit returns NaNs
peter dalgaard
pdalgd at gmail.com
Mon Aug 1 10:46:46 CEST 2011
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
More information about the R-help
mailing list