Clustered Data
Study guide: Exam MAS-II
Clustered data are observations that come in groups, such as policies within agencies, claims within adjusters, or several years of experience on one policyholder, so that observations in the same cluster are more alike than observations in different clusters. They break the independence assumption of linear regression and the generalized linear model, and they are what the linear mixed model is built for. For observation t of cluster i, a random intercept model is
Y_{ti} = \beta_0 + \beta_1 x_{ti} + u_i + \varepsilon_{ti}
u_i \sim N(0, \sigma_u^2)is a random effect shared by every observation of clusteri.\varepsilon_{ti} \sim N(0, \sigma^2)is independent noise.
The shared u_i is what correlates two observations of the same cluster. Their correlation is the intraclass correlation \sigma_u^2/(\sigma_u^2 + \sigma^2).
In a random intercept model of loss ratios by agency,
\sigma_u^2 = 0.01and\sigma^2 = 0.04. What is the correlation between two loss ratios from the same agency, and from different agencies?
- Two loss ratios of one agency share
u_i, so their correlation is0.01/(0.01 + 0.04) = 0.20.- Loss ratios of different agencies share no random effect, so their correlation is
0.
Types of clustered data
- Grouped (nested) data: each unit belongs to one group at each level, such as policies in agencies in regions. This is the setting of a hierarchical model.
- Crossed data: each observation is classified by two groupings at once, such as the adjuster and the repair shop on a claim (nested and crossed factors).
- Repeated measures (longitudinal) data: the same unit is observed several times. The correlation often weakens as the time between observations grows, which calls for an AR(1) or similar covariance structure rather than one common correlation.
A workers compensation file has one row per claim over 6 years, recording the employer (most with claims in several years), the adjuster (each handles claims from many employers) and the incurred loss. What clustering does it have?
- Employer is a cluster observed repeatedly. Claims of one employer share its safety culture, and its year-to-year results are longitudinal data.
- Adjuster is a second cluster. Claims handled by one adjuster share that adjuster's reserving and settlement habits.
- The two are crossed, not nested, because an adjuster works claims from many employers and an employer's claims go to many adjusters.
- A reasonable start is crossed random intercepts for employer and adjuster, with the rating variables as fixed effects.
Effect of ignoring the clustering
Ignoring the clustering typically leaves the coefficient estimates unbiased but makes their standard errors too small. The m correlated observations of a cluster carry only as much information as
\frac{m}{1 + (m - 1)\rho}
independent observations.
\rhois the intraclass correlation.1 + (m - 1)\rhois the design effect.
Predictors that vary only between clusters are hit hardest, and effects that are not real look significant.
A fleet-level indicator is tested on 1,000 observations, 200 fleets each observed for 5 years. Fitted as if independent, its
tstatistic is2.5, and the intraclass correlation within a fleet is0.30. Is the effect significant at the 5% level?
- The indicator is constant within each fleet, so the full design effect applies:
1 + (5 - 1)(0.30) = 2.2.- The 1,000 rows carry as much information as
1{,}000/2.2 = 455independent ones.- The standard error was understated by
\sqrt{2.2} = 1.48, so the corrected statistic is2.5/1.48 = 1.69.1.69 < 1.96, so the effect is not significant.
Remedies for clustering
- A random intercept for each cluster, and perhaps a random slope. Each cluster's effect is predicted by its BLUP, a credibility-weighted estimate.
- A marginal model that specifies the correlation of the residuals directly.
- One fixed-effect indicator per cluster, which spends a parameter per cluster and does no shrinkage.
A mixed model can also let the residual variance differ by group (variance function). In cross-validation, a cluster is held out whole, because its correlated rows left in training would leak its information into the test.