I conducted an animal survey along 4 transects (1000 m each) where I also measured and identified all of the trees. I then repeatedly sampled these 4 transects daily, counting the animals when they were encountered.

What I want to do:

Run a generalized linear mixed model where I split each transect into 2 portions (m 0-400 vs m 400-1000) using the transects as my subjects.

My issue in the data set up:

If I consider each transect to be 2 individual transects (0-400 and 400-1000) I can easily set up a repeated measures design for the animals sampled (this would be 2 rows long per original full transect, 1 row for 0-400 and another for 400-1000).

The problem I have is when I want to look at tree size as a covariate. In the set-up just mentioned I have to then calculate the average tree size for each interval (0-400 and 400-1000) and enter it as a single number for each. SPSS then treats each group of trees described by these means as a single tree (so if 0-400 has 50 trees that average a 75 in size my data reflect the average but neither the number sampled nor the standard error). I lose a lot of information this way.

What I would like to do is have the data be a full list of the original tree data where for replicate 1 of trail 1 I can have 50 lines (1 for each tree) and then add the animal data in another column where I list the count next to, say, the first tree in every replicate (and zero-fill the rest for replicate 1 of trail 1).

SPSS doesn't seem to be able to handle this - I get an error message saying that my repeated measures ids are not all unique because I have 50 instances of replicate 1 (and 2, 3, 4, etc).

Does anyone know of a way around this? I don't like the idea of losing resolution in my covariates.

Thanks for your help.

Bryan