[R] fitting a distribution to a ecdf plot
ranmaaa
dswith_st at yahoo.co.id
Mon Nov 28 04:34:05 CET 2011
I wanna get the x and y value of the QQ-plot from this plotdist function.
What should I do..??
Thank you
Kind regards,
Rahma
djmuseR wrote
>
> Hi:
>
> The fitdistrplus package from CRAN may be useful. I tried it on your data
> and the lognormal seemed to fit well, apart from the outlier. I just
> followed the vignette that accompanies the package.
>
> library(fitdistplus)
>
> plotdist(NOEccu) # ecdf
> descdist(NOEccu, boot = 1000) # Cullen-Frey graph based on 1000
> bootstrap samples
>
> # The Cullen-Frey graph suggests that the distribution is somewhere
> between
> a Gamma and lognormal
>
> # Weibull
> N1w <- fitdist(NOEccu, 'weibull')
> # Warning messages:
> # 1: In dweibull(x, shape, scale, log) : NaNs produced
> # 2: In dweibull(x, shape, scale, log) : NaNs produced
> plot(N1w)
> summary(N1w)
>
> # Gamma
> N1g <- fitdist(NOEccu, 'gamma')
> # Warning messages:
> # 1: In dgamma(x, shape, scale, log) : NaNs produced
> # 2: In dgamma(x, shape, scale, log) : NaNs produced
> # 3: In dgamma(x, shape, scale, log) : NaNs produced
> # 4: In dgamma(x, shape, scale, log) : NaNs produced
> plot(N1g)
> summary(N1g)
>
> # Lognormal
> N1l <- fitdist(NOEccu, 'lnorm')
> plot(N1l)
> summary(N1l)
>
> Try it out and see if it suits your needs.
>
> HTH,
> Dennis
>
>
> R-help@ 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.
>
--
View this message in context: http://r.789695.n4.nabble.com/fitting-a-distribution-to-a-ecdf-plot-tp3357015p4114075.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list