0

i would like to plot a histogram of a dataset and the plot of the fitting lognormal distribution - I only see the histogram and not the distribution function...

hist(kmugesamt, prob=TRUE)
curve(plnorm(x, mean=mean(kmugesamt), sd=sd(kmugesamt)), add=TRUE)

Many thanks in advance

Math_Man1
  • 77
  • 8
  • 1
    Hi, but I would like to fit a special curve - not the best fitting curve per se maybe – Math_Man1 Jan 08 '19 at 09:39
  • 1
    Hi, we can't do much with your code if you don't [provide any data](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610). – jay.sf Jan 08 '19 at 10:05

1 Answers1

0

Does this help?

k<-rlnorm(1000)
hist(k, freq=F)
curve(dlnorm(x, mean=mean(k), sd=sd(k)), add=TRUE)