# Permutation testing for simulated compositional data

I'm testing some methods for estimating correlation in compositional data. As part of this process, I'm using the following approach:

1. simulate un-normalized features $$Y$$
2. normalize features for each sample to get compositional data $$X$$
3. attempt to estimate correlation of $$Y$$ from $$X$$
4. calculate false positive/negative rates

I'm exploring using a permutation test to identify significant correlations (my positives). Should I be permuting my data before or after normalizing it (step 2)?

• Exactly how are you "normalizing features"? Evidently you're doing it in some way that depends on the sequence of observations, for otherwise there wouldn't even be a question here. But what way would that be? – whuber Feb 10 at 22:33
• It's compositional data, so for each sample, the set of features are scaled to have fixed sum. So if I have samples in rows and features in columns, $X$ is generated by, e.g. dividing each row of $Y$ by its own sum so that rows sum to $1$. – Empiromancer Feb 11 at 1:42
• Right: so if you are permuting either rows or columns (or even both), obviously it makes no difference whether such normalization is carried out before or after the permutation (except insofar as it's more efficient to do it once and for all before conducting a set of permutations). – whuber Feb 11 at 13:04
• @whuber I wasn't imagining that I'd permute either the rows or the columns. Rather, I was imagining separately permuting the entries within each column. That's the idea of a permutation test, right? If I permuted the rows/columns, I wouldn't be breaking the dependence between columns like I'm supposed to, no? Unless I'm misunderstanding how to do a permutation test for the entries of a correlation matrix, as you describe in your answer to stats.stackexchange.com/questions/5750/… – Empiromancer Feb 11 at 18:49
• Exactly. But if you separately permute entries within the column, then it's hard to see how your question can possibly even arise, because (obviously) that breaks the sum-to-unity condition. I wonder whether a correlation analysis really is a good choice for compositional data in the first place, but the answer to that would depend on what you're trying to accomplish. – whuber Feb 11 at 20:10