[R] Lognormal distribution
Dr Andrew Wilson
eia018 at comp.lancs.ac.uk
Tue Dec 10 13:26:02 CET 2002
I am trying to fit a lognormal distribution to a set of data and test its
goodness of fit with regard to predicted values.
I managed to get so far:
> y <- c(2,6,2,3,6,7,6,10,11,6,12,9,15,11,15,8,9,12,6,5)
> library(MASS)
> fitdistr(y,"lognormal",start=list(meanlog=0.1,sdlog=0.1))
meanlog sdlog
1.94810515 0.57091032
(0.12765945) (0.09034437)
But I would now also like to generate the predicted values, so that I can
make a comparison using e.g. the Cramer test in the cramer package.
I'd also like to plot the curves for both sets of values.
Could anyone help me with these two points?
Many thanks,
Andrew Wilson
More information about the R-help
mailing list