Taking account of time lags in causal models