[R] Help with function "fitdistr" in "MASS"
Bernardo Rangel Tura
tura at centroin.com.br
Sun Jan 3 10:00:05 CET 2010
On Sat, 2010-01-02 at 23:20 -0800, Saji Ren wrote:
> Hi, R users:
>
> I want to fit my data into a normal distribution by using the command
> "fitdistr" in "MASS".
> I changed my data class from "ts" to "numeric" by
>
> >class(mydata)="numeric"
>
> but after using "fitdistr", I got the result below
>
> >fitdistr(mydata,"normal")
> mean sd
> NA NA
> (NA) (NA)
>
> the help doc of "fitdistr" does not mention anything about that, thus I need
> your help.
>
> Thank you in advanced,
> Saji from Shanghai
Hi Sajj,
You hava NA in your data
try: fitdistr(na.exclude(mydata),"normal")
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
More information about the R-help
mailing list