liveBook · Manning

Indicator variable

As explained in Causal AI

A binary indicator is a variable that represents whether a specified condition holds using two possible values.

An indicator variable encodes whether a condition holds using two values, conventionally 1 and 0. It converts a continuous or categorical question into a binary one: for example, whether in-game purchases exceed $120. section 8.3

In causal analysis, a binary treatment indicator represents alternative interventions such as treatment versus no treatment. In linear regression, its coefficient can represent the average treatment effect when the model and adjustment assumptions are appropriate. section 11.4.1

Dummy variables also support workflow checks rather than only primary modeling:

  • Add a random common cause to test whether estimated effects remain stable; a non-confounding variable should not materially change the ATE, although it can add noise. section 11.5.2
  • Replace treatment with a permuted placebo treatment; the expected effect is zero, so a changed estimate can expose estimator or identification problems. section 11.5.3
  • Generate a synthetic outcome from covariates; its treatment effect should be zero, providing another check on causal assumptions. section 11.5.4
Listing 11.17 Replacing the treatment variable with a dummy variable
identified_estimand.set_identifier_method("backdoor")
res_placebo = model.refute_estimate(
identified_estimand,     #1
    causal_estimate_ipw,     #1
    method_name="placebo_treatment_refuter",     #1
    placebo_type="permute",     #1
    num_simulations=100     #1
)

print(res_placebo)

A Python-style listing shows how to permute treatment, run repeated placebo simulations, and inspect the estimated and new effects. section 11.5.3

How Causal AI covers it

How deep it goes
Defines binary encoding and demonstrates regression, placebo, synthetic-outcome, and random-confounder checks without developing their statistical theory.
Examples
Uses a $120 purchase threshold, game-treatment indicators, placebo treatments, synthetic outcomes, and random common causes.
What it assumes
Assumes familiarity with treatments, outcomes, confounders, average treatment effects, and causal estimands while illustrating binary encoding directly.
What you can do after
Diagnose causal estimators by encoding binary treatments or outcomes and checking whether placebo interventions preserve a zero effect.
How it connects
Links binary indicators to counterfactuals, causal inference, treatment effects, confounders, backdoor adjustment, linear regression, and inverse probability weighting.

Also explained in

Compare how 4 books explain indicator variable →

Related concepts

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