I would like to compute one sided kolmogorov-smirnov test using the PROC NPAR1WAY procedure.
Specifically i want to test 2 distributions of real vs. estimated values, but i am not able to distinguish what distribution corresponds to F1 and which corresponds to F2 and i don't understand which criteria SAS uses to determine which values are F1 and F2.
The output is attached.
Thank you!
Please show the code you are using. Best is to post code into a code box opened with either the </> or "running man" icons to preserve formatting. The code is sort of important to know which options were used.
I don't know what you did to make that docx document to attach but it is ugly. You might consider creating an ODS document from SAS instead if you did some form of copy and paste. The result you show is actually sort of hard to read because the columns do not align.
ods graphics on; proc npar1way edf plots=edfplot D data= T1_emp.T1_empresas_gov_teste1; class chave; var vol; OUTPUT OUT= result_teste_gov1; run; ods graphics off;
This is the code that i am using.
the results are:
Kolmogorov-Smirnov Two-Sample Test (Asymptotic) D = max |F1 - F2| 1.0000 Pr > D <.0001 D+ = max (F1 - F2) 1.0000 Pr > D+ <.0001 D- = max (F2 - F1) 0.0000 Pr > D- 1.0000 Cramer-von Mises Test for Variable vol Classified by Variable chave chave N Summed Deviation from Mean Estimado 10 0.83750 Observado 10 0.83750 Cramer-von Mises Statistics (Asymptotic) CM 0.083750 CMa 1.675000 Kuiper Test for Variable vol Classified by Variable chave chave N Deviation from Mean Estimated 10 1.0 Observed 10 0.0 Kuiper Two-Sample Test (Asymptotic) K 1.000000 Ka 2.236068 Pr > Ka 0.0017
The PROC NPAR1WAY doc has an example similar to what you describe.
Using the EDF option triggers the empirical distribution function tests, which includes the K-S test.
F1 is the distribution of the first class level; F2 is the distribution of the second class level. The first level is shown on the first row of the table of K-S statistics; the second level is on the second row.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.