Hello everyone,
I've got individual-level cross -sectional data for two years. Year 1 has 7230 observations, year 2, 8660 observations.
I'd like to form a pseudo-panel or a pooled cross-section, grouped by county (region). A sample of the data is pasted below.
Specific requests:
clear
input int resp_no byte(cty_code rural gender) int age byte(edu_pri occ_farmer id disability internet_use)
1 26 1 1 59 0 1 1 1 1
2 40 1 1 43 0 0 1 1 0
3 16 1 0 72 1 1 1 0 0
4 42 1 0 22 1 0 1 0 0
5 21 0 0 24 0 0 1 0 1
6 19 1 0 50 1 0 1 0 0
7 30 1 0 31 1 0 1 0 0
8 44 1 0 38 1 1 1 0 0
9 19 1 1 31 1 0 1 0 0
10 37 1 1 62 0 0 1 1 0
end
resp_no is "respondent number" (individual identifier)
cty_code is "county code" (region identifier)
rural is a dummy" with rural = 1; urban = 0
gender is a dummy with female = 1, male = 0
age is "age in years"
edu_pri is "primary education = 1, otherwise 0"
occ_farmer is occupation (farmer = 1, otherwise 0)
id is possession of an identification document (yes = 1, otherwise 0)
disability = 1 if respondent has disability, otherwise 0
internet_use is a dummy = 1 if one uses internet, otherwise 0
Thank you.
I've got individual-level cross -sectional data for two years. Year 1 has 7230 observations, year 2, 8660 observations.
I'd like to form a pseudo-panel or a pooled cross-section, grouped by county (region). A sample of the data is pasted below.
Specific requests:
- Kindly assist with a code for grouping the data.
- Which Stata command is suitable for analysis after pooling/paneling? The dependent variable is a count variable (ordered integer).
clear
input int resp_no byte(cty_code rural gender) int age byte(edu_pri occ_farmer id disability internet_use)
1 26 1 1 59 0 1 1 1 1
2 40 1 1 43 0 0 1 1 0
3 16 1 0 72 1 1 1 0 0
4 42 1 0 22 1 0 1 0 0
5 21 0 0 24 0 0 1 0 1
6 19 1 0 50 1 0 1 0 0
7 30 1 0 31 1 0 1 0 0
8 44 1 0 38 1 1 1 0 0
9 19 1 1 31 1 0 1 0 0
10 37 1 1 62 0 0 1 1 0
end
resp_no is "respondent number" (individual identifier)
cty_code is "county code" (region identifier)
rural is a dummy" with rural = 1; urban = 0
gender is a dummy with female = 1, male = 0
age is "age in years"
edu_pri is "primary education = 1, otherwise 0"
occ_farmer is occupation (farmer = 1, otherwise 0)
id is possession of an identification document (yes = 1, otherwise 0)
disability = 1 if respondent has disability, otherwise 0
internet_use is a dummy = 1 if one uses internet, otherwise 0
Thank you.
Comment