Intuitively, I can imagine that an unconditional (i.e., unadjusted for any covariates) Y~X relation can present as a linear relation, whereas a conditional Y~X|Z relation can present as a non-linear relation.
I'm trying to prove this to myself via simulation, and am wondering if anyone might have any insight.
I'm imagining the following relations between three covariates (which I think should suffice):
- Z ~ E1
- X ~ Z + E2
- Y ~ Z + X + E3
(Ei being error terms)
I'm just wondering if anyone can shed some insight as to how I might generate data that yield relations such that Y~X appears linear, Y~X|Z appears non-linear.
Apologies for any ambiguity.