Hello,
the line column gives you full time and part time student numbers depending on the column lstudy which has three different values for undergraduate , first time professional and graduate. The vlaue of lstudy ==2 doesn't show up in this data sample because this unitid doesn't have lstuddy==2.
how can i sum the number of students for different age category of different values of lstudy for each unique unitid ?
label def label_line 1 "Full-time, under 18", modify: This line indicates that the label "Full-time, under 18" corresponds to the row representing the number of full-time students under 18 years old in that unique unitid.
label def label_line 3 "Full-time, 20-21", modify: This label represents the row for the number of full-time students aged 20-21 years old.
the line column gives you full time and part time student numbers depending on the column lstudy which has three different values for undergraduate , first time professional and graduate. The vlaue of lstudy ==2 doesn't show up in this data sample because this unitid doesn't have lstuddy==2.
how can i sum the number of students for different age category of different values of lstudy for each unique unitid ?
label def label_line 1 "Full-time, under 18", modify: This line indicates that the label "Full-time, under 18" corresponds to the row representing the number of full-time students under 18 years old in that unique unitid.
label def label_line 3 "Full-time, 20-21", modify: This label represents the row for the number of full-time students aged 20-21 years old.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long unitid byte(line lstudy xefage01) int efage01 byte xefage02 int efage02 100654 1 1 10 36 10 62 100654 2 1 10 814 10 886 100654 3 1 10 617 10 763 100654 4 1 10 366 10 348 100654 5 1 10 139 10 103 100654 6 1 10 31 10 51 100654 7 1 10 11 10 22 100654 8 1 10 15 10 37 100654 9 1 10 2 10 5 100654 10 1 10 2 10 0 100654 11 1 10 3 10 1 100654 12 1 10 2036 10 2278 100654 13 1 10 2 10 0 100654 14 1 10 13 10 10 100654 15 1 10 26 10 25 100654 16 1 10 38 10 40 100654 17 1 10 31 10 32 100654 18 1 10 16 10 17 100654 19 1 10 8 10 25 100654 20 1 10 19 10 25 100654 21 1 10 6 10 10 100654 23 1 10 5 10 9 100654 24 1 10 164 10 193 100654 25 1 10 2200 10 2471 100654 3 3 10 0 10 1 100654 4 3 10 47 10 92 100654 5 3 10 46 10 115 100654 6 3 10 30 10 56 100654 7 3 10 15 10 25 100654 8 3 10 24 10 52 100654 9 3 10 7 10 12 100654 10 3 10 0 10 1 100654 11 3 10 1 10 7 100654 12 3 10 170 10 361 100654 15 3 10 1 10 0 100654 16 3 10 18 10 47 100654 17 3 10 56 10 112 100654 18 3 10 41 10 84 100654 19 3 10 32 10 62 100654 20 3 10 36 10 113 100654 21 3 10 7 10 36 100654 23 3 10 2 10 0 100654 24 3 10 193 10 454 100654 25 3 10 363 10 815 end label values line label_line label def label_line 1 "Full-time, under 18", modify label def label_line 2 "Full-time, 18-19", modify label def label_line 3 "Full-time, 20-21", modify label def label_line 4 "Full-time, 22-24", modify label def label_line 5 "Full-time, 25-29", modify label def label_line 6 "Full-time, 30-34", modify label def label_line 7 "Full-time, 35-39", modify label def label_line 8 "Full-time, 40-49", modify label def label_line 9 "Full-time, 50-64", modify label def label_line 10 "Full-time, 65 and over", modify label def label_line 11 "Full-time, age unknown", modify label def label_line 12 "Total full-time", modify label def label_line 13 "Part-time, under 18", modify label def label_line 14 "Part-time, 18-19", modify label def label_line 15 "Part-time, 20-21", modify label def label_line 16 "Part-time, 22-24", modify label def label_line 17 "Part-time, 25-29", modify label def label_line 18 "Part-time, 30-34", modify label def label_line 19 "Part-time, 35-39", modify label def label_line 20 "Part-time, 40-49", modify label def label_line 21 "Part-time, 50-64", modify label def label_line 23 "Part-time, age unknown", modify label def label_line 24 "Total part-time", modify label def label_line 25 "Grand total, all students", modify label values lstudy label_lstudy label def label_lstudy 1 "Undergraduate", modify label def label_lstudy 3 "Graduate", modify
Comment