A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Time-Varying Confounders and Longitudinal Exposure

Research Depth 265 in the knowledge graph ☐ I know this ☆ Set as goal
1topic build on this
1,788prerequisites beneath it
See this on the map →
Confounding: Definition, Identification, and Causal CriteriaPerson-Time Calculations and Follow-Up Study Design+1 more→→Marginal Structural Models for Longitudinal Data
longitudinal-analysis time-varying-confounding exposure-dynamics

Core Idea

Time-varying confounding occurs when a variable is a confounder at some timepoint but is also affected by prior exposure. Standard regression adjustment introduces bias because adjusting for a mediator of prior exposure induces collider bias. Methods like marginal structural models or g-estimation handle this scenario.

Explainer

From your study of confounding, you know the three criteria: a confounder must be associated with the exposure, associated with the outcome independently of the exposure, and must not lie on the causal pathway between them. You also know the solution: measure the confounder and adjust for it using stratification or regression. This works well when confounders are stable baseline characteristics. Time-varying confounding is the complication that arises in longitudinal studies when a covariate changes during follow-up — and when its value at any point is partly caused by the prior exposure history.

The canonical example comes from HIV treatment research. Suppose you want to know whether early AZT treatment prolongs survival in HIV-positive patients. CD4 count (a measure of immune function) is a confounder: physicians prescribe AZT to patients with lower CD4 counts (indication bias — sicker patients get the drug), and lower CD4 count independently predicts mortality. But CD4 count is not a stable baseline characteristic — it changes over time, partly in response to AZT itself (the drug improves CD4). At any given follow-up visit, CD4 count is simultaneously: (a) a confounder for the effect of future treatment on mortality, because CD4 level at that visit will affect both whether more AZT is given and whether the patient dies; and (b) an intermediate outcome of prior AZT treatment, meaning it is partially on the causal pathway from earlier AZT exposure to the outcome. This dual status — time-varying confounder that is also affected by prior exposure — is what makes the problem structurally different from ordinary confounding.

The trap with standard regression is that it cannot resolve this duality. If you include current CD4 count as a covariate in a Cox regression model, you block part of the causal effect of AZT that works through improving CD4 — you are conditioning on a mediator, which biases the estimate of AZT's effect downward. But if you exclude it, the remaining confounding by CD4 biases the estimate upward (sicker patients got the drug). No choice in standard regression is correct. The problem is not technical but structural: standard regression assumes each variable is either a confounder (condition on it) or a mediator (don't), but time-varying confounders are both, sequentially, in the same dataset.

Marginal structural models (MSMs) solve this by reweighting observations rather than conditioning on the time-varying confounder directly. The logic: construct hypothetical pseudo-populations in which the probability of treatment at each visit is independent of the confounders. This is achieved by assigning inverse probability of treatment weights (IPTW) to each observation — a subject who was unlikely to receive treatment given their covariate history but did receive it gets up-weighted; one who was likely to receive treatment and did gets down-weighted. In the reweighted pseudo-population, the association between the time-varying confounder and treatment is broken, and the effect of treatment can be estimated without bias from a model that does not include the confounder at all. G-estimation provides an alternative using structural nested models that estimate counterfactual outcomes directly. Both methods require specifying a model for the probability of treatment given covariate history — a distinct modeling task from outcome modeling, and one that must be done carefully, as misspecification propagates directly into the causal estimate.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → One-to-One Correspondence → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Making 10 as an Addition Strategy → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Iterated Integrals and Fubini's Theorem → Double Integrals in Cartesian Coordinates → Double Integrals in Polar Coordinates → Double Integrals in Polar Coordinates → Double Integrals: Definition and Setup → Iterated Integrals and Fubini's Theorem → Double Integrals over Rectangular Regions → Double Integrals over General Regions → Applications of Double Integrals: Area, Mass, and Moments → Triple Integrals in Cartesian Coordinates → Triple Integrals in Cylindrical and Spherical Coordinates → Change of Variables and the Jacobian Determinant → Applications of Triple Integrals: Volume and Mass → Vector Fields and Their Representations → Line Integrals of Vector Fields → Work and Circulation → Line Integrals of Scalar and Vector Functions → Fundamental Theorem for Line Integrals → Conservative Vector Fields → Conservative Vector Fields and Potential Functions → Curl and Divergence of Vector Fields → Curl and Divergence → Divergence Theorem → Electric Flux and Divergence Theorem → Gauss's Law: Integral Form and Meaning → Solving Problems with Gauss's Law → Conductors in Electrostatic Equilibrium → Capacitance and Capacitors → Dielectrics → Dielectric Constant and Relative Permittivity → Electric Field Inside Dielectric Materials → Dielectric Materials and Polarization → Dielectric Susceptibility and Permittivity → Energy Density in Electric Fields → Electric Current and Current Density → Electrical Resistance and Resistivity → Ohm's Law and Circuit Elements → Electromotive Force (EMF) and Batteries → Kirchhoff's Circuit Laws: Voltage and Current → DC Circuit Network Analysis Methods → Transient Response in RC Circuits → RC Circuits → LC and RLC Circuits → AC Circuits: Fundamentals → Impedance and Reactance → AC Power and Resonance → Electromagnetic Waves → Postulates of Special Relativity → Time Dilation → Length Contraction → Lorentz Transformation → Relativistic Velocity Addition → Relativistic Momentum and Energy → Mass-Energy Equivalence and E=mc² → Photons as Particles with Energy and Momentum → Planck-Einstein Relation: Energy and Frequency → Photoelectric Effect → The Photon: Light as Quanta → Compton Scattering → Wave-Particle Duality → de Broglie Wavelength → The Schrödinger Equation → State Vectors and Wavefunctions → Quantum Superposition → The Measurement Problem → Interpretations of Quantum Mechanics → Postulates of Quantum Mechanics → Observables and Quantum Operators → Commutators and Commutation Relations → Quantum Angular Momentum → Quantum Mechanical Treatment of Hydrogen → Solving the Schrödinger Equation for Hydrogen Atom → Quantum Numbers → Electron Configuration → Periodic Trends → Covalent Bonding → Electronegativity and Bond Polarity → Ionic Bonding → Lewis Structures → VSEPR Theory and Molecular Geometry → Molecular Geometry and Electron Pair Geometry → Molecular Polarity and Dipole Moments → Intermolecular Forces → States of Matter and Phase Changes: Melting, Boiling, and Sublimation → Gas Laws and the Ideal Gas Equation → Gas Stoichiometry and Volume-Volume Calculations → Thermochemistry and Enthalpy → Heat Capacity and Calorimetry → Entropy and Molecular Disorder → Spontaneity and ΔG → Entropy and Gibbs Free Energy → Chemical Equilibrium → Acid-Base Chemistry → Weak Acid Ionization → Weak Base Ionization → Acid and Base Strength: Ka, Kb, and Ionization → Leaving Groups and Nucleofugality → SN2 Substitution Reactions → SN1 Substitution Reactions → E1 Elimination Reactions → Alcohols and Ethers: Structure, Properties, and Nomenclature → Reactions of Alcohols → Aldehydes and Ketones: Structure and Reactivity → Oxidation Reactions in Organic Chemistry → Oxidation of Alcohols to Aldehydes and Ketones → Aldehyde and Ketone Structure and Nomenclature → Nucleophilic Addition to Aldehydes and Ketones → Carboxylic Acids and Their Derivatives → IUPAC Nomenclature of Carbonyls and Carboxylic Acids → IUPAC Nomenclature of Alkenes → Electrophilic Addition to Alkenes → Aromaticity and Benzene → Electrophilic Aromatic Substitution (EAS) → Nucleophilic Aromatic Substitution (SNAr) → Nucleophilic Acyl Substitution → Amines: Structure, Basicity, and Reactions → Amine Reactivity: Nucleophilicity and Basicity → Amino Acid Structure and Properties → Peptide Bonds and Polypeptide Formation → Protein Primary Structure → Protein Secondary Structure → Protein Tertiary Structure → Enzyme Structure and Function → Transcription: DNA to RNA → RNA Types and Structure → RNA Structure and Intramolecular Base Pairing → RNA Processing and Splicing → Translation: RNA to Protein → Ribosomes: Protein Synthesis Machines → Translation: Initiation and Elongation → Post-Translational Modifications → Proteasomal Degradation and Ubiquitin-Mediated Marking → Cell Cycle Regulation and Checkpoints → Cell Cycle Checkpoints: Ensuring Genome Integrity → Cell Cycle Checkpoints and Cancer Prevention → Mitotic Spindle Checkpoint and Chromosome Segregation → Kinetochore Structure and Function → Mitochondria: Structure and Function → Cellular Respiration Overview → Glycolysis → Pyruvate Oxidation → The Krebs Cycle (Citric Acid Cycle) → Electron Transport Chain → ATP Synthesis and Oxidative Phosphorylation → ATP Hydrolysis and Cellular Free Energy → The Na+/K+-ATPase: Maintaining Ion Gradients → Resting Membrane Potential → Ligand-Gated Ion Channels → Voltage-Gated Sodium Channels → Action Potential Phases → Cardiac Electrophysiology and Action Potentials → Cardiac Pacemaker Activity and the Sinoatrial Node → Atrioventricular Node Conduction and Physiological Delay → Heart Rate Control and Autonomic Modulation → Cardiac Output and Stroke Volume Regulation → Blood Pressure Regulation → Vascular Tone and Resistance Regulation → Blood Flow Redistribution and Homeostasis → Vascular Resistance and Blood Flow Control → Capillary Fluid Exchange and Starling Equilibrium → Glomerular Filtration Rate and Autoregulation → Tubular Reabsorption, Secretion, and Selective Transport → Loop of Henle and Countercurrent Multiplication Mechanism → Collecting Duct Water Reabsorption and ADH Regulation → Osmolarity Regulation and Collecting Duct Function → Kidney Anatomy and Urine Formation → Renal Filtration and Tubular Processing → Fluid and Electrolyte Regulation and Osmolarity → Fluid Compartments, Electrolyte Balance, and Acid-Base Regulation → Minerals and Trace Elements in Human Nutrition → Nutrient Requirements and Dietary Reference Intakes → Dietary Guidelines, Reference Intakes, and Food Patterns → Nutrition Across the Lifespan: Pregnancy, Infancy, Childhood, and Aging → Social Determinants of Health → Health Promotion and Behavior Change Models → Risk Communication and Behavior Change → Health Behavior Change and Population Intervention Strategies → Health Promotion Program Design and Behavior Change Theories → Health Communication, Message Design, and Audience Engagement → Health Literacy and Public Health Communication → Biostatistics in Public Health → Multivariable Regression in Epidemiology → Propensity Score Methods → Time-Varying Exposures and Confounders → Time-Varying Confounders and Longitudinal Exposure

Longest path: 266 steps · 1788 total prerequisite topics

Prerequisites (3)

Leads To (1)