Four measurement devices are sampled and each is read three times, which gives twelve numbers. A standard error that treats the twelve readings as twelve independently chosen devices comes out at about units, and one built from the four device averages comes out at about units. Both calculations are done correctly, but when the devices were sampled independently and readings on the same device are related, only the second matches how the data were collected. This lesson shows how to find the units that were sampled or assigned independently, how the intraclass correlation and the design effect describe the dependence inside clusters, and how the cluster bootstrap and the random-intercept mixed model respect it.
Key terms
Clusters and repeated measures
Definition A cluster is a group of observations linked through a shared unit or setting, such as the readings taken on one device, the pupils in one classroom or the visits made by one patient. Repeated measures are several measurements of the same variable on the same unit, taken at different times, under different conditions or simply repeated under one protocol, and each unit together with its repeated measures forms a cluster. The sampling unit is the unit that the sampling procedure selects, and the experimental unit is the unit to which a treatment is independently assigned. Either one can be larger than the row that stores a single measurement.
In plain words Before computing any standard error, count two things separately, the rows in the data table and the units that were independently sampled or assigned. Observations in one cluster share something, such as a calibration offset, a teacher or a person’s physiology, so they often resemble each other more than observations from different clusters do. Unless the design or a model justifies it, the rows of one cluster should not be treated as independent pieces of information about the population of clusters.
Example Four devices are sampled independently and each is read three times under the same protocol. The readings below are constructed, in arbitrary measurement units.
| Device | Readings | Device mean |
|---|---|---|
| 1 | 7, 8, 9 | 8 |
| 2 | 9, 10, 11 | 10 |
| 3 | 11, 12, 13 | 12 |
| 4 | 13, 14, 15 | 14 |
The data have rows but only sampling units. The target is the population mean of the device averages. Because every device has three readings, the mean of the four device means and the mean of all twelve readings are both .
Pseudoreplication
Definition Pseudoreplication is analyzing observations as independent replicates of the unit an inference is about when they are not. Typical cases are treating repeated readings of a few devices as readings of many different devices, and treating pupils as independent replications of a teaching method that was assigned to whole classrooms. When observations within a cluster are positively correlated, the usual consequence is a standard error that is too small, an interval that is too narrow and a p-value that is too small.
In plain words Repeated measurements are not wasted. They pin down each unit’s own value more precisely and can show changes within a unit. The mistake is to count them as answers to a different question, such as how much device averages vary across the population of devices, or how a method works across many classrooms.
Example For the four devices, treating the device means as an independent sample gives
Treating all twelve readings as independent, the squared deviations of the readings from add to , so
Both use the same estimate . The row calculation describes a study of twelve independent devices that never took place, and its standard error is only a little more than half of the device-level one. With four devices the device-level standard error is itself a rough estimate, and the ratio between the two numbers belongs to these data, not to clustering in general.
Intraclass correlation
Definition Let be observation in cluster , in a model where every observation has the same variance , observations in different clusters are independent, and every two different observations in the same cluster have the same correlation , a structure called exchangeable or compound symmetry. Then is the intraclass correlation, and for
In a cluster of observations the correlation must satisfy . When the dependence has another pattern, such as visits whose correlation weakens as the time between them grows, a single intraclass correlation does not describe it.
In plain words The intraclass correlation measures how much observations from the same cluster resemble each other. If all observations also share the same mean, the expected squared difference between two readings from the same cluster is , while for two readings from different clusters it is . A positive therefore means that readings from one cluster tend to lie closer together, and means they agree with probability . It is a property of a model, estimated from data with uncertainty, and four clusters are far too few to estimate it well.
Example Suppose a model for the devices gives every reading the same mean, variance squared units and intraclass correlation . Two readings from the same device then have covariance squared units, and their expected squared difference is squared units, half the value for readings from two different devices. These values are declared for illustration and are not estimated from the four devices.
Design effect for clustered data
Definition The design effect of an estimator is its variance under the actual design or dependence model divided by its variance under a stated reference, usually independent sampling of the same number of observations. Take independent clusters of observations each, in all, with common variance and intraclass correlation . The sum of one cluster has variance terms and covariance terms, so the overall mean of all observations has
When the variance-equivalent effective sample size is , the number of independent observations whose mean would have the same variance.
In plain words The design effect is the factor by which clustering multiplies the variance of the mean compared with independent observations, and the standard error is multiplied by . With one observation per cluster, or with , the design effect is . With it equals and the effective sample size equals , the number of clusters. The formula belongs to this balanced model and to the overall mean. Unequal cluster sizes, survey weights and other estimators have design effects of their own, and in general an effective sample size is neither the number of clusters nor a number of degrees of freedom.
Example The device design has . If , then , the standard error is times the independent value, and the twelve readings are worth independent readings for estimating the mean. With the standard error is units instead of . The study still contains only four independent devices, and the value is an assumption made for this illustration, not a quantity estimated from the data.
Cluster bootstrap
Definition Suppose clusters were sampled independently. A cluster bootstrap sample draws clusters with replacement from the observed clusters, each draw choosing every cluster with probability , and keeps all observations of each drawn cluster together. The estimator is recomputed on every bootstrap sample exactly as on the original data, and the standard deviation of these bootstrap estimates is the cluster bootstrap standard error.
In plain words Resample what was sampled independently. Keeping each block whole preserves the dependence inside clusters, while the variation from one bootstrap sample to the next imitates the variation among independently sampled clusters. A cluster drawn twice is its observed block counted twice, not a second physical device. With few clusters the observed ones are a poor stand-in for the population of clusters, and large-sample methods for clustered data, this bootstrap and clustered standard errors among them, need enough independent clusters to behave as intended. Stratified, weighted or blocked designs need resampling schemes that respect those features.
Example Drawing devices 1, 1, 3 and 4 gives device means 8, 8, 12 and 14, so this bootstrap sample has mean
Listing all equally likely ordered draws gives the exact bootstrap distribution, whose standard deviation is units. That is smaller than by the factor , because the bootstrap treats the four observed device means as the whole population and so divides their squared deviations by instead of . Resampling the twelve readings one at a time would give about units and would imitate a sampling process of twelve independent readings, which is not how the data were collected.
Random-intercept mixed model
Definition A random-intercept model for clustered data writes observation in cluster as
where is a fixed overall mean, the random intercepts have mean and variance , the errors have mean and variance , and all the and are mutually independent. It is a mixed model because it combines fixed effects, here and possibly regression terms for covariates, with the random effects . The model implies, for ,
so the intraclass correlation is whenever , and the mean of observations in one cluster has variance .
In plain words The model splits the variation into a part shared by a whole cluster and a part that differs from reading to reading. More readings per device shrink only the second part, while more devices shrink both. In this model the intraclass correlation is the share of the total variance that lies between clusters, so it is never negative. Fitting such a model, commonly by maximum likelihood or restricted maximum likelihood with normal random effects and errors, and checking its assumptions go beyond this lesson.
Example Take and squared units, values declared for illustration rather than fitted. Then , and a device mean of three readings has variance . The mean of four such device means has variance , the same value the design effect gives with and . With the same total of 24 readings, four devices read six times each give a standard error of units, while eight devices read three times each give units. However many readings each of four devices gets, the standard error stays above units.
Check yourself
- A cluster bootstrap sample of the four devices selects devices 2, 2, 4 and 4. Find the mean of this bootstrap sample and explain why all three readings of a selected device stay together. How do ten extra readings on device 2 differ from readings on ten extra devices?
Show the answer
The device means are 10, 10, 14 and 14, so the bootstrap mean is . The devices were sampled independently, while the three readings of one device share its calibration and construction. Keeping each device’s readings together carries that dependence into every bootstrap sample. Drawing twelve readings one at a time would ignore which device each reading came from, and for these data it gives a standard error of about units instead of about . Selecting device 2 twice does not add a new device. It counts that device’s observed block twice.
Ten extra readings on device 2 measure that one device more precisely, which reduces only the reading-to-reading part of the variation in its mean. Readings on ten newly sampled devices add independent clusters, which show more of how device averages vary across the population and shrink both the between-device and the within-device part of the variance of the estimated population mean.
- Three schools are sampled, and every pupil in each is tested. School A has 10 pupils with mean score 60, school B has 20 pupils with mean 70 and school C has 70 pupils with mean 80. Compute the mean that weights each school equally and the mean that weights each pupil equally, and say what each one describes.
Show the answer
Weighting schools equally gives
The school totals are , and , so weighting pupils equally gives
The first describes a typical school, the average of the school means. The second describes a typical pupil in these schools. They differ because the largest school also has the highest mean. Neither is the right answer to every question, so the analysis must first say which target it has in mind. For a population target, how the schools were selected also affects which weights are appropriate. With equal cluster sizes the two means coincide.
- A study randomly assigns six classrooms, three to each of two teaching methods, and tests 20 pupils in each classroom. An analyst compares the methods with a two-sample t test on 60 versus 60 pupils. What is the experimental unit, and what is wrong with the analysis? In an exchangeable model with intraclass correlation within classrooms, find the design effect for each method’s mean and the effective sample size per method. Does that effective sample size give the degrees of freedom?
Show the answer
The experimental unit is the classroom, because the method was assigned to whole classrooms. Pupils in one classroom share the method, the teacher and the room, so they are not independent replications of the method. The pupil-level t test is pseudoreplication, and with positive correlation within classrooms it tends to understate the standard error and the p-value.
With and , the design effect is . The variance of each method’s mean is times the value for 60 independent pupils, and the effective sample size is per method.
That number is a variance comparison, not a count of independent units, and it does not give degrees of freedom. Only three classrooms per method were randomized. An analysis of the six classroom means respects the design. A pooled two-sample t procedure on them has degrees of freedom and is exact when the classroom means are independent and normal with a common variance. A randomization test that reassigns the methods to classrooms has only possible assignments, so its one-sided p-value cannot be smaller than . Six classrooms provide little replication, however many pupils they contain.