Notice of course,

in both cases the agriculture coefficient is strongly statistically significant.

So what I'd like to do in the next slide is just create via simulation,

an example where an effect can reverse itself.

So that maybe it'll get us thinking about how this could happen.

In the end, regression is gonna be a dynamic process,

where you're going to have to think about what variables to include.

And you're going to have to make the kind of scientific arguments, if you want.

If there hasn't been randomization to protect you from confounding, you're gonna

have to go through a scientific dynamic process of putting confounders in and

out and thinking about what they're doing to your effective interest

in order to evaluate it.

So let's invent a little simulation, just to illustrate how this can happen.

But there's a variety of ways it can happen, and this is just one.

But let's just, so you can see it happen as we code it from a real

generating process where you can control everything.

So I'm gonna assume that I have 100 data points, n is 100,

and then my second regressor, x2, is just gonna be the values 1 to n.

So if you look at x2, it's just 1 to 100.

So think of x2 as something that we might measure regularly, like days, so

we measured 100 consecutive days.

And then x1 is a variable that depends on x2 and it depends on random noise.

So let's just make something up.

So x1 depends linearly on x2, so it grows linearly with time.

So let's say, maybe, hopefully x1 is your bank account.

It's your money, it goes up with time linearly.

And then there's all these random fluctuations that impact your spending, so

your money doesn't necessarily always just go up.

It goes up and down sporadically, but there's this linear trend of it going up.