Hello. I have a data set that has the following structure.
hhcode member_id age
1 1 45
1 2 23
1 3 31
2 1 50
2 2 38
2 3 31
2 4 14
3 1 65
3 2 31
3 3 15
I want to make it as follows.
hhcode age_1 age_2 age_3 age_4
1 45 23 31 .
2 50 38 31 14
3 65 31 15 .
Thank you.
Related Posts with Making household-level variables using individual-level variables
Problems with the ARIMA model for white noise testingThe variable is log return, which has been confirmed as a stationary series by the DF test, I choose…
set string case to missing if a phrase is foundHello, I have a series of string variables (drug1 - drug25) that contain information on types of dr…
How to correctly interrupt the moderating effect in a modelDear all I have three variables: New.gw is my x and log_spread is my Y and the moderator is a legal …
Create correlation table of AUROCs in Excel or WordDear Statalisters, I want to create a correlation table of AUROCs and their corresponding 95% CI and…
How to calculate distance in this case?Dear all, I would like to calculate a distance as follows: distance is defined as the straight-line…
Subscribe to:
Post Comments (Atom)
0 Response to Making household-level variables using individual-level variables
Post a Comment