[R] Estimating parameters of log-normal distribution
Peng Jiang
jp021 at sjtu.edu.cn
Mon Jun 30 14:00:06 CEST 2008
Hi, Gunther,
maybe fitdistr() in MASS library can do the job ,
the code should be
>library(MASS)
> fitdistr( x, densfun = "log-normal")
by using your data we can obtain the parameters ,
meanlog sdlog
2.5808007 1.2999517
(0.3752637) (0.2653515)
is that what you want?
On 2008-6-30, at 下午5:26, Gunther Höning wrote:
> Dear list,
>
> I have to vectors:
>
> x <- rep(c(2,4,8,24,48,72),2)
> y
> <-
> c
> (82543,169105,207615,96633,31988,7005,82687,172931,205541,101842,31898,69
> 50)
>
> that follows a log-normal function as
>
> f(x)= SO/(sqrt(2*pi)*sigma *x) * exp(-(ln x - mu)^2/(2*sigma^2))
>
> that is a log-normal distribution multiplied with SO.
>
> How can I estimate SO, mu and sigma in R ?
>
>
> Wishes
> Gunther
>
> ______________________________________________
> 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.
-----------------------------------------------
Peng Jiang 江鹏 ,Ph.D. Candidate
Antai College of Economics & Management
安泰经济管理学院
Department of Mathematics
数学系
Shanghai Jiaotong University (Minhang Campus)
800 Dongchuan Road
200240 Shanghai
P. R. China
More information about the R-help
mailing list