# How to test for significant 2D movement including distance and direction?

We performed a controlled experiment where the experimental units are aquariums with either no treatment or application of a treatment with several replicates of each. Within the aquariums, there were multiple species of which I am interested in whether they are located in a different location in the controls vs. the treatment aquariums. I have data of counts of species from 6 locations in aquariums. I used the counts to approximate their location in two dimensions by looking at the proportion near the surface or bottom, and proportion near the side or center.

Example data:

How do I test if there is an effect of treatment on the position of a species in this 2D space, specifically did it move in response to treatment? How would I test that Species A moved in a different direction than Species B in response to treatment?

One suggestion I was given was to treat the counts at each depth as a contingency table and then use a log linear model to fit the data. I am not familiar with this approach and am wondering how I would apply it.

On the plot: when Y = 0, the animals are located on the bottom, not the surface; when X = 0, the animals are on the side, not the center. On the plot, the small open circles are the Control replicates and the small closed circles are the Treatment replicates. The large circles are the group averages. The colors represent two different species. The arrows are just there to highlight the movement I am interested in.

• So if I understand correctly, you have both control and treatment for two species, and you are interested in whether the treatment group is in a statistically significant different location from control (it does not make sense to talk about movement given these were all taken at the same time)? Also where is the count data / proportions? What exactly does your data look like? Can you post a sample of it in the question? – user2974951 Feb 19 at 7:58
• @user2974951 Thank you, I added example data to the post. Correct, I am interested in whether the Treatment group is in a statistically different location from the Control. However, I am also interested in thinking about quantifying the movement. You are correct when you said these were taken at the same time and in different aquariums - but I am thinking if the Control represents where the animals would be located without treatment, the different location within the Treatment group represents a direct response (e.g, move towards the surface) to treatment. – user9218 Feb 25 at 20:31
• First thing that comes to mind is a regular linear model. In it you can test whether the x and y coordinates are different between the groups. So you may for example figure out that the x coordiantes are different but the y coordinates are not. – user2974951 Feb 28 at 18:55