When is a variable to be treated a random or fixed? In the previous example, we declared the subject effect to be random and the pill type to be fixed. If we go back to all the classification diagrams we drew for multilevel models, it was the levels in the hierarchy that would be random. Consider the back pain example.

Four level structure of follow-up nested within patient nested within physician nested within hospital

Four level structure of follow-up nested within patient nested within physician nested within hospital

The repeated measures at level one form the random responses to treatment, the patients at level two would show up as a patient effect in the model to induce correlations on the repeated measures on the same patient, and the physicians would get a random physician effect two model correlations between patients who use the same doctor. In general, an effect is considered random if it’s units can be regarded as a random sample from a wider population. For example, the patients within doctors represent a sample from a wider population of patients and doctors within hospitals represent a random sample of doctors from a wider population of doctors. But considering whether a hospital type, state or private, would not be random since there is no wider population of hospital types. There are only two types of hospitals, so hospital type would be a fixed effect, and it would not appear in our diagram (but could be included in the model as a fixed effect).

The following decision tree may help you decide in practice whether a factor should be declared random or fixed.

Decision tree for random vs fixed factors

Decision tree for random vs fixed factors

The inclusion of a random effect has several important ramifications:

Exercise: Random or Fixed

A study was conducted to see if new training for nurses resulted in a improved quality of nursing and residential care at nursing homes. A study of 100 nursing homes were randomized to either the intervention or no intervention training for the nurses. Within each nursing home, the residents were periodically surveyed on their experience in the nursing. This was used to determine the level of satisfaction score with the patient care.

  1. Determine if the following variables should be random or fixed effects?
    1. Nursing Home
    2. Gender of patient
    3. Patient
    4. Satisfaction score
    5. Ethnicity of patient
    6. Patient’s age
  2. Sketch the classification diagram for this data to illustrate it’s structure.

Exercise: Hospital Efficacy

Suppose we have health outcome scores on 10,000 individuals treated in 100 hospitals and we have measurements on sets of patients in a hospital for the years:

The health outcome score is measured on a scale of 0 to 10 where 10 indicates that the patient had fully recovered after receiving treatment and 0 indicates that the patient died. Each patient is only treated once and therefore does not occur in the data for more than one year.

We are interested in seeing how stable hospitals are over time with respect to treating patients.

  1. Determine if the following variables should be random or fixed effects?
    1. Hospital
    2. Gender of patient
    3. Patient
    4. Year patient was hospitalized (Cohort)
    5. Year hospital was built
    6. Patient’s age
  2. Sketch the appropriate multilevel structure for this data.