Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interpreting Output KS test

    Dear all,

    I am Laurens Helsen, currently writing a masterthesis on the topic of firm size distributions. I would like to check if a given variable (log(employment)) has a power law distribution (I am using the cumulative distribution as the theoretical one).
    So the expression I am executing in stata is the following:

    ksmirnov logempl42=thdist42
    where logempl42 is the variable of which I would like to check the cdf and thdist is the theoretical CDF of that variable (that I am assuming)
    this leads to the following output:
    Click image for larger version

Name:	questionstataforum.png
Views:	1
Size:	8.5 KB
ID:	1351511

    Now my question is: what is this output telling me? Since I am using a cumulative, should I look at the cumulative line and use that p-value as the p-value of the nullhypothesis or what are the other lines telling me?
    I have been searching on this topic yet but didn't found a convenient explanation on the output.

    Thank you in advance

    Laurens Helsen

  • #2
    Laurens:
    I would just take a step aside, first.
    Please, see the warnings about using this test in -ksmirnov- entry,Example 2, Stata .pdf manual.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear mr Lazzaro

      Thanks for your answer, I am aware of the problems of using the ksmirnov test.
      I am actually using this test because another paper has been using it and I would like to use the same procedure.

      kind regards
      Laurens

      Comment


      • #4
        Laurens (Carlo is enough; mr Lazzaro is very polite, but makes me feel older than I'm).
        due to the abovementioned warnings for small samples, like yours, I would consider the p-value from the cumulative line (P=0.729).
        For a good explanation of the output from -ksmirnov- I would take a look at the Example 1 in the same entry (even though it refers to a two-sample test).
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo,

          Thank you very much for your answer!

          kind regards
          Laurens

          Comment


          • #6
            Hi!

            I have a similar question, but the previous answers have not helped me yet.
            I want to test whether a discrete variable taking the values 1, 2, 3 or 4 follows a uniform distribution. But I don't know how to interpret the output. What are the three values of c_answer, cumulative, combined K-S? Which one should I use?

            I've read the manual and understood the explanation for the two-sample test. However, the output for the one-sample test looks different.


            So the expression I am executing in stata is the following:

            ksmirnov c_answer = round(runiform(1,4))

            This leads to the following output:


            One-sample Kolmogorov-Smirnov test against theoretical distribution
            round(runiform(1,4))

            Smaller group D P-value
            -----------------------------------
            c_answer: -0.0600 0.698
            Cumulative: -3.9600 0.000
            Combined K-S: 3.9600 0.000

            Thank you very much in advance for your help!

            Comment

            Working...
            X