Hi everyone,
I am working with a panel data of individuals (pid) surveyed over 5 waves (unbalanced). My variable of interest is family which is a categorical variable (1"Married parents" 2"Divorced parents" 3"Cohabiting parents" 4"Single parents"). I have observed that individuals transition from one family state/category to another over waves. However, I want to restrict my sample to only consist of individuals(pid) whose family status/category has been constant across the 5 waves. Any idea on the code to use to achieve that please.

I am working with a panel data of individuals (pid) surveyed over 5 waves (unbalanced). My variable of interest is family which is a categorical variable (1"Married parents" 2"Divorced parents" 3"Cohabiting parents" 4"Single parents"). I have observed that individuals transition from one family state/category to another over waves. However, I want to restrict my sample to only consist of individuals(pid) whose family status/category has been constant across the 5 waves. Any idea on the code to use to achieve that please.

Comment