2
$\begingroup$

I have a set of data and I'd like to know whether this data set has a logistic distribution. When I made a histogram of my data set it seems to have a logistic distribution, but to be sure I'd like to test for a logistic distribution in R. enter image description here
So my question is: Is there a way to test your data for a logistic distribution in R and how do you do this?

Additional information: The data set consists of 8544 items. The data are horizontal distances in km between 2 geographical points. I need the data to construct a dispersal kernel for elephants. I could construct this dispersal kernel more easily if the data had a normal or a logistic distribution. I already used a Kolmogorov Smirnov test to test for a normal distribution (p<0.05), but the result was significant, so the data are not normally distributed.

$\endgroup$
3
  • 2
    $\begingroup$ A number of distributions will fit this bill. Two other candidates that come to mind are Weibull and Poisson distributions. Googling "how to fit a distribution in r" spits out this pdf: cran.r-project.org/doc/contrib/Ricci-distributions-en.pdf $\endgroup$ Aug 6, 2012 at 10:09
  • 1
    $\begingroup$ User, could you please say some more about what this kernel means and how you intend to use it? One of my concerns (among many) is that if you use a fitted curve to these data for the radial function of the kernel, then (because it is in two dimensions, not one) the actual distribution created by applying this kernel will (strongly) differ from the observed distribution! $\endgroup$
    – whuber
    Aug 7, 2012 at 14:47
  • 1
    $\begingroup$ The data you have shown us CANNOT be logistic, the logistic distribution is symmetric, so at most your data could be half-logistic! $\endgroup$ Aug 8, 2012 at 4:38

1 Answer 1

5
$\begingroup$

I'm not sure what makes you think this may be the logistic distribution, it doesn't really look like that to me. I'm not sure how good I am at just guessing the distribution from a picture, but I might start by playing with something like the exponential distribution or the $\chi^2$ distribution, given your histogram.

There are a couple of possibilities for assessing whether your data come from a given distribution. My typical preferred strategy is to assess this graphically using a qq-plot. In R, the car package has a really nice augmented version, ?qq.plot, that you can use with different distributions besides just the normal, and which will plot a confidence band for you as well. I've never tried it with the logistic, but it may be possible. For a statistical test, the Kolmogorov-Smirnov test can be used for more than just the normal distribution as well; in R the function would be ?ks.test, although again, I've never used it to check the logistic distribution. In both cases, R's root name for the logistic distribution is "logis".

Something else you might want to look into is the package fitdistrplus, which has a lot of nice options for examining distributions. Of course, its raison d'etre is determining parameters by maximum likelihood, but it goes well beyond that. The vignette offers a nice tutorial for the package and exploring distributions more generally.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.