[R] threshold distribution
jim holtman
jholtman at gmail.com
Sun Apr 5 07:13:01 CEST 2009
Here is what I get from using 'fitdistr' in R to fit to a lognormal.
The resulting density plot from the distribution seems to be a reason
match to the data.
> x <- scan()
1: 0.80010 0.72299 0.69893 0.99597 0.89200 0.69312 0.73613 1.13559
9: 0.85009 0.85804 0.73324 1.04826 0.84002
14: 1.76330 0.71980 0.89416 0.89450 0.98670 0.83571 0.73833 0.66549
22: 0.93641 0.80418 0.95285 0.76876 0.82588
27: 1.09394 1.00195 1.14976 0.80008 1.11947 1.09484 0.81494 0.68696
35: 0.82364 0.84390 0.71402 0.80293 1.02873
40:
Read 39 items
> plot(density(x))
> library(MASS)
> fitdistr(x, 'lognormal')
meanlog sdlog
-0.13480636 0.19118861
( 0.03061468) ( 0.02164785)
> lines(dlnorm(x, -.1348, .1911), col='red')
On Sat, Apr 4, 2009 at 8:30 AM, Abelian <abelian1982 at gmail.com> wrote:
> Dear ALL
> I have a list of data below
> 0.80010 0.72299 0.69893 0.99597 0.89200 0.69312 0.73613 1.13559
> 0.85009 0.85804 0.73324 1.04826 0.84002
> 1.76330 0.71980 0.89416 0.89450 0.98670 0.83571 0.73833 0.66549
> 0.93641 0.80418 0.95285 0.76876 0.82588
> 1.09394 1.00195 1.14976 0.80008 1.11947 1.09484 0.81494 0.68696
> 0.82364 0.84390 0.71402 0.80293 1.02873
> all of them are ninty.
> Nowaday, i try to find a distribution to fit those data.
> Firstly, I normalize the data, i.e.. (x-mean(X))/(sd(X))
> i utilize the SAS to fit my data. Then i obtain the result below
> ##-------------------------------------------------------------------------------------------------------------
> Parameters for Lognormal
> Distribution
>
> Parameter Symbol
> Estimate
>
> Threshold Theta
> -1.51062
> Scale
> Zeta 0.237283
> Shape Sigma
> 0.593481
>
> Mean
> 0.001321
> Std
> Dev 0.982435
> ##-------------------------------------------------------------------------------------------------------------------
> however, i confuse about the threshold parameter..
> How to get it? Does it be able to be calculated by R?
> Thanks a lot......
>
> ______________________________________________
> 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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem that you are trying to solve?
More information about the R-help
mailing list