05-01-2017 12:42 PM
Is there a way to conduct a bivariate Kolmogorov-Smirnov test in SAS? That is, I want to know if two or more samples differ in their bivariate probability distributions. For example, do genotypes differ in the *combinations* of temperature and moisture that they germinate in? NPAR1way allows comparisons of temperature distributions or moisture distributions separately, but I'd like to compare the bivariate distributions.
05-01-2017 02:29 PM
I don't think bivariate K-S tests are available, but there are other options, mostly from the field of spatial data analysis. If you can upload your data, we might have more to suggest.
I assume you have a set of (x,y) pairs for each sample. There are many ways to analyze spatial point patterns in SAS. The SPP procedure in SAS/STAT enables you to graph the empirical distribution of nearest-neighbor distances between points in a point pattern. There are many distance functions that you can choose to compute. PROC SPP also enables you to model the intensity (=density) of the points. However, the GOF tests in PROC SPP tend to be for comparing data to theoretical models, rather than the nonparametric comparison of two patterns.
05-02-2017 08:51 AM
It seems that you want perform MANOVA .
Check the example of GLM in documentation.
model temperature moisture =group/ nouni;
05-02-2017 09:19 AM
Thanks! The data are highly non-normal, though (and can't be transformed to normality), so I need a non-parametric test. Otherwise, GLM would be OK for some analyses. Also, I'm interested in the higher moments of the distribution as much as the first.
05-02-2017 03:37 PM
Have you looked at Proc NPAR1Way and the Exact test statement with the EDF option?
EDF produces Kolmogorov-Smirnov D statistic for two-sample data.
05-02-2017 03:49 PM
I have never heard about a two-dimensional K-S test. I dont think there is any theory on the distribution of the test statistic.But don't give up!
Lets say you want to make a K-S test of whether a set of coordinates comes from a bivariate N(0,I) distribution. You can then simulate the distribution of the test statistic. You simply simulate n bivarite N(0,I) distribution, find the max value of the difference from the empirical distribution function distribution function of a twodimensional bivarite N(0,I) . Do that many times (1000 at least) and you then have the distribution of the test-statistic. Then compare your value with the simulated distribution to get a p-value.
05-03-2017 08:38 AM
Emm. Maybe you need some data simulation skill. Check this and you can expand it into multiple variables scenario easily . http://blogs.sas.com/content/iml/2014/11/21/resampling-in-sas.html