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
How to identify the oldest and youngest children in each HHHi all, I would like to create variables that could identify who is the oldest and youngest childre…
using adaptive Lasso regression select variables, but how to use the lasso results to predict income which is missing.first,I use adaptive lasso select the variables:lasso linear income1 gender-popstu, selection(adapti…
How to estimate margins after bioprobit?Hello everyone, I am conducting a study to analyze accident data. I have two outcome variables, nam…
Violations of the proportional hazards assumptionHello everyone Perform a COX proportional hazard regression model. However, the final multivariate …
problem related with regressions by two groupsDear all I have a problem. Now I want to examine how the variable z affects the relationship between…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate group id
Post a Comment