[R] Estimating parameters of log-normal distribution

Gunther Höning gunther.hoening at ukmainz.de
Mon Jun 30 14:42:42 CEST 2008


Hi,

thanks but not exactly.
If you plot x vs. y you will see that the function that fits the data is a
log-normal distribution multiplied with a constant.
So what I want to do is more like a regression..

Estimating parameters to a model..

Gunther

-----Ursprüngliche Nachricht-----
Von: Peng Jiang [mailto:jp021 at sjtu.edu.cn] 
Gesendet: Montag, 30. Juni 2008 14:00
An: Höning, Gunther
Cc: r-help at r-project.org
Betreff: Re: [R] Estimating parameters of log-normal distribution

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