0

Hi I'm having trouble setting up my data in long format for GEE. I know multiple waves of data must have the same variable names but what if these variables are wave specific? Outcome: Substance use initiation at wave 2 among naive smokers explanatory variable: household smoking exposure at wave 1 How can these variables have the same name at wave 1 and wave 2? will one be substance use initiation be 0 for wave 1 and household exposure 0 for wave 2?

Thanks

Stella
  • 1

1 Answers1

1

Here is how it should be set up:

ID 1 : Wave 1 : Variable X : Variable Y

ID 1 : Wave 2 : Variable X : Variable Y

ID 1 : Wave 3 : Variable X : Variable Y

ID 2 : Wave 1 : Variable X : Variable Y

ID 2 : Wave 2 : Variable X : Variable Y

ID 2 : Wave 3 : Variable X : Variable Y

You "stack" the waves on top of each other with the values of variable X and variable Y corresponding to the specific wave + ID combination.

JWH2006
  • 652