Random and fixed effects for observational/ecological studies I was wondering if anyone had any insight to offer on the question of deciding which variables are random effects and which are fixed effects for ecological studies that are based on observations in the field rather than variables that have been set in experimental conditions (“treatments”). All the guidance that I have found so far refers to the latter situation rather than the former.
I am studying a particular species of reptile, trying to discover the environmental variables that account for their distribution over my study site. My study involves placing refuges on the ground which attract the reptiles, then I go around and count from the exact same locations each time.
One person that I’ve spoken to says that observations such as the ground temperature, vegetation height, and area of scrub around each of my reptile sighting points should be considered random effects because they haven’t been set by me, I have just recorded them. Whereas anything I have set, such as the refuge material, should be considered a fixed effect.
Someone else I've spoken to says that this is the exact opposite of what should be the case: observations of things that I'm interested in should be the fixed effects (such as the aforementioned environmental variables, and how they affect reptile numbers) and things that I'm not so interested in (but might help to explain my results, such as refuge material) should be the random effects.
Who is right?
One definition of random effects (e.g. Bolker et al (2009) ) is they are factors whose levels are sampled from a larger population, but what is the larger population of temperature? Is it just the temperatures I haven’t measured yet? Over several surveys, I have recorded probably the whole range of interest of temperature, but not all of a variable like angle of slope where I have gaps. Does that make a difference to my treatment of these effects? Also temperature was measured each time, whereas angle of slope was assumed to remain the same each time, as the same locations were surveyed each time. Will that make a difference?
I appreciate the difference is not always clear but I just can't seem to find explanations that refer specifically to ecological or observational situations and would really appreciate some guidance.
 A: What you are studying is entirely a fixed effect model.
In some examples the word "population" or "environment" is related to random effects. For example, you study populations of reptiles where each individual has a known weight. You want to study the effect of the weight on whatever $Y$. And you study several populations (environments) who have unknown (latent) properties that you can't measure. Then, this is a mixed effects model where the fixed effects are about the individual, the random effects are about the population. This is simply because you can measure the variables of an individual, not the variables of the population.
You could have a mixed effects model where things are reversed. You put the same reptile in different places and then measured whatever $Y$ (and repeat this with several reptiles). Then the environment variables, that are measured would be the fixed effects. The individual variables (that are unknown) would be the random effect.
Generally environment/individual are not directly connected to random/fixed. It depends on the situation. The word "population" is used to teach random effects in order to evoke something tangible. But it's more an abstract concept not related to a real notion of "population".
In your case, there are only fixed effects. You measure the variables of the environment and there is no other variable. There is no individual, since you don't measure a variable on each individual, but simply count the number of reptiles. So it's just a fixed effects model. 
Random effect in your case could be time: if for example you make a measurement each season. The "population" (in the abstract sense) would be the season.
