Re: [R] Estimating parameters of log-normal distribution

From: Gunther Höning <gunther.hoening_at_ukmainz.de>
Date: Mon, 30 Jun 2008 14:42:42 +0200

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

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. Received on Mon 30 Jun 2008 - 12:49:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 30 Jun 2008 - 14:30:49 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive