0
$\begingroup$

Do you know how to test, whether a lognormal fit is okay or not - I would like to test in R via statistical tests..

chisq.test(ackmu, p=rlnorm(7.116209, 1.783898), rescale.p=TRUE, simulate.p.value=TRUE)

I want to test if the data 'ackmu' are following a lognormal distribution rlnorm(7.116209, 1.783898) but it isnt working, since i get :

"x and p need to have the same number of elements"

$\endgroup$

closed as unclear what you're asking by Nick Cox, whuber Jan 14 at 23:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ Why not using a test of normality on the log-transformed data? $\endgroup$ – Xi'an Jan 9 at 14:38
  • 1
    $\begingroup$ I'd feed the logarithms to a normal quantile (scores, probability) plot. If someone insists on a test, then Shapiro-Wilk or whatever on the logarithms. Chi-square tests make less sense here as dependent on arbitrary bins and as neglectful of detail. No test is informative on where the fit is good or poor and why. $\endgroup$ – Nick Cox Jan 9 at 14:38
  • $\begingroup$ I did so - the QQ plot seems very wrong , but the PP Plot and also the Plot of CDF seems very accurate ... how is this possible ? $\endgroup$ – Math_Man1 Jan 9 at 14:44
  • 2
    $\begingroup$ The PP plot necessarily tracks from nearly (0, 0) to nearly (1, 1), regardless of how bad the fit is. It's a propaganda tool: look how good the fit is. The QQ plot is more critical. If you're superimposing CDFs then you should be thinking about differences horizontally, not vertically. The QQ plot doesn't have information the CDF plot does have, or vice versa, so apparently different signals are a misreading of the graph. $\endgroup$ – Nick Cox Jan 9 at 14:57
  • 1
    $\begingroup$ How big is the dataset? Can you copy it here? $\endgroup$ – Nick Cox Jan 9 at 15:00