In a dataset in the form of:
addressnr hhid general_health
1 1 5
2 1 6
3 2 9
4 2 8
5 3 2
6 3 4
With every hhid containing a couple
I would like to create a new variable containing the health of one's partner resulting in the following
addressnr hhid general_health partner's health
1 1 5 6
2 1 6 5
3 2 9 8
4 2 8 9
5 3 2 4
6 3 4 2
I have already gotten very close to what I want using rangestat:
rangestat (min) general_health_partner= general_health, interval(adressnr 1 2) by hhid
However this only generates the value for one of the two household members
Thanks in advance for the resonses!
Related Posts with Creating a variable for partner's health score
How to overcome the maximum (300) limits of estimation results in storageI have a dataset of nearly 1000 individuals, each individuals have 1200-1300 obs. The task is run re…
How to find observations who meet two criteriea?Hi I want to browse or tabulate those patients who fullfill two criteriea from an variable in my da…
Discrete Choice Experiments - Data input with opt outDear all, I'm an economics Phd student and my topic is waste source separation behaviour of househo…
Multinomial Probit model with continuous endogenous regressorsHi there May I ask if there are stata commands for running multinomial probit model with continuous…
Categorizing a date variableHi, I have a date variable dov (date of visit) in float %td format. The time period ranges from 201…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a variable for partner's health score
Post a Comment