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):

  1. Z ~ E1
  2. X ~ Z + E2
  3. 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.