Hi,

I used the code below to check if all the observations for a particular variable (var1) within the “id” variable are constant. I got the following messages and assume this means that all observations for var1 within the id variable are not constant through the data set. Is there anyway for me to identify which id’ this assertion is false for and/or which rows for which this is so?

Code:
bysort id (var1): assert var1[1] == var1[_N]
37 contradictions in 1,977 by-groups
assertion is false
Thank you,
Karishma