I am investigating how sea temperature affects the total length of a species, which has a one year life span, presents sexual dimorphism, and migrates over a considerable area from north to south.
I have length data (response variable) from the southern end of the migration, for one month, over a 20 year period, essentially this sums up to 20 data points (mean length of one per year), per sex, where we know the relative stage of development of the animals would be towards the end of their growth i.e. we get them at the end of their growth, few months before they spawn and die.
I have temperature data, which covers the presumed migration route, consisting of 24 location boxes, and covering 12 months, for the span of 20 years.
Data Structure is as follows, might make more sense in a diagram:
I used this data to run 240 basic linear models of mean Length vs mean Temperature, the models were ran per location box, per month, per sex.
I am now looking to extend my analysis by using a mixed effects model, which attempts to account for the temporal (months) and spatial (location boxes) autocorrelation in the dataset. I intend to fit the location boxes and months as random effects. Currently, this is how the dataset is organised:
Year Month Box meanT Sex meanL 1999 01 1B 10.89 F 25.51 1999 02 1F 15.36 F 25.51 2000 01 1B 11.32 F 27.34 2000 02 1F 17.38 F 27.34 2001 01 1B 20.53 F 23.32 2001 02 1F 19.33 F 23.32
meanT - mean Temperature
meanL - mean Length (response variable)
Where the 20 mean length data points are repeated for each location box, and each month. To be more specific, these are all the same length measurements, they are not samples from each location box or each month.
My question is, I assume that I cannot run a mixed effects model on the data like this, but I am unsure how to structure the data, do I need to remove some of the location boxes?
In a nutshell, I have 20 data points for my length variable, and 9600 data points for my temperature variable. Is it at all possible for me to apply a mixed effects model to this type of data? P.S. It is not possible for me to obtain data for the animals in each location box, duting the migration, nor is it possible for me to have data for each month from the same location, as their development straddles the year and I have chosen the time where we consistently have data for 20 years.