Random (Partially Pooled) Effects vs. Fixed Effects (Non Pooled)

Hierarichal models make use of both fixed and random effects in the following form:

\[\overbrace{\mathbf{y}}^{\mbox{1075 x 1}} \quad = \quad \overbrace{\underbrace{\mathbf{X}}_{\mbox{1075 x 4}} \quad \underbrace{\boldsymbol{\beta}}_{\mbox{Fixed Effect Coefficients}}}^{\mbox{1075 x 1}} \quad + \quad \overbrace{\underbrace{\mathbf{Z}}_{\mbox{1075 x 464}} \quad \underbrace{\boldsymbol{u}}_{\mbox{Random Effects}}}^{\mbox{1075 x 1}} \quad + \quad \overbrace{\boldsymbol{\varepsilon}}^{\mbox{1075 x 1}}\]

Fixed Effects (No Pooling)

Fixed effects do not use pooling (described below).

We have three fixed effects:

  1. TIME_SINCE_ADMISSION
  2. FIRST_CAREUNIT
  3. CG_DESCRIPTION

Random Effects

Random effects use pooling (described below).

We have one random effect:

  1. CGID (or Clinician)

Data

We will use our NQF data.

dat <- read.csv("~/nqf_caregivers/data/NQF_Att_Res_03Jun18.csv", 
                header = T, stringsAsFactors = F)

Subsetting and Summary

## Subset only what we need
tmp <- dat[(dat$CGID %in% levels(factor(dat$CGID))[1:30]), 
           c("CGID", 
             "TIME_SINCE_ADMIT", 
             "CIM.machine")]

tmp$CGID <- as.factor(tmp$CGID)
table(tmp$CGID)
## 
## CG_14010 CG_14022 CG_14037 CG_14045 CG_14056 CG_14080 CG_14110 CG_14114 
##       13        1       94       37       13        6        9        7 
## CG_14116 CG_14126 CG_14154 CG_14180 CG_14184 CG_14240 CG_14252 CG_14269 
##       62        6       34       45        2       20       77       41 
## CG_14307 CG_14330 CG_14331 CG_14354 CG_14356 CG_14384 CG_14393 CG_14417 
##        3       48        2        2        9        6       15       20 
## CG_14444 CG_14449 CG_14462 CG_14477 CG_14486 CG_14508 
##       16       16       11        1       14       24

Note: here we see differences in the counts of observations we have for each clinician.

Comparison of Complete Pooling to Mixed Pooling (Clinicians)

Because clinicians can see a variable number of patients, some clinicians may contribute more weight to the model than will others. To deal with this problem, we treat the clinicians as random effects in the sense that we will use pooling (of all of their properties as a group) to deal with them. We do this under the assumption that, if we were to plot the slope of each clinician, we would end up with coefficients that are normally distributed.

We can see below a graph of Care Providers (GC_XXXXX) and their care preference documentation (0 or 1) over time. We fit a linear regression to each individual clinician (in BLUE), as well as an overall linear regression for all clinicians (in RED).

Here we see that the slopes indicating care documentation status over time can be incredibly variable. Random Effect modeling using complete pooling can hold this absolutely constant, but we will model the Random Effect with partial pooling to maintain some degree of variablility.

Hierarchal Models and Random Effects

Hierarchal Models employ Partial Pooling to provide some degree of variability within the Random Effect part of our model. To reiterate, Fixed Effects do not use pooling.

Here we see that each partially pooled random effect (clinician) is slightly weighted by random samples to create a unique regression line.

Fixed Effects

Fixed effects use no pooling. In our case, one example would be our FIRST_CAREUNIT coefficients. These are constant, and once the coefficients are solved for that is the output of our model.

Visually:

Here we see that each FIRST_CAREUNIT has its own fixed effect, defined by its slope. No pooling was employed, which allows us to find the effect of the FIRST_CAREUNIT on our outcome of interest, while reducing interference on the part of care providers.