title: Using One Sample Kolmogorov Smirnov Test in R for in-group Variation/ Distribution
body: <p>I am trying to find the in-group variation for vocal parameters 'Low.Frequency' 'High Frequency' etc. within the parasitic and non-parasitic groups of my data to compare them. Since my dataset is very big, here is the structure of the dataset.</p>
  <pre><code>&gt; str(mydata)
  'data.frame':   1065 obs. of  7 variables:
   $ Cuckoo.Sp.     : Factor w/ 79 levels &quot;&quot;,&quot;African Cuckoo (Cuculus gularis)&quot;,..: 74 1 1 1 1 1 57 1 1 1 ...
   $ Parasitism     : Factor w/ 2 levels &quot;Non-Parasitic&quot;,..: 2 2 2 2 2 2 2 2 2 2 ...
   $ Low.Frequency  : num  2256 2071 2223 2052 2227 ...
   $ High.Frequency : num  3802 3930 3752 3874 3869 ...
   $ Delta.Frequency: num  1546 1860 1529 1822 1642 ...
   $ Delta.Time     : num  0.486 0.445 0.422 0.451 0.538 0.474 0.678 0.76 0.747 0.752 ...
   $ Peak.Frequency : num  3000 2842 2950 2842 3165 ...
  
  </code></pre>
  <p>As the data is not normally distributed and involves only two categorical groups i've been advised to do a ks.test instead of an ANOVA and this test is also the test used by a previous study conducted with very similar data. However i'm struggling to figure out how to conduct this test. I subsetted my data into &quot;Parastic&quot; (para) and &quot;Non-Parasitic&quot; (nonpara) groups and ran this code:</p>
  <pre><code>&gt; ks.test(nonpara$Low.Frequency, &quot;pnorm&quot;,alternative=&quot;two.sided&quot;,exact=NULL)
  
          One-sample Kolmogorov-Smirnov test
  
  data:  nonpara$Low.Frequency
  D = 1, p-value &lt; 2.2e-16
  alternative hypothesis: two-sided
  
  Warning message:
  In ks.test(nonpara$Low.Frequency, &quot;pnorm&quot;, alternative = &quot;two.sided&quot;,  :
    default ks.test() cannot compute correct p-values with ties;
   see help page for one-sample Kolmogorov test for discrete distributions.
  &gt; ks.test(para$Low.Frequency, &quot;pnorm&quot;,alternative=&quot;two.sided&quot;,exact=NULL)
  
          One-sample Kolmogorov-Smirnov test
  
  data:  para$Low.Frequency
  D = 1, p-value &lt; 2.2e-16
  alternative hypothesis: two-sided
  
  Warning message:
  In ks.test(para$Low.Frequency, &quot;pnorm&quot;, alternative = &quot;two.sided&quot;,  :
    default ks.test() cannot compute correct p-values with ties;
   see help page for one-sample Kolmogorov test for discrete distributions.
  </code></pre>
  <p>My issue is is that i'm getting very low P-values and a D value of 1 which don't think is right. Any help would be appreciated or suggestions of alternative tests. I haven't had much contact with my universty due to covid or any assistance from people that are meant to help me and am struggling unfortunately.</p>