Hello I have a data set in which I am trying to compare longitudinal data from successive pregnancies.

each variable I have is coded pregnancy1 or pregnancy 2. With the exception of race/ethnicity all variables differ based on pregnancy 1 and pregnancy 2

I am trying to set up a table 1 comparing continuous, categorical and binary variables ( education, annual income, mean age, hypertension status etc) at the time points of either pregnancy 1 or pregnancy 2.

Previously I used a code for table 1 but that won't work here because I am not stratifying by a binary outcome but rather by Preg 1 vs preg 2 .

I am currently using tab or codebook command to compare each variable ex:

tab edu_1
tab edu_2

tab obese_1
tab obese_2


this gives me column percentage; but no p value comparing the two. Is there a code for this? my table one command did it automatically. I hope this makes sense. Thanks!