liveBook · Manning

Pretreatment period

As explained in Causal Inference for Data Science

A pretreatment period is the time interval before an event or treatment during which baseline data are observed and training data may be collected.

A pretreatment period is the time interval before an event or treatment used to train a predictive model and estimate the outcome that would have occurred without the event. Its endpoints must be chosen with domain knowledge. section 11.3.2 section 11.3.6

Choosing the interval balances predictive stability against usable training data:

  • Moving the beginning farther from the event can increase sample size but may include a changed context and weaken relationships between outcomes and controls. section 11.3.6
  • Moving the beginning closer to the event can preserve context but reduces sample size and increases estimation variance. section 11.3.6
  • Set the ending just before the event unless anticipation effects begin earlier; then exclude data already influenced by the event. section 11.3.6
  • Try candidate starting points and use cross-validation to compare predictive errors before selecting the training window. section 11.3.6

A movie release and anticipation

Suppose a new movie is scheduled for release on 18 December. If viewers begin catching up on older movies beforehand, December observations are already affected by the release. Training on them would distort the nonrelease counterfactual, so the pretreatment period should end earlier. section 11.3.6

Table 11.3 Consequences of choosing endpoints farther from time event T. The Direction arrow shows how the timepoints move with respect to T.
P b start
P b end
T
P a start
P a end
← Direction
Training data window
• More sample size
• Potentially less accuracy due to context change
← Direction
Event anticipation
• Smaller sample size
• Potentially more accuracy with less context change
→ Direction
Delayed effects
• Less data to evaluate the impact
• Potentially less accuracy due to context change
→ Direction
Long-term impact evaluation
• More data to evaluate the impact
• Potentially less accuracy due to context change

Compare how moving pretreatment and post-treatment endpoints changes sample size, contextual consistency, and impact-evaluation coverage. section 11.3.6

How Causal Inference for Data Science covers it

How deep it goes
Explains interval endpoints, sample-size trade-offs, context changes, anticipation effects, and cross-validation-based selection.
Examples
Uses a scheduled movie release, older-movie viewership, socioeconomic controls, and endpoint-consequence comparisons.
What it assumes
Assumes domain knowledge for identifying event timing, contextual changes, and possible anticipation effects.
What you can do after
Apply it by selecting and validating a pre-event training window that avoids contaminated observations.
How it connects
Connects predictive models with counterfactuals, post-treatment periods, anticipation effects, delayed effects, and cross-validation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.