Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-18 Thread Frede Aakmann Tøgersen
the sender. -Original Message- From: Rolf Turner [mailto:r.tur...@auckland.ac.nz] Sent: 17. januar 2014 22:47 To: Vito Ricci Cc: Frede Aakmann Tøgersen; Göran Broström; r-h...@stat.math.ethz.ch Subject: Re: [R] Estimating parameters of 3 parameters lognormal distribution Can you

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-18 Thread Prof Brian Ripley
. -Original Message- From: Rolf Turner [mailto:r.tur...@auckland.ac.nz] Sent: 17. januar 2014 22:47 To: Vito Ricci Cc: Frede Aakmann Tøgersen; Göran Broström; r-h...@stat.math.ethz.ch Subject: Re: [R] Estimating parameters of 3 parameters lognormal distribution Can you please tell us (me

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-18 Thread Vito Ricci
Hi Rolf, I fit 3 parameters lognormal in this way myf-function(x,m,s,t)(1/((x-t)*s*(2*pi)^0.5))*exp(((-(log(x-t)-m)^2)/(2*s^2))) then fitdistr(y, myf, list(m=1,s=1, t=2)) I choose initial parameters value seeing data, I noted that a goog estimate of t would be 2...Me too I've some errors,

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-18 Thread peter dalgaard
Offhand, I'd say that the issue isn't so much the starting values as the risk of hitting the upper bound on gamma. If you get gamma set to min(x) at any point during the iteration, the density at the corresponding point is zero, the log-likelihood is -Inf, and poof, the magic smoke escapes.

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-18 Thread Rolf Turner
On 19/01/14 06:20, peter dalgaard wrote: Offhand, I'd say that the issue isn't so much the starting values as the risk of hitting the upper bound on gamma. If you get gamma set to min(x) at any point during the iteration, the density at the corresponding point is zero, the log-likelihood is

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-17 Thread Göran Broström
On 01/17/2014 08:42 AM, Vito Ricci wrote: Hi Goran, thanks for your suggestion, but I believe it's not helpful for me... phreg statement Proportional hazards model with parametric baseline hazard(s). Allows for stratification with dif-ferent scale and shape in each stratum, and left

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-17 Thread Frede Aakmann Tøgersen
Emne: Re: [R] Estimating parameters of 3 parameters lognormal distribution Hi Goran, thanks for your suggestion, but I believe it's not helpful for me... phreg statement Proportional hazards model with parametric baseline hazard(s). Allows for stratification with dif-ferent scale and shape

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-17 Thread Vito Ricci
have a look at fitdistr() and tell us if fit your needs.  Br. Frede  Oprindelig meddelelse Fra: Vito Ricci Dato:17/01/2014 08.44 (GMT+01:00) Til: Göran Broström ,r-h...@stat.math.ethz.ch Emne: Re: [R] Estimating parameters of 3 parameters lognormal distribution Hi Goran

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-17 Thread Frede Aakmann Tøgersen
. Please have a look at fitdistr() and tell us if fit your needs. Br. Frede Oprindelig meddelelse Fra: Vito Ricci Dato:17/01/2014 08.44 (GMT+01:00) Til: Göran Broström ,r-h...@stat.math.ethz.ch Emne: Re: [R] Estimating parameters of 3 parameters lognormal distribution Hi Goran

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-17 Thread Rolf Turner
Can you please tell us (me!) how you chose starting values? Out of curiosity I tried the following: set.seed(42) x - rlnorm(100,1,2) + 3 require(MASS) strt - list(mu=1,sigma=2,gamma=3) fit - fitdistr(x,densfun=function(x,mu,sigma,gamma)

[R] Estimating parameters of 3 parameters lognormal distribution

2014-01-16 Thread Vito Ricci
Hi guys, is there in some R package a statement to fit parameters in a 3 parameters lognormal distribution. Many thanks Vito Ricci [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-16 Thread Göran Broström
On 01/16/2014 04:59 PM, Vito Ricci wrote: Hi guys, is there in some R package a statement to fit parameters in a 3 parameters lognormal distribution. Yes, the function 'phreg' in the package 'eha'. Göran Broström Many thanks Vito Ricci [[alternative HTML version deleted]]

Re: [R] Estimating parameters of 3 parameters lognormal distribution

2014-01-16 Thread Vito Ricci
Hi Goran, thanks for your suggestion, but I believe it's not helpful for me... phreg statement Proportional hazards model with parametric baseline hazard(s). Allows for stratification with dif-ferent scale and shape in each stratum, and left truncated and right censored data I've data whose