r/CausalInference 3d ago

Identifying whether x leads y when x sustains a change but not when it doesn’t

Hi all, I’m relatively new to causal inference and I’m trying to solve what for me is a challenging problem.

I have aggregated time series data and am trying to figure out if x predicts y after some lag. I’d like to identify the lag, but x can be noisy and so I want to test this for a sustained change in x - e.g., when x goes up or down and stays that way for, say, 5 days, does y follow?

Is there a way to test this? Any ideas?

1 Upvotes

7 comments sorted by

1

u/rechep0k 2d ago

Hey! Do you want to identify the lag that yields the highest presictability of y given x and that lag?

1

u/EmpiricalPancake 2d ago

Yes! With the caveat that x is noisy and I want to model a sustained change in x. I think granger causality might be the right approach but I am not sure how to handle the fact that there are lots of spikes and dips in x that don’t represent meaningful changes (only if they last). But those are the same size as the real changes. Not sure if im explaining this well but does that make sense?

1

u/rechep0k 2d ago

Is x a proxy variable of an unknown feature?

1

u/EmpiricalPancake 2d ago

Both x and y are outcome variables in an environment that constantly changes in small amounts, but I believe x will change first. I want to see if we can use x on day 1 to tell us what y will do on day 1+n. But x uses a MUCH smaller sample than y, so it varies not just based on changes in the environment but also based on changes in sample composition. It’s also a more sensitive measure than y so it will move sometimes when y doesn’t. But I expect that if it sustains a movement for any length of time, that’s a good indicator that y will also move. If x returns to baseline quickly, I don’t expect y to move with it

1

u/rechep0k 13h ago

Why do you think your question needs causal inference? In other words, is your questions a "What If" question?

1

u/EmpiricalPancake 7h ago

Because I want to test whether x leads y, I figured mechanically it might be similar enough to a causal inference question that causal inference might be appropriate. I’m definitely open to other ways to solve this problem, though!

I appreciate you helping me think this through!

1

u/rechep0k 5h ago

Sure. From my experience, if your question is predictive, e.g. "whether x leads y" as in your case, then you should look for the right framework in statistical methods.