Testing for equality of multivariate distributions I have two distributions $F$ and $G$ that I conjecture to be identical, mathematically. Essentially, before investing time in mathematically proving that $F$ and $G$ are equal, I'd like to sanity check it by doing a simulation experiment. 
So, given that I can easily simulate $X_i \sim F$ and $Y_i \sim G$, I'd like some test that checks $F = G$. The $X_i$ and $Y_i$ live in $\mathbb R^p$, and I'm in the process of checking that the marginals are equal in distribution by simulating many data-sets and checking that the Kolmogov-Smirnov test statistics are approximately uniformly distributed, but I'd like some assurance that I'm not being deceived by just looking at the marginals. 
In addition to the marginals, I'm checking the distribution of the principal components of the generated data/some nonlinear transformations of the data, and so far everything points to equality. 
If someone could point me to a method - hopefully with an existing implementation in R, or otherwise something easy to implement - that would be fantastic. 
EDIT: To be clear, I'm asking for a multivariate test. I know the marginals aren't sufficient, I'm only checking them because if the marginals don't match then I don't need to check the joint. 
 A: I'll list a couple things that have been useful in my own research:
First - have you considered the Hotelling's T-squared test?
http://en.wikipedia.org/wiki/Hotelling's_T-squared_distribution
(for some reason the apostrophe throws off the link given above, so you'll have to copy and paste into the address bar)
This is the multivariate generalization of the standard t-test between two groups. An R implementation of this test is given in the R package Hotelling.
However, If you don't want to make any distributional assumptions in your data you could also use a permutation test such as the Multi Response Permutation Procedure (MRPP) which is a distance based permutation procedure. There's an R implementation of this in the vegan package. Look for the mrpp function. I would recommend keeping the default at euclidean distance, but you can note that using squared euclidean distance would be equivalent to basing the permutation test on the Hotelling T-Squared statistic if you feel more comfortable with that.
Between the two things I mentioned - I would recommend using the MRPP test more strongly.
