Hi everyone,

I am new to using panel data on stata so I had a few questions.

I am using the India birth recode module of the Demographic and Health Surveys (DHS). This basically acts as an unbalanced panel in that a mother has multiple entries based on the number of children she has. So basically, she enters the survey at the time of marriage and has data entries for each child and exits at the date of interview of the survey. Thus this unbalanced panel gives the retrospective birth history of each woman.

I wanted to declare the dataset as a panel with a year variable corresponding to the id of the person (newid) and year of birth of each child (yobc) using xtset. But I kept getting the error that there are repeated time values, which is natural since mother can have multiple kids and multiple births. So I followed the advice given here and simply did

Code:
xtset newid
And this worked. However, whenever I run the following command for a difference in difference model:


Code:
xtreg childhealth policy treatment did `controls0'
I get that all coefficients are zero. Here policy is 1 for the years where it was in place and 0 otherwise, treatment is the cohort of mothers that were affected by this policy again a 0,1 dummy variable (did is policy*cohort). I am not entirely sure why the results showed that all coefficients were zero or if this was the right step forward.

Code:
reg childhealth policy treatment did `controls0'
however this gets me results i.e. coefficients that are not zero and makes intuitive sense. Do let me know how to proceed on this front. Thank you.

Best,
Lori