Hi,
I am importing a household data from excel, and data set does not have a proper id variable, and I am trying to generate one. My data looks like this:
ID name title
1 John household head
. Mary wife
. Sam son
3 Chris household head
. Pat mother
3 Flo household head
Sometimes it is like:
14 Kerry Household head
2 Susan wife
. Christine daughter
(Kerry, Susan, Christine are one household)
I would like to convert one household to one line. I cannot use reshape because the id does not follow what stata allows. Can you please help?
Thank you!
Related Posts with How to generate group id
Gmm arellano estimation .Hello everyone , I am writing my master thesis about determinants of international migration from d…
PLEASE HELP: Wrangling 15-min interval smart electricity meter dataHi Hoping there's a relatively easy fix for this, because I'm new to this kind and size of data set…
Question about using one seed to draw sample from multiple data set.Can anyone help me with how seed works in Stata for drawing sample from multiple data sets? I have …
Principal Component Analysis selecting country and questions under conditionsHello dear statalisters, I am working with the World Value Survey that have several questions for d…
How to estimate elasticity in both sides Box-Cox transformed modelDear STATA users, I have a model that both dependent and independent variables are box-cox transfor…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate group id
Post a Comment