Dear all,
I'm trying to estimate the parameters of a lognormal distribution fitted
from some data.
The tricky thing is that my data represent the time at which I recorded
certain events. However, in many cases I don't really know when the event
happened. I' only know the time at which I recorded it as already happened.
Therefore I want to fit the lognormal from the cumulative distribution
function (cdf) rather than from the probability distribution function (pdf).
My understanding is that methods based on Maximum Likelihood (e.g. fitdistr
{MASS}) are based on the pdf. Nonlinear least-squares methods seem to be
based on the cdf... however I was unable to use nls{stat} for lognormal.
I found a website that explains how to fit univariate distribution functions
based on cumulative probabilities, including a lognormal example, in Matlab:
http://www.mathworks.com/products/statistics/demos.html?file=/products/demos/shipping/stats/cdffitdemo.html
and other programs like TableCurve 2D seem to do this too.
There must be a straightforward method in R which I have overlooked. Any
suggestion on how can I estimate these parameters in R or helpful references
are very much appreciated.
(not sure if it helps but) here is an example of my type of data:
treat.1 <- c(21.67, 21.67, 43.38, 35.50, 32.08, 32.08, 21.67, 21.67, 41.33,
41.33, 41.33, 32.08, 21.67, 22.48, 23.25, 30.00, 26.00, 19.37, 26.00
,
32.08, 21.67, 26.00, 26.00, 43.38, 26.00, 21.67, 22.48, 35.50, 38.30,
32.08)
treat.2 <- c(35.92, 12.08, 12.08, 30.00, 33.73, 35.92, 12.08, 30.00, 56.00,
30.00, 35.92, 33.73, 12.08, 26.00, 54.00, 12.08, 12.08, 35.92, 35.92
,
12.08, 33.73, 35.92, 63.20, 30.00, 26.00, 33.73, 23.50, 30.00, 35.92
,
30.00)
Thank you very much!
Ahimsa
--
ahimsa campos-arceiz
www.camposarceiz.com
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.