2
$\begingroup$

For years, I have been trying to find a definition for fixed and random effects. I often see statements like this:

  • Fixed effects are constant across individuals. - almost universal
  • We define effects (or coefficients) in a multilevel model as constant if they are identical for all groups in a population... - Andrew Gelman
  • Parameters that describe the effects of a factor in ordinary GLMs are called fixed effects. They apply to all categories of interest, such as genders or treatments. - Alan Agresti

To put it simply: If a variable is categorical, how can its effect be constant for all individuals/groups? Each category has its own estimation, therefore at the first glance, I see an effect being constant only within the particular group.

For more background: I can (hopefully) understand the definition holds true in simple linear regression. In this simplest FE model, we estimate one intercept and one slope that apply to all observations. (As opposed to a mixed model, where I would allow the intercept/slope to vary according to a grouping factor.)

However, I am struggling to project the definition into a slightly more complex scenario, like this one:

  • Let us say we measured the height two plants, both of them at five time points. [The data I used: 100, 101, 103, 104, 105 for plant_A; 85, 88, 93, 98, 102 for plant_B.]
  • Even though I probably violate some assumptions, I can still run general linear model...
  • height = plant_ID (class) + time (covariate)
  • FE solutions: b0 = 84.65; b1 (time) = 2.85; plant_A = 9.40; plant_B = 0.00
  • Time is still constant accross all the observations. However, I would say the effect of plant_A only influences the measurements within that class. In other words, the effect ("the class intercept") varies from class to class, which in my mind defies the definitions.

To wrap my head around it, I am trying two explanations, but I do not know if at least one of them is correct:

  1. Every categorical variable can be transformed to dummy variables, which in this case would lead to an equation: y = 85.65 + 2.84*x1 + 9.40*x2 + 0.00*x3, where x1 is time, x2 is plant_A (zeros and ones), x3 is plant_B (zeros and ones). Then, I can say that all the coefficients are constant for all individuals. The only particularity is that the coefficients b2 (9.40) and b3 (0.00) are "switch on/off" depending on the class an individual happens to fall in.
  2. The "constant effect" means the degree of change when going from group_A to group_B (-9.40 cm in this case). This effect would influence each observation changing its group with the same intensity and direction. (Perhaps a more semantic explanation based on the previous one.)

I would like to add that I have read the major topis regarding mixed models on this forum and I have learned a lot from them, but this is still causing me a headache. So, I would really appreciate direct replies.

$\endgroup$
4
  • 2
    $\begingroup$ Note that neither Gelman nor Agresti says they are identical for all individuals, Gelman says "groups" and Agresti says "categories". But also note that a huge amount of the terminology about fixed and random effects is confusing. Somewhere in Gelman I read that he prefers not to use those terms. But I don't remember where I read that (and I might be remembering wrong). $\endgroup$
    – Peter Flom
    Commented Apr 6 at 10:43
  • 1
    $\begingroup$ Gelman explained why he does not like FE and RE in his book as well as in this paper: 10.1214/009053604000001048 The fact that he is using "constant coefficients" and "for all groups" does not really help me. All groups encompass all individuals... $\endgroup$
    – opiczak
    Commented Apr 6 at 16:45
  • $\begingroup$ Hmm, nice question. In your example, without interaction, the effect (slope) of "time" on plant height is constant across all observations regardless of their "group". The "group" only affects the intercept and, in that sense, it looks like a random intercept mixed model, right? So calling "group" a fixed effect is confusing... $\endgroup$
    – Fanfoué
    Commented Apr 16 at 13:54
  • $\begingroup$ Group is definitely estimated as a fixed effect. That is the point: it is a FE, but it is NOT constant for all individuals. It only applies to the individuals that happen to be in the category. However, I spoke to some other people and I think my understanding of FE and RE is conceptually right. I still find the definitions confusing, but now I hopefully know what the authors meant. More to this reply below (as a response to Niklas). $\endgroup$
    – opiczak
    Commented Apr 19 at 7:43

2 Answers 2

0
$\begingroup$

I am not sure if I fully understand your question, but imagine that instead of having plant as category (A/B) you had two identical plants but the variable was "put on a small pedestal of 9.4 units that was included in the measurement" as your variable (yes/no). That change would affect all observations in each category (shifting the mean by 9.4 if yes was coded as 1 and no as 0). That would be a fixed effect affecting the mean of the measurement. Time does not have an effect on this.

$\endgroup$
3
  • $\begingroup$ Hello Niklas and thank you for your answer. I think you understand my question and it is exactly what I wanted to express by using dummy variables. Or, it could be said that even a model with multiple predictors (both continuous and categorical) could be written in matrix notation as: y = Xb + e. The definitions still seem confusing to me ("identical coefficients for all groups"), but they should probably mean that I have some coefficients universal for all individuals at once and some fixed degree of change when going from A to B (yes to no). To be continued... $\endgroup$
    – opiczak
    Commented Apr 19 at 7:58
  • $\begingroup$ It feels like these definitions require really deep statistical understanding. Also, I perhaps have the issue because of tendency to see solutions for random effects as well (BLUPs). However, it comes down to what is primarily estimated. For a FE, I am able to directly estimate the intercept/slope (hence, they are firmly set). Whereas for a RE, I firstly estimate the distribution according which the intercept/slope can move (= vary). The fact that I can get specific solutions for RE is a different chapter... Or am I completely lost now? $\endgroup$
    – opiczak
    Commented Apr 19 at 8:08
  • 1
    $\begingroup$ It is not the value of the variable that is constant across all individuals. The effect of the variable is constant, i.e how the estimated mean changes depending on the value of the variable. $\endgroup$
    – Niklas
    Commented Apr 21 at 19:01
0
$\begingroup$

I think you could best understand this by looking at it from the standpoint of old school social-scientific statistical analysis.

You have a sample of the population and data reported by each individual in the sample. One data point about each person is ASSIGNED SEX AT BIRTH = make/female. (Pardon my retrogressive framing but assigned at birth is a fact no matter your attitude toward it.)

This is a Fixed Effect. And it’s binary, which means it can be measured as a dummy variable.

The AGE of each person, however, is a Random Effect, because it will vary in a normally distributed manner across your sample—almost certainly, if large enough. Same for health status or other biometric data points.

FEs with spatial data: Person 1 in the sample lives in REGION or LOCATION, or not, or categorically, yes or no, across a range of LOCATIONs or REGIONs or CIT(ies) or whatever the spatial dimension of measurement of hypothesized Fixed Effects of a particular place on a range of socioeconomic outcomes. For example, for decades, US SOUTH = yes/no, has been a Fixed Effect feature of cross-regional income studies in the US.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.