Appendix 1: Education Variable Creation

Return to Table of Contents


Enrollment Status, Highest Grade Completed, and Highest Degree Received

Variables Created:

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

sym1gr11

SYMBOL!CUR!FIRSTGRADE.01.01 (round 1)

e913131, e913132

YSCH-9131.03.01, .02

compyr2

year completed highest grade 
(internal variable from r2 program)

e913141, e913142

YSCH-9131.04.01, .02

e913151

YSCH-9131.05.01

e3500r1

YSCH-3500 (round 1)

e913161

YSCH-9131.06.01

e11700r1

YSCH-11700 (round 1)

e913171

YSCH-9131.07.01

e28200r1

YSCH-28200 (round 1)

e933511M, Y

YSCH-9335.01.01~M, ~Y

t70001r1- t70003r1

YTRN-7000.01-.03 (round 1)

e933512M, Y

YSCH-9335.01.02~M, ~Y

GRSURV1

CV_HGC_EVER (round 1)

e933513M, Y

YSCH-9335.01.03~M, ~Y

DEGSURV1

CV_HIGHEST_DEGREE_EVER (round 1)

e933521M, Y

YSCH-9335.02.01~M, ~Y

e2857r2

YSCH-2857 (round 2)

e933522M, Y

YSCH-9335.02.02~M, ~Y

e3112r2

YSCH-3112 (round 2)

e933531M, Y

YSCH-9335.03.01~M, ~Y

e11700r2

YSCH-11700 (round 2)

e933541M, Y

YSCH-9335.04.01~M, ~Y

t70001r2, t70002r2

YTRN-7000.01, .02 (round 2)

e933551M, Y

YSCH-9335.05.01~M, ~Y

GRSURV2

CV_HGC_EVER  (round 2)

e933561M, Y

YSCH-9335.06.01~M, ~Y

GRJUNE2

CV_HGC_YR (round 2)

e938511-e938513

YSCH-9385.01.01-.03

DEGSURV2

CV_HIGHEST_DEGREE_EVER (round 2)

e938521-e938523

YSCH-9385.02.01-.03

DEGJUNE2

CV_HIGHEST_DEGREE_YR (round 2)

e938531, e938532

YSCH-9385.03.01, .02

e1605

YSCH-1605

e938541, e938542

YSCH-9385.04.01, .02

e16151, e16152

YSCH-1615.01, .02

e938551

YSCH-9385.05.01

e16241, e16242

YSCH-1624.01, .02

e938561

YSCH-9385.06.01

e16271

YSCH-1627.01

e938571

YSCH-9385.07.01

e2806

YSCH-2806

e9589111-e9589114

YSCH-9589.01.01.01-.04

e2857

YSCH-2857

e9589121

YSCH-9589.01.02.01

e2908

YSCH-2908

e9589211-e9589213

YSCH-9589.02.01.01-.03

e3010

YSCH-3010

e9589311, e9589312

YSCH-9589.03.01.01, .02

e3061

YSCH-3061

e9589411

YSCH-9589.04.01.01

e3103, e3104

YSCH-3103, 3104

e9589511

YSCH-9589.05.01.01

e3112

YSCH-3112

e9946111-e9946114

YSCH-9946.01.01.01-.04

e3878

YSCH-3878

e9946121

YSCH-9946.01.02.01

e4793

YSCH-4793

e9946211-e9946213

YSCH-9946.02.01.01-.03

e4795

YSCH-4795

e9946311, e9946312

YSCH-9946.03.01.01, .02

e4951

YSCH-4951

e9946411

YSCH-9946.04.01.01

e54581-e54587

YSCH-5458.01-.07

e9946511

YSCH-9946.05.01.01

e67841-e67847

YSCH-6784.01-.07

e199111M, Y

YSCH-10099.01.01.01~M, ~Y

e69381-e69386

YSCH-6938.01-.06

e199112M, Y

YSCH-10099.01.01.02~M, ~Y

e694311, e694312

YSCH-6943.01.01, .02

e199113M, Y

YSCH-10099.01.01.03~M, ~Y

e694321

YSCH-6943.02.01

e199211M, Y

YSCH-10099.02.01.01~M, ~Y

e694331

YSCH-6943.03.01

e199212M, Y

YSCH-10099.02.01.02~M, ~Y

e714211

YSCH-7142.01.01

e199213M, Y

YSCH-10099.02.01.03~M, ~Y

e714221

YSCH-7142.02.01

e199311M, Y

YSCH-10099.03.01.01~M, ~Y

e714231

YSCH-7142.03.01

e11700

YSCH-11700

e714251

YSCH-7142.05.01

e11900M, Y

YSCH-11900~M, ~Y

e71921-e71927

YSCH-7192.01-.07

e13300

YSCH-13300

e841611-e841613

YSCH-8416.01.01-.03

e273371-e273375

YSCH-27337.01-.05

e841621-e841623

YSCH-8416.02.01-.03

e234501-e234503

YSCH-23450.01-.03

e841631, e841632

YSCH-8416.03.01, .02

t7000_1-t7000_4

YTRN-7000.01-.04

e841641, e841642

YSCH-8416.04.01, .02

pubid

PUBID

e841651

YSCH-8416.05.01

dths

CV_HS_DIPLOMA

e841661

YSCH-8416.06.01

dtged

CV_GED

e841671

YSCH-8416.07.01

dtaa

CV_AA_DEGREE

e913111-e913113

YSCH-9131.01.01-.03

dtba

CV_BA_DEGREE

e913121-e913123

YSCH-9131.02.01-.03

roscode1-roscode5

NEWSCHOOL_SCHCODE.01-.05

id PUBID    

 Codes for Created Variables

Enrollment Status (CV_ENROLLSTAT) 

1. not enrolled, no high school degree, no GED
2. not enrolled, GED, but no high school degree
3. not enrolled, a high school degree, no GED
4. not enrolled, some college
5. not enrolled, 2 year college graduate
6. not enrolled, 4 year college graduate

7. not enrolled, graduate degree
8. enrolled in grades 1-12
9. enrolled in a 2 year college
10. enrolled in a 4 year program
11. enrolled in a graduate program

 

Highest Grade Completed (CV_HGC_EVER, CV_HGC_YR)

0.  none
1.  first
2.  second
3.  third
4.  fourth
5.  fifth

6.  sixth
7.  seventh
8.  eighth
9.  ninth
10. tenth
11. eleventh

12. twelvth
13. first year college
14. second year college
15. third year college
16. fourth year college

17. fifth year college
18. sixth year college
19. seventh year college
20. eighth year college
95. ungraded                

 

Highest Degree Received (CV_HIGHEST_DEGREE_EVER, CV_HIGHEST_DEGREE_YR)

0. none
1. GED
2. high school diploma
3. junior college or 2-year associate degree

4. bachelor's degree (B.A., B.S., or unspecified)
5. master's degree
6. doctoral degree
7. professional degree (M.D., L.L.D., D.D.S., J.D.)

This program first creates an enrollment status variable for each respondent.  It then identifies the highest grade completed by the respondent as of the  round 4 interview date and as of June 30, 2000.  Finally, it determines the highest degree or diploma received by the respondent as of the same two dates.

Notes on education variables:  Respondents who report receiving both a GED and a high school diploma are coded as receiving a high school diploma.  Respondents who report completing 12th grade but do not report receiving a diploma or GED are coded as having completed 12th grade (in the GRSURV and GRJUNE variables, if applicable) but are not credited with a diploma/GED in the ENCAT, DEGSURV, or DEGJUNE variables.  Researchers interested in diploma receipt should use the DEGSURV or ENCAT variables and should not assume that completion of 12th grade signifies receipt of a high school diploma.

Some respondents provided conflicting information about grades attended/completed in the schooling loops (e8416 and e9589) versus the single items (e3112, e2857).  In Round 4, approximately 148 respondents have conflicting grade reports, identified using the code:

where (enroll=0 and 12>=e3112^=grsurv>0 and degsurv not in (1,2) and grsurv^=95)
or (0<maxgrade=grsurv<95 and grsurv^=e3112 and e3112<=12)

This program gives priority to information provided in the schooling loops over that provided on single item questions.  Users may wish to check the CV_HGC_EVER variable against student single item self-reports of HGC (e3112), which in many cases indicates a higher grade was completed than that reported in the loops.

Thirty-six respondents gave irreconcilable conflicting reports regarding their school attendance in the loops versus the single-item sections of the questionnaire.  These respondents are assigned invalid skips (-3) because no reasonable determination of their enrollment status and grades completed can be made.  Specifically, respondents are assigned a -3 if they a) report being not enrolled, b) report a highest grade completed on the single items (e3112) that is greater than the CV_HIGHEST_DEGREE_EVER for the prior round, but do not indicate completing this grade in a schooling loop, and c) report that their highest grade attended (e2857) is two or more greater than the highest grade completed in the previous round. If these respondents provide valid information on degrees earned, that variable will have a valid value.


 /********ENROLLMENT STATUS********/

Initialize variables;

enroll=-3;                 *Indicator of whether respondent currently enrolled ;

encat=-3;                  *Enrollment status variable (including educational attainment) ;

dip=0;                      *Indicator of whether respondent has a hs diploma (check previous rounds);

ged=0;                      *Indicator of whether respondent has a GED (check previous rounds);

hs=0;                       *Indicator of whether respondent is currently attending grades 1 to 12 ;

college=0;                  *Indicator of whether respondent is current attending 2 or 4 year college ;

flagcol=0;                  *Indicator to flag respondents currently attending grades 1 to 12 and enrolled in college ;

flagloop=0;                 *Indicator to flag respondents going through old school re-enrollment loop twice ;

 

* Defining arrays for use later in the program;

array e5458 e54581 e54582 e54583 e54584 ;

array e6784 e67841 e67842 e67843 e67844 ;

array e7192 e71921 e71922 e71923 e71924 ;

array e23450 e234501 e234502 e234503;

array e27337 e273371 e273372 e273373 e273374;

array t7000a t7000_1 t7000_2 t7000_3 t7000_4 t70001r1 t70002r1 t70003r1 t70001r2 t70002r2 t70001r3 t70002r3 t70003r3 t70004r3;

array e6938 e69381 e69382 e69383;

array e69431 e694311 e694321 blah;                  /*"Blah" is a filler variable to make the array match in N*/

array e7142 e714211 e714221 e714231;

array roscode roscode1 roscode2 roscode3 roscode4 roscode5;

 

somecoll=0; /*flag to indicate whether R attended a college (in a degree program) in current or previous rounds*/

 

**HAND EDIT Patch to fix problems on GED receipt from R2;

if id=1099 then do; ged=1; dtged= 208;  end;        

if id=2004 then do; ged=1; dtged= 209;  end;         

if id=2099 then do; ged=1; dtged= 221;  end;         

if id=3573 then do; ged=1; dtged= 223;  end;         

if id=3987 then do; ged=1; dtged= 227;  end;         

if id=4402 then do; ged=1; dtged= 219;  end;         

if id=4986 then do; ged=1; dtged= 217;  end;         

if id=4988 then do; ged=1; dtged= 207;  end;         

if id=7634 then do; ged=1; dtged= 222;  end;         

if id=7004 then ged=1;                 /*reports receipt of GED in comments on e13900*/

 

*ENROLLMENT STATUS Begin by determining whether the respondent is enrolled;

     *Note that summer vacations are included as part of the enrollment period;

        if e4951=-5 then do; enroll=-5; encat=-5; end;

* Continuously enrolled in old school since dli (or start date);

        if e4795=1 or e4793=1 then enroll=1;

* Not continuously enrolled and not enrolled in any other schools since;

        if e4795=0 and e4951=0 then enroll=0;

* Not continuously enrolled in old school since dli, not re-enrolled in old school since dli, and no new schools since dli;

        if e1605=-2 then enroll=-2;

        if e4795=0 and e1605=0 and e4951=0 then enroll=0;

        if e4793=0 and e1605=0 and e4951=0 then enroll=0;

        if e3878=0 then enroll=0;

* Not continuously enrolled in old school since dli, have reenrolled in old school a maximum of 1 time, have not reported any other schools attended since;

        if e4793=0 and e1605=1 and e16151=1 then enroll=1;

* Not continuously enrolled in old school since dli, have received degree and/or completed course work at old school (i.e., YSCH-1600=1), and has not reported new school since;

        if e4793=0 and e4951=0 and e1605=-4 then enroll=0;

 

*RE-ENROLLMENT IN OLD SCHOOL  Note that respondents can only re-enroll loop once and it is not possible to determine which individuals re-enrolled additional times  Individuals who were not continuously enrolled up to the interview during the last enrollment spell and who do not report any new schools will be coded as not enrolled;

   *Flag those who re-enroll;

        if e16241=1 then flagloop=1;

        if (e4795=0 and e1605=1) then do;

                if e16151=1 then enroll=1;                                                   * continuously enrolled in old school;

                if e16151=0 and e16241=0 and e16271=0 and e4951=0 then enroll=0; 

                * not continuously enrolled in old school, first time through loop,

                no other re-enrollments at old school and no new schools reported ;

        end;

 

* ENROLLMENT IN NEW SCHOOLS;

        if (e4951=1 or e3878=1) then do;

                do i=1 to 4;                                                                             * allow for up to four new schools to be recorded;

                        if e6784(i)=1 and e7192(i)=0 then enroll=1;                  * continuously enrolled in new school, no other new schools reported;

                        if e6784(i)=0 and e7192(i)=0 then enroll=0;                  * not continuously enrolled in new school, did not re-enroll in new school, no other new schools reported;

                end;

         end;

 

* make sure that all members of the e6784 array are in the dataset - R's who leave a new school because they graduated or finished coursework will not be asked this question;

 

* RE-ENROLLMENT PERIODS IN NEW SCHOOLS;

        if (e4951=1 or e3878=1) then do;

                do i=1 to 3;                                                                             * allow for up to three times through this loop;

                        if (e6784(i)=0 and e6938(i)=1) then do;

                                if e69431(i)=1 and e7192(i)=0 then enroll=1; * continuously re-enrolled in new school, no other new schools reported;

                                if e69431(i)=0 and e7142(i)=0 and e7192(i)=0 then enroll=0; * not continuously re-enrolled in new school, not re-enrolled in new school for a subsequent spell, no other new schools reported ;

                        end;

                end;

        end;

 

* ENROLLMENT STATUS CATEGORIES;

*First create variables to flag those who have ever received a GED or hs diploma;

* DIP is set to 1 if R received HS diploma in rounds 1 through 4;

        if e11700=1 or e11700r1=1 or e26700r1=1 or e11700r2=1 or e11700r3=1 then dip=1;

        else if e11700 in (-1, -2, -3) or e11700r1 in (-1, -2, -3) or e26700r1 in (-1, -2, -3) or e11700r2 in (-1, -2, -3) or e11700r3 in (-1, -2, -3) then dip=-3;

 

* GED is set to 1 if R received GED in rounds 1 through 4;

* NOTE:  e13300 is not available for R2--use CV (encat2) from R2;

        if e28200r1=1 or e13300=1 or e13300r3=1 or e234501=9 or e234502=9 or encat2=2 then ged=1;

        else if e28200r1 in (-1, -2, -3) or e13300 in (-1, -2, -3) then ged=-3;

        do i=1 to 13;

           if t7000a(i)=4 then ged=1;

           if ged=0 and t7000a(i) in (-1, -2, -3) then ged=-3;

        end;

 

* NOT ENROLLED;

if (enroll=0) then do;                 * Flag to indicate that R attended college (in a degree program) in a previous round;

        if encat3 in (4,5,6,7,9,10,11) and degsurv3 in (1,2) then somecoll=1;

        if (collr2=1) then somecoll=1;

        if encat1 in (4,5,6,7,9,10,11) and degsurv1 in (1,2) then somecoll=1;

 

        * No high school degree, no GED;

        if ged le 0 and dip le 0 then encat=1;

 

        * GED;

        if ged=1 then encat=2;

       

        * High school degree;

        if dip=1 then encat=3;

 

        * Highest grade attended is at least 1 year of college;

        * R reports a college on the roster and indicates being enrolled in a college degree program (e27337<7 and e27337^=2) and R has HS diploma/GED;

        * PLEASE NOTE:  Those who indicated attending a college and working toward a "vocational or technical certificate" (e27337=2) are coded as not having attended college (because these credits typically won't transfer for a BA or AA degree;

        do i=1 to 4;

           if roscode(i) in (4,5) and e27337(i) in (-2,-3) then do; encat=-3; end;

           if dip=1 and roscode(i) in (4,5) and (e27337(i)>6 or e27337(i)=2) and somecoll=0 then do; encat=3; end;

           if ged=1 and dip=0 and roscode(i) in (4,5) and (e27337(i)>6 or e27337(i)=2) and 13<=e2857<=20 and somecoll=0 then do; encat=2; end;

           if ged=0 & dip=0 and roscode (i) in (4,5) and (e27337(i)<=6 or e27337(i)=2) and 13<=e2857<=20 then encat=-3;

        end;

         

/* if R attended any college (and was enrolled in a degree program), but is not currenly enrolled encat=4 since they attended some college;*/

        prevrnd=0;

        do i=1 to 4;

           if roscode(i) in (4,5) and (1<=e27337(i)<=6 and e27337(i)^=2) and (13<=e2857<=20 or e3112>=12) then encat=4; /*r attended some college in current round*/

        end; 

 

        if somecoll=1 then encat=4; /*if R attended college in a prior round*/

        * Received junior college or 2 year associate degree (need to check each school);

        if (e234501=1 or e234502=1 or e234503=1) then encat=5;

        * Received bachelor's degree (need to check each school);

        if (e234501=3 or e234502=3 or e234503=3) then encat=6;

        * Received master's, doctoral or professional degree (need to check each school) ;

        do i=1 to 3; if e23450(i) in(4,5,6) then encat=7; end;

 

end;

 

flagvoc=0; /*flag for Rs enrolled in "vocational/technical certificate program"*/

do i=1 to 4; if e27337(i)=2 then flagvoc=1; end;

nodegree=0; /*flag for Rs enrolled in non-degree college programs*/

 

* ENROLLED ;

if (enroll=1) then do;                           * missing values ;

        if (roscode1=-2 or roscode2=-2 or roscode3=-2 or roscode4=-2) then encat=-3;

        if (e273371=-2 or e273372=-2 or e273373=-2)then encat=-3;

        if (e273371=-2 or e273372=-2 or e273373=-2)then college=-3;

        if (e273371=-2 or e273372=-2 or e273373=-2)then flagcol=-3;

 

        * Highest grade attended as of today less than or equal to 12th grade and don't have a diploma/GED ;

        if 1<=e2857<=12 and dip le 0 and ged le 0 then encat=8;

 

****  Use roster info on sch enrollment to identify type of school enrolled in.  2year/4year college should refer to the TYPE OF INSTITUTION (from roster info) not the TYPE OF DEGREE PROGRAM (since many attending 2-year schools report being in a 4-year degree program because that is their ultimate degree goal, thus the type of institution better reflects their current enrollment status); 

*Those who completed high school (or a GED), but report being enrolled in a grade>12 and do not indentify a college on the school rosters are coded as -3 on encat;

        do i=1 to 4;

           if enroll=1 and (dip=1 or ged=1) and 95>e2857>=13 and roscode(i) in (1,2,3,6) then encat=-3;

         end;               

 

*Those who completed high school (or a GED), but report being enrolled in a grade<=12 are coded as -3 on encat;

         do i=1 to 4;

           if enroll=1 and (dip=1 or ged=1) and e2857<=12 then encat=-3;

        end;                

 

*if enr. in 2-year school, working toward a degree, and current grade is greater than high school then encat=2 year college;

*Only use up to roscode4 since there are no college attendees in roscode6 or 7;

*if R enr. in a 2/4 year school (roscode in 4,5) and e27337=9 and R doesn't have a diploma then R is working toward a GED;

        do i=1 to 4;

           if dip=1 and roscode(i)=4 and e27337(i)=2 then do; encat=3; nodegree=1; end;

           if ged=1 and roscode(i)=4 and e27337(i)=2 then do; encat=2; nodegree=1; end;

           if ged=0 and dip=0 and roscode(i) in (4,5) and e27337(i)=9 then encat=8;

           if ((roscode(i)=4 and e27337(i) in (1,3,4,5,6)) and e2857 ge 13 and e2857 lt 95) then encat=9;

        end;

 

*if enr. in 4-year school, working toward a degree and current grade is greater than high school then encat=4 year college;

        do i=1 to 4;

           if dip=1 and roscode(i)=5 and e27337(i)=2 then do; encat=3; nodegree=1; end;

           if ged=1 and roscode(i)=5 and e27337(i)=2 then do; encat=2; nodegree=1; end;

           if ((roscode(i)=5 and e27337(i) in (1,3,4,5,6)) and e2857 ge 13 and e2857 lt 95) then encat=10;

        end;

 

/*Rs who have obtained a BA, are still enrolled in a post-secondary institution, and report working toward a graduate or professional degree should be coded as enrolled in a graduate program (this code is based on degree program, not type of institution--again, there is a reporting problem here, with some whose ultimate degree goal is a post-baccalaureate degree indicating that they are currently working toward the higher degree, even though they have not yet completed a BA/BS*/

*Enrolled in a university, working towards a graduate degree and current grade is greater than or equal to 4th year college;

        do i=1 to 4;  

           if roscode(i)=5 and (4<=e27337(i)<=6) and 16<=e2857 lt 95 then encat=11;

        end;

end;

 

* The following is for respondents who are enrolled, have no evidence of a high school diploma, yet reported that highest grade attended was 1st year of college.  Since there is no evidence these people have a diploma and have not attended a new school, they will be placed under enrolled in grades 1-12 ;

        flagged=0;

        if enroll=1 and e2857=13 and dip=0 and ged=0 then encat=8;

        do i=1 to 4;

           if enroll=1 and roscode(i) in (4.5) and e2857>=13 and dip=0 and ged=0 and e27337(i) in (7,8) then encat=8;

           if enroll=1 and roscode(i) in (4,5) and e2857>=13 and dip=0 and ged=0 and e27337(i) in (7,8) then do; flagged=1; nodegree=1; end;

        end;

 

* The following is for respondents who have a high school diploma, a valid date for the diploma, have not enrolled in a new school since dli, and report the highest grade completed being 12.  They have been categorized as not enrolled with a high school diploma (encat=3) despite the fact that these respondents claim to be continuously enrolled since dli.  Since there is no evidence of college from the respondent, they have been grouped as not enrolled;

        if e11700=1 and e11900m>0 and e11900y>0 and e4951=0 and e3112=12 then encat=3;

 

* The following is for respondents who report the highest grade attended as ungraded (YSCH-2857=95), show no evidence of a high school diploma, were skipped out of the homeschool question, and are enrolled.  Again, since there is no evidence of a high school diploma, they are regarded as enrolled between grades 1 and 12 ;

        if e2857=95 and dip=0 and ged=0 and enroll=1 then encat=8;

       

*The following is for Rs who received a HS diploma, provide a valid date for diploma receipt, yet also report current enrollment in a high school.  Because these Rs have obtained a diploma, they are characterized as 3, not enrolled, a high school degree, no GED;

       flagende=0; /*if r reports being enrolled and already has a diploma*/

       do i=1 to 5;

         if enroll=1 and e11700=1 and e11900m>0 and e11900y>0 and e3112=12 and roscode(i)=3 then do; encat=3; flagende=1; end;

        end;      

                 

* Flag individuals who are enrolled in grades 1 to 12 and are enrolled in 2 or 4 year colleges (could be getting credits towards GED)  For created enrollment status variable above, the flagged individuals will fall into category 8 ;

        if enroll=1 and 1<=e2857<=12 and dip=0 and ged=0 then hs=1;

        if enroll=1 and (e273371=1 or e273372=1 or e273373=1 or e273374=1 or e273371=3 or e273372=3 or e273373=3 or e273374=3) then college=1;

        if hs=1 and college=1 then do; flagcol=1; encat=8; end;

 

*Those who completed high school, report being enrolled in college, but are in a non-degree program are coded as not enrolled, a high school degree (3).  If they previously attended a college in a degree program they are coded as not enrolled, some college (4).  Those whose most recent enrollment is in a degree program are coded as enrolled in a 2year (encat=9) or 4year (encat=10) school;

        * Flag to indicate that R attended college (in a degree program) in a previous round (who did not correct HGA as of last int. (e2806) to indicate that HGA <13;

        if encat3 in (4,5,6,7,9,10,11) and ((e2806 in (-4,-5)) or (e2806>=13)) then somecoll=1;

        if (collr2=1) then somecoll=1;

        if encat1 in (4,5,6,7,9,10,11) and degsurv1 in (1,2) then somecoll=1;

        do i=1 to 4;

           if enroll=1 and roscode(i) in (4,5) and e27337(i) in (1,3,4,5,6) then somecoll=1;

           if enroll=1 and dip=1 and roscode(i) in (4,5) and e27337(i) in (2,7,8) and somecoll=0 then do; encat=3; nodegree=1; end;

           if enroll=1 and ged=1 and roscode(i) in (4,5) and e27337(i) in (2,7,8) and somecoll=0 then do; encat=2; nodegree=1; end;

           if enroll=1  and roscode(i) in (4,5) and e27337(i) in (2,7,8) and somecoll=1 then encat=4;

           if enroll=1  and roscode(i) in (4,5) and e27337(i) in (2,7,8) and somecoll=1 then encat=4;

           if enroll=1  and roscode(i)=4 and e27337(i) in (1,3,4,5,6) then encat=9;

           if enroll=1  and roscode(i)=5 and e27337(i) in (1,3,4,5,6) then encat=10;

        end;

 

check=0;

if e4795=1 and encat in (1,2,3,4,5,6,7) and flagende=0 and nodegree=0 then check=1;

 

**Rs who report continuous enrollment in a DLI school, who subsequently report an additional school (typically the first school is a 4 year college and R is working toward a BA and the second school is a 2/4 year college R attends in the summer in a non-degree program.  This code overwrites code above that erroneously replaces the continuous enrollment information with the more recently reported non-degree school.  A report of continuous enrollment in high school is overwritten with college enrollment if the R reports earning a diploma or GED--Continuous enrollment in a high school is overwritten with encat in (2,3) depending on degree reported;

**Must fix "ENROLL" flag because this flag is used in the grades skipped/repeated program;

**NOTE:  if ROSCODE1=2 and ROSCODE2-4 in (4,5) then the case must be hand edited to ensure accuracy--there is only one such case in R4;

if e4795=1 and roscode1=4 and e273371 in (1,3,4,5,6) then do; encat=9; enroll=1; end;

if e4795=1 and roscode1=5 and e273371 in (1,3,4,5,6) then do; encat=10; enroll=1; end;

if e4795=1 and roscode1 in (2,3) and dip=0 and ged=0 then do; encat=8; enroll=1; end;

if e4795=1 and roscode1=2 and roscode2=3 and dip=0 and ged=0 then do; encat=8; enroll=1; end;

 

do i=2 to 4;

   if e4795=1 and roscode1=3  and roscode(i)=4 and e27337(i) in (1,3,4,5,6) then do; encat=9; enroll=1; end;

   if e4795=1 and roscode1=3 and roscode(i)=5 and e27337(i) in (1,3,4,5,6) then do; encat=10; enroll=1; end;

   if e4795=1 and roscode1=3 and roscode2 in (-4,1,2,3) and roscode3 in (-4,1,2,3) and roscode4 in (-4,1,2,3) then do;

      if dip=1 then encat=3;

      if ged=1 then encat=2;

   end;

end;

 

flagndeg=0;

do i=1 to 4; if e27337(i) in (2,7,8) then flagndeg=1; end;

 

/***********HAND EDITS***********/

/*the cases below were found using the code: "where dip=0 and ged=0 and encat in (4,5,6,7,9,10,11);"*/

if id=746 then encat=-3;                                                 /*invalid code for type of college program in e27337*/

if id=3764 then encat=8;                                 /*enr. in both HS and College, not done with HS*/

if id=2887 then encat=8;                                 /*same as above*/

if id=6932 then do; encat=2; ged=1; end;                 /*r indicates GED receipt on comments in YSCH-13900*/

if id=548 then encat=8;                                 /*comments on YSCH-13900*/

if id=884 then encat=8;                                 /*comments on YSCH-13900*/

if id=2370 then ged=1;                                    /*comments on YSCH-13900*/

if id=2372 then ged=1;                                    /*comments on YSCH-13900*/

if id=2380 then encat=8;                                 /*concurrent enrollment in HS and College-YSCH-13900*/

if id=2802 then encat=8;                                 /*concurrent enrollment in HS and College*/

if id=3897 then encat=8;                                 /*concurrent enrollment in HS and College*/

if id=4553 then encat=8;                                 /*concurrent enrollment in HS and College*/

if id=4583 then encat=8;                                 /*concurrent enrollment*/

if id=4618 then encat=8;                                 /*concurrent enrollment*/

if id=5278 then encat=8;                                 /*completing HS diploma in a college*/

if id=5438 then encat=8;                                 /*concurrent enrollment*/

if id=5485 then encat=8;                                 /*concurrent enrollment*/

if id=5684 then encat=8;                                 /*working on GED at a junior college*/

if id=6343 then encat=8;                                 /*concurrent enrollment*/

if id=6945 then encat=8;                                 /*concurrent enrollment*/

if id=7266 then encat=8;                                 /*working on GED at a junior college*/

if id=7652 then encat=8;                                 /*enrolled in "adult high school" program at a college*/

if id=8498 then encat=8;                                 /*concurrent enrollment*/

if id=1570 then encat=10; /*R completed 12th grade and then started attending college, school code incorrect*/

 


/********* HIGHEST GRADE COMPLETED AS OF THE SURVEY DATE (GRSURV) *********/

* Create four arrays: the first array includes items that ask if R has completed for which at least one R answered positively, the second and third arrays list all of the questions giving the month and year of completion, and the fourth array lists the questions indicating the grades that the R may or may not have completed.  ROSCODE and e27337 arrays are also employed to ensure consistency between ENCAT and GRSURV variables--if R reports attending a grade that is > 12 but doesn't report being enrolled in a degree program at a college or university, they are coded as having completed 12th grade;

array logic e913111 e913112 e913121 e913122 e913131 e913141 e913151 e9946111 e9946112 e9946113 e9946114 e9946211 e9946212 e9946311 e9946312;

array cyear e933511y e933512y e933521y e933522y e933531y e933541y e933551y e199111y e199112y e199113y e199114y e199211y e199212y e199311y e199312y;

array cmonth e933511m e933512m e933521m e933522m e933531m e933541m e933551m e199111m e199112m e199113m e199114m e199211m e199212m e199311m e199312m; 

array grade e841611 e841612 e841621 e841622 e841631 e841641 e841651 e9589111 e9589112 e9589113 e9589114 e9589211 e9589212 e9589311 e9589312;

 

maxgrade=-16; compmon=-16; compyr=-16; everloop=0; badgrade=0;

assign='unassigned';

 

**Select cases where there is a valid grade and it is greater than the previously recorded grade;

do i=1 to 15;

   if grade(i) ge 0 and grade(i) gt maxgrade then do;

       if logic(i)=1 then do; assign='from loop'; maxgrade=grade(i); compmon=cmonth(i); compyr=cyear(i);

           if cyear(i) lt 2000 or (cyear(i) eq 2000 and cmonth(i) le 6) then do; grjune=grade(i); cjumon=cmonth(i); cjuyr=cyear(i); end;

       end;

       else if logic(i) in (-1, -2, -3) then do; maxgrade=logic(i); assign='logic missing  '; end;

    end;

    if grade(i) in (0,-1, -2, -3,-4) and logic(i) gt -4 then do; maxgrade=-55; assign='grade invalid  '; end;

    if logic(i) gt -4 then everloop=1;                 *Flag all observations that go through a grade loop at least once;

end;

 

*Create variable indicating highest grade attended from loops;

hgaloop=e841611;

do i=2 to 15;

     if grade(i) gt hgaloop then do; hgaloop=grade(i); end;

end;

 

*Create variable indicating grsurv for previous interview;

grsprev=grsurv3;

if grsurv3 lt 0 then grsprev=grsurv2;

if grsurv2 lt 0 then grsprev=grsurv1;

if e3061 ge 0 then grsprev=e3061;

 

*Create final GRSURV variable;  ****Make GRSURV equal to maximum grade;

grsurv=maxgrade;

**** If non-interview then grsurv=-5;

if e3112=-5 then do; grsurv=-5; assign = 'non-interview'; ged=-5; dip=-5;

end;

 

**If invalid or incorrect grade data was read into loop or if r. never goes through the loops (usually because they now attend 2 or 4 year colleges, sometimes because of infosheet error) AND they attended school at some time either at dli or since dli, then replace grsurv with single item.  HOWEVER:  this single item must be checked against the roster data:  if R completed high school, never reports attending a college in the loop/roster information, but indicates enrollment in a grade > 12 in the single item measure, the GRSURV variable is set to 12 since no college degree program has been reported;

subsitem=0;

if ((e841611 le 0 and e913111 ne -4) or grsurv=-55 or everloop=0) and e3878 ne 0 and e3112 ne -5 then do;

   do i=1 to 4;

      if e3112>12 and roscode(i) in (4,5) and e27337(i) in (2,7,8,9) then grsurv=12;

      if e3112>12 and encat in (4,5,6,7,9,10,11) then grsurv=e3112;

      if e3112>12 and (dip=0 and ged=0) and roscode(i) ne 4 and roscode(i) ne 5 then grsurv=-16;

      if e3112>=12 and roscode(i) in (4,5) and e27337(i) in (1,3,4,5,6) then grsurv=e3112;

      if e3112<12 and (dip=0 and ged=0) then grsurv=e3112;

      if e3112>=12 and dip=0 and ged=0 and roscode(i) in (1,3,6) then grsurv=-16;

      subsitem=1;

      if e841611 le 0 and e913111 ne -4 then assign= 'Enrolled, bad grade:  subs. item';

      else if everloop=0 then assign='Enrolled, not thru loops: subs. item';

      else if maxgrade=-55 then assign='Enrolled, bad grade: subs. item';

   end;

end;

 

***If r. was enrolled but didn't confirm completing a grade, we substitute a value equal to one less than highest grade attended from loop using a conservative approach:

        * if the hga from loop is equal to the single item hga (e2857) substitute hgaloop-1

        * otherwise if the hga from loop minus 1 is equal to the single item hgc (e3112) substitute hgaloop-1

        * otherwise if the the single item hgc (e3112) is equal to the previous hgc then substitute e3112

        * if none of the other statements are true and hgaloop-1 is greater than e3112 substitute e3112;

subshgam=0;

tempflag=0;

if grsurv eq -16 and enroll=1 then do;

   if hgaloop=e2857 then do; subshgam=1; grsurv=hgaloop-1; assign= 'Enrolled-no loop hgc-hgaloop eq 2857: subs hgaloop-1'; end; 

   else if hgaloop-1 eq e3112 then do; subshgam=1; grsurv=hgaloop-1; assign= 'Enrolled-no loop hgc-hgaloop-1 eq e3112: subs hgaloop-1'; end;

   else if grsprev eq e3112 then do; subsitem=1; grsurv=e3112; assign= 'Enrolled-no loop hgc-e3112 eq grsprev: subs item'; end;

   else if hgaloop-1 gt e3112 then do; subsitem=1; grsurv=e3112; assign= 'Enrolled-no loop hgc-hgaloop-1 gt item: subs item'; end;

   else if hgaloop le e3112 and grsprev lt e3112 then do; subsprev=1; grsurv=grsprev; assign= 'Enrolled-no loop hgc-said no to grade: subs prev'; end;

end;

 

***If someone confirmed completing a grade in the loop and didn't know the year of completion, then use the loop data or the single item (YSCH-3112) whichever is lower;

dateloop=0;

dateitem=0;

if maxgrade=grsurv and compyr=-2 and maxgrade gt e3112 then do; dateitem=1; grsurv=e3112; assign= 'subs. item: no date item lower'; subsitem=1; end;

else if maxgrade=grsurv and compyr=-2 and maxgrade le e3112 then do; dateloop=1; grsurv=maxgrade; assign= 'subs. loop: no date loop data lower'; subsitem=1; end;

else if compyr ne -2 then do; dateloop=.; dateitem=.; end;

 

***If someone reported receiving a ged or h.s. diploma, then set their hgc to 12;

set12=0;

if (dip=1 or ged=1) and grsurv lt 12 and e3112 ne -5 then do; set12=1; grsurv=12; assign= 'set to 12: dip or ged'; end;

 

**College attendance is not reported in the loops and college year completion should therefore make use of the single item HGC, but only if enrollment in a college degree program (AA, BA, MA, etc) is reported (E27337) in the current or a previous round.  Use ENCAT to determine whether R was ever in college.  BUT if e3112<12 and R reports completing a High School diploma or GED then GRSURV is set equal to 12;

if encat in (4,5,6,7,9,10,11) and 95>=e3112>=12 then do; grsurv=e3112; assign='college'; end;

if encat in (4,5,6,7,9,10,11) and 95=>e3112<12 and (dip=1 or ged=1) then do; grsurv=12; set12=1; assign='college, set to 12'; end;

if encat in (4,5,6,7,9,10,11) and 95>e3112<12 and grsurv3>12 and encat3 in (4,5,6,7,9,10,11) then do;

   if e3061<0 then grsurv=grsurv3;

   if e3061>0 then grsurv=e3061;

   assign='college, previous round';

end;

if (encat in (4,5,6,7,9,10,11) and 95>=e3112<12) or (encat in (4,5,6,7,9,10,11) and e3112<0) then do; grsurv=-3; assign='college, unclear'; end;

 

****If R reports completing a grade in a previous round that is > GRSURV for the current round and the single item provides a more consistent grade, the single item is used.  If the single item is also inconsistent, the GRSURV value from the previous round is used;

disagree=0;

oldgrade=grsurv3;  if grsurv3<0 then oldgrade=grsprev;

if e3061>0 then oldgrade=e3061; /*use corrections of previous round info*/

if 0<oldgrade<95 and oldgrade>GRSURV>0 then disagree=1;

if disagree=1 then do;

   if (95>e3112>12 or 95>oldgrade>12) and encat in (4,5,6,7,9,10,11) then do; /*don't use single item of >12 if no college reported*/

      if oldgrade=(e3112-1) then grsurv=e3112;

      if oldgrade=(e3112-2) then grsurv=e3112;

      if oldgrade=e3112 then grsurv=e3112;

      if oldgrade>e3112 then grsurv=oldgrade;

      assign='disagree:  college reported, single item or prior round';

   end;

   if e3112<=12 then do;

      if oldgrade=(e3112-1) then grsurv=e3112;

      if oldgrade=(e3112-2) then grsurv=e3112;

      if oldgrade=95 then grsurv=e3112;

      if oldgrade=e3112 then grsurv=e3112;

      if oldgrade>e3112 then grsurv=oldgrade;

      assign='disagree:  replace with single item or prior round';

   end;

   if (95>e3112>12 or 95>oldgrade>12) and encat in (1,2,3,8,-3) then do; grsurv=-3; assign='disagree: no college reported'; end;

end;

 

**** Not enrolled: Assign previous highest grade completed and create a variable flagging observations that substituted the value of the previous year - if previous HGC is missing, then assign the single item;

subsprev=0;

if grsurv in (-16,-3) and enroll=0 and grsprev ge 0 then do;

     if compyr3 gt 0 and grsurv3 ge 0 then do;

         if e3061<0 then grsurv=grsurv3;

         if e3061>0 then grsurv=e3061; 

         subsprev=1;

         assign= 'Not enrolled-r3 value from loop: subs. r3';

     end;

     else if compyr3 le 0 then do; grsurv=e3112; subsitem=1; assign= 'Not enrolled-r3 value not from loop: subs. item'; end;

end;

else if grsurv in (-16,-3) and e3878=0 and grsprev lt 0 then do; grsurv=e3112; subsitem=1; assign= 'subs. item: not enrolled,bad data prev'; end;

 

****Flag Rs whose response highest grade completed question doesn't agree with their highest grade completed obtained from the grade completion loops;

diffhgc=0;

if maxgrade ne e3112 and e3112 ge 0 and maxgrade ge 0 then diffhgc=1;

if maxgrade lt 0 or e3112 lt 0 then diffhgc=.;

 

**Hand edit case with inconsistent data on CVs**;

if id=2370 then grsurv=-3; /*r gives valid date for AA degree receipt but says HGC=11*/

 

if grsurv=0 then grsurv=-3;

if grsurv in (-55,-2,-3,-16) then grsurv=-3;

 


/********* HIGHEST GRADE COMPLETED AS OF JUNE 30, 2000 (GRJUNE) *********/

/*calculate date in continuous month of receipt of ged or hs diploma*/

/*Those who completed a grade that is > 12 do not provide completion dates for each college year (only for degrees). 

Thus, all Rs who attended college are coded as -4 on this variable since we do not have complete grade completion data*/

prev=0;

if grjune = . then do;

   if e3112 = -5 then grjune=-5;

   else if set12 = 1 then grjune=-3;

   else if (subsitem=1 or subshgam=1) and (grsurv le 12 or grsurv=95) then grjune=-3;

   else if (subsitem=1 or subshgam=1) and grsurv gt 12 and grsurv lt 95 then grjune=-4;

   else if e3878=0 or subsprev=1 then grjune=grsurv;

   else if assign= 'Hand edit because HGC is greater than HGA' and grsurv=grsurv3 then grjune=grsurv;

   else if assign= 'Hand edit because HGC is greater than HGA' and grsurv ne grsurv3 then grjune=-3;

   else if assign='Enrolled-grade not confirmed in loop-r2 loop good:subs r2' then grjune=grsurv;

   if set12=1 and ged=1 then do;

      if dtged gt 0 and dtged le 246 then grjune=grsurv;

      else if dtged gt 246 and maxgrade gt 0 then grjune=grsurv;

      else if dtged gt 246 and maxgrade le 0 and subsprev=1 then grjune=grsprev;

      else if dtged gt 246 and maxgrade le 0 and subsitem=1 then grjune=e3112;

   end;

   if set12=1 and dip=1 then do;

      if dths gt 0 and dths le 246 then grjune=grsurv;

      else if dths gt 246 and maxgrade gt 0 then grjune=grsurv;

      else if dths gt 246 and maxgrade le 0 then grjune=grsprev;

      else if dths gt 246 and maxgrade le 0 and subsitem=1 then grjune=e3112;

   end;

   if 0<dths le 246 and grsurv=12 then grjune=12;

   if 0<dtged le 246 and grsurv=12 then grjune=12;

   if 0<dths le 246 and grsurv>12 then grjune=-4;

   if 0<dtged le 246 and grsurv>12 then grjune=-4;

   if enroll=0 and e3010=0 and maxgrade<0 and grsurv=e3061 then grjune=e3061;

   if grsurv=grsprev then do; grjune=grsurv; if enroll=1 then funny=1; end;

   if 0<grsurv=grsurv3=e3061 and grjune<grsurv then grjune=grsurv;

      if compyr gt 0 and maxgrade=grsurv then do;

         if compyr in (1997,1998,1999) or (compyr=2000 and compmon ge 1 and compmon le 6) then grjune=grsurv;

         else if (compyr eq 2000 and compmon gt 6) or compyr gt 2000 then do; grjune=grsprev; prev=1; end;

      end;

   end;

   else if compyr=-2 then grjune=-3;

   if grjune=. or grjune=0 then grjune=-3;

 

/*if R attended college, they are valid skips on this variable since we do not have dates for completion of college terms.  However, if GRSURV=12 then they could reasonably have a value in this variable since in all cases June is PRIOR to the survey date, thus those who attended college whose grsurv=12 get a -3 on this variable.*/

if encat in (4,5,6,7,9,10,11,12) and grsurv>12 then grjune=-4;

 

/*Cases where R reported a higher grade in e3112 (HGC) than was reported in R3 AND who indicate their e2857 (HGA) is at least two greater than the grsurv3 value, but who indicated that they were not enrolled should be coded as a -3 on both grsurv and grjune since the R is providing conflicting information*/

if enroll=0 and (grsurv=grsprev) and 12=>e3112>grsurv and e2857>0 and e2857-2>=grsurv then do; grsurv=-3; grjune=-3; encat=-3; assign='Conflicting information'; end;

 


 

/********* HIGHEST DEGREE RECEIVED AS OF THE SURVEY DATE *********/

 

degsurv=0;

/* GED    */                            if ged=1 then degsurv=1; else if ged=-3 then degsurv=-3;

/* High school diploma */                if dip=1 then degsurv=2; else if dip=-3 then degsurv=-3;

if (e234501=1 or e234502=1 or e234503=1) then degsurv=3; /* Junior college or two-year associate degree */

   else if (e234501 in (-1, -2, -3) or e234502 in (-1, -2, -3) or e234503 in (-1, -2, -3)) then degsurv=-3;

if (e234501=3 or e234502=3 or e234503=3) then degsurv=4; /* Bachelor's degree */

   else if (e234501 in (-1, -2, -3) or e234502 in (-1, -2, -3) or e234503 in (-1, -2, -3)) then degsurv=-3;

if (e234501=4 or e234502=4 or e234503=4) then degsurv=5; /* Master's degree */

   else if (e234501 in (-1, -2, -3) or e234502 in (-1, -2, -3) or e234503 in (-1, -2, -3)) then degsurv=-3;

if (e234501=5 or e234502=5 or e234503=5) then degsurv=6; /* Doctoral degree */

   else if (e234501 in (-1, -2, -3) or e234502 in (-1, -2, -3) or e234503 in (-1, -2, -3)) then degsurv=-3;

if (e234501=6 or e234502=6 or e234503=6) then degsurv=7; /* Professional degree */

   else if (e234501 in (-1, -2, -3) or e234502 in (-1, -2, -3) or e234503 in (-1, -2, -3)) then degsurv=-3;

 


/********* HIGHEST DEGREE COMPLETED AS OF JUNE 30, 2000 *********/

dtma=0; dtdoc=0; dtprof=0; degjune=0;

/*  GED               */                 if dtged gt 0 and dtged le 246 then degjune=1; else if dtged in (-3, -2, -1) then degjune=-3;

/*  High school diploma */                if dths gt 0 and dths le 246 then degjune=2; else if dths in (-3, -2, -1) then degjune=-3;

/* Junior college or 2-year associate degree */ if dtaa gt 0 and dtaa le 246 then degjune=3; else if dtaa in (-3, -2, -1) then degjune=-3;

/* Bachelor's degree */                if dtba gt 0 and dtba le 246 then degjune=4; else if dtba in (-3, -2, -1) then degjune=-3;

/* Master's degree */                if dtma gt 0 and dtma le 246 then degjune=5; else if dtma in (-3, -2, -1) then degjune=-3;

/* Doctoral degree */                if dtdoc gt 0 and dtdoc le 246 then degjune=6; else if dtdoc in (-3, -2, -1) then degjune=-3;

/* Professional degree */                if dtprof gt 0 and dtprof le 246 then degjune=7; else if dtprof in (-3, -2, -1) then degjune=-3;

if e3112 eq -5 then do; degsurv=-5; degjune=-5; end;

if 0=<degsurv=degsurv3 and degjune^=degsurv3 then degjune=degsurv3;

 

/***********HAND EDITS***********/

*R does not have HS diploma but is enrolled in HS diploma/AA program at comm. college;

      if id=8357 then grsurv=13;

*case where interview date appears to have improperly been filled in for grade completion date;

      if id=166 then grsurv=11;

*Hand edit cases where no college is reported, but loop information identifies a GRSURV that is >12.  GRSURV is set to 12 since there is no report of a college.  These cases are identified by the code: where 95>grsurv>12 and encat in (1,2,3,8);

if id in (198, 361, 754, 1315, 1786, 2538, 3246, 4563, 4656, 6372, 6747, 7613, 8545) then do; grsurv=12; end;

/*still enrolled in 12th grade at int date*/

   if id=3871 then grsurv=11;

/*loop grade is incorrectly recorded as 1*/

   if id=393 then grjune=-3;

/*inconsistent report of grades--indicates GED completion in comments, set to 12*/

   if id=6932 then grsurv=12;

 

if grjune=. then grjune=-3;

if ged=1 and dtged<=0 then dateflag=1;

if dip=1 and dths<=0 then dateflag=1;

if dateflag=1 and degjune>=0 then degjune=-3;

if grsurv=-1 then grsurv=-3;

 

endsas;


Return to top


Current or Most Recent School Private or Parochial

Variables Created:  CV_SCHOOL_TYPE

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

typer1-typer3

CV_SCHOOL_TYPE (rounds 1-3)

sstop3m1, sstop3y1

NEWSCHOOL_STOP3.01~M, ~Y

speriod1-speriod7

NEWSCHOOL_PERIODS.01-.07

sstop3m2, sstop3y2

NEWSCHOOL_STOP3.02~M, ~Y

sstop1m1-sstop1m7

NEWSCHOOL_STOP1.01~M-.07~M

scode1-scode7

NEWSCHOOL_SCHCODE.01-.07

sstop1y1-sstop1y7

NEWSCHOOL_STOP1.01~Y-.07~Y

type1-type7

NEWSCHOOL_TYPE.01-.07

sstop2m1-sstop2m4

NEWSCHOOL_STOP2.01~M-.04~M

pubid

PUBID

sstop2y1-sstop2y4

NEWSCHOOL_STOP2.01~Y-.04~Y

Codes for Created Variable

1 = Public school
2 = Private, not parochial 
3 = Parochial
4 = Other

This program creates a variable indicating whether the respondent's current or most recent school is public, private, parochial, or other.  The program first determines which school is the most recent school (non-college) by examining the end dates for different enrollment periods and then picks up the school type from rounds 1-4 for the most recent school.  Users should note that school type is defined only for respondents attending grades 1-12.


/* Create the array variables.*/

* # of enrollment periods;                                                                   array speriod speriod1-speriod5;

* ending date for each period;                                                    array sstop1m sstop1m1-sstop1m5;

                                                                                                                array sstop1y sstop1y1-sstop1y5;

                                                                                                                array sstop2m sstop2m1-sstop2m5;

                                                                                                                array sstop2y sstop2y1-sstop2y5;

* school code, i.e. elementary school, high school or college;                array scode scode1-scode5;

*school type for round 4;                                                                 array stype type1-type5;

 

/*this gets rid of some duplicate school problems which remained in the roster after cleaning*/

do i=1 to 5;

   if scode[i]=4 or scode[i]=5 then do;

      if stype[i] ne -4 then do; stype[i]=-4; end;

   end;

   if scode[i] eq -4 and stype[i] ne -4 then do; stype[i]=-4; end;

end;

 

* ending time for each school;                                                     array srecm srecm1-srecm5;

                                                                                                                array srecy srecy1-srecy5;

* school length counting both month&year: the month length from jan. 1990 to the ending month for each school;

                                                                                                                array mlength mlength1-mlength5;

* school length counting only year: the year length from 1990 to the ending year for each school;

* this variable is to take care of the situation where ending year is invalid;

                                                                                                                array ylength ylength1-ylength5;

 

/*************************  step 1).find the most recent school. ***************************/

do i=1 to 5;

   srecm[i]=-4; srecy[i]=-4;

   if speriod[i]=1 and scode[i] in (1,2,3) then do; srecm[i]=sstop1m[i]; srecy[i]=sstop1y[i]; end;

   if speriod[i]=2 and scode[i] in (1,2,3) then do; srecm[i]=sstop2m[i]; srecy[i]=sstop2y[i]; end;

   if srecm[i] gt 0 and srecy[i] gt 0 then mlength[i]=12*(srecy[i]-1990)+srecm[i];

   else mlength[i]=-4;

   if srecy[i] gt 0 then ylength[i]=srecy[i]-1990;

   else ylength[i]=-4;

end;

 

maxmleng=max(mlength1,mlength2, mlength3, mlength4, mlength5);

if type1=-5 then maxmleng=-5;

maxyleng=max(ylength1,ylength2, ylength3, ylength4, ylength5);

if type1=-5 then maxyleng=-5;

 

/************** step 2).decide the school type from round 4 or the previous rounds.*************/

sltype1=-4;

* use only the year information first, then use the month information to make it more precise;

do i=1 to 5; if maxyleng>0 and ylength[i]=maxyleng then sltype1=stype[i]; end;

do i=1 to 5; if maxmleng>0 and mlength[i]=maxmleng then sltype1=stype[i]; end;

 

* flag the cases where multiple schools' ending year are the same as "maxyleng" and ending months are invalid answer;

flag=0;flag1=0;

do i=1 to 5;

   if ylength[i]=maxyleng and srecm[i] in (-1,-2,-3) then flag=flag+1;

   if ylength[i]=maxyleng then flag1=flag1+1;

end;

 

/* go back to fix the case such as 97.12 and 99.-2. because if "maxmleng" cover "maxyleng", the codes above will pick up the school end on 97.12 as most recent school.*/

if flag1=1 then do;

   do i=1 to 5; if ylength[i]=maxyleng then sltype1=stype[i]; end;

end;

* for the invalid answers;

if scode1 in (-1,-2,-3) or scode2 in (-1,-2,-3) or scode3 in (-1,-2,-3) or scode4 in (-1,-2,-3) or scode5 in (-1,-2,-3) then sltype1=-3;

if (scode1 in (1,2,3) & srecy1 in (-1,-2,-3)) | (scode2 in (1,2,3) & srecy2 in (-1,-2,-3)) | (scode3 in (1,2,3) & srecy3 in (-1,-2,-3)) | (scode4 in (1,2,3) & srecy4 in (-1,-2,-3)) | (scode5 in (1,2,3) & srecy5 in (-1,-2,-3)) then sltype1=-3;

if flag ge 2 then sltype1=-3;

* fix the case such as 99.12, 99.-2 99.-3 or 2000.12 2000.-2 for the above line;

if flag1 gt 1 then do;

   do i=1 to 5; if ylength[i]=maxyleng and srecm[i]=12 then sltype1=stype[i]; end;

end;

* flag the cases which has 98.02 and 98.-3;

flag2=0; if flag1 ge 2 and flag ge 1 then flag2=1;

* if the respondent only goes to one school in r4,input that school type;

if scode1 in (1,2,3) and scode2 in (-4, 4, 5) and scode3 in (-4, 4, 5) and scode4 in (-4, 4, 5) and scode5 in (-4, 4, 5) then  sltype1=type1;

*these are r's who are only in college in round 4 - used to correct missings;

col_ck=0; if scode1=4 or scode1=5 then col_ck=1;

*these are r's who don't report any r4 schools - they have dropped out (also used below);

drop=0; if type1 eq -4 and type2 eq -4 and type3 eq -4 and type4 eq -4 and type5 eq -4 then drop=1;

* use the previous rounds' info. to determine type if missing;

mstyp=0;

if type1=-4 and sltype1 ne -5 and col_ck=0 and drop=0 then do;

    if typer1 not in (-4,-5) then sltype1=typer1;                     /* starting from round 1 */

    if typer2 not in (-4,-5) then sltype1=typer2;                     /* round2's info. cover round1's info. */

    if typer3 not in (-4,-5) then sltype1=typer3;                     /* round3's info. cover round2's info. */

    mstyp=1;

end;

 

/* recode the type variable.*/ sltype=-4;

if sltype1=1 then sltype=1;                 if sltype1=5 then sltype=2;

if sltype1 in (3,4) then sltype=3;                if sltype1=2 or sltype1>=6 then sltype=4;

if -4<sltype1<0 then sltype=-3;                if type1=-5 then sltype=-5;                                               endsas;


Return to top


Date Received Diploma or Degree

Variables Created: 

 Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

pubid

PUBID

s13500m s13500y

YSCH-13500~M, ~Y

gedr1, gedr2

CV_GED (rounds 1 and 2)

s234501-s234503

YSCH-23450.01-.03

hsr1, hsr2

CV_HS_DIPLOMA (rounds 1 and 2)

s234601m, s234601y

YSCH-23460.01~M, ~Y

s234501-s234504

YSCH-23450.01-.04 (round 2)

s234602m, s234602y

YSCH-23460.02~M, ~Y

s11700

YSCH-11700

s234603m, s234603y

YSCH-23460.03~M, ~Y

s11900m, s11900y

YSCH-11900~M, ~Y

t7000_1-t7000_4

YTRN-7000.01-.04

s13300

YSCH-13300

This program creates several continuous month variables, identifying the month that the respondent received a GED, high school diploma, associate's degree, and bachelor's degree.  In future rounds, similar variables will calculate the month a master's, doctoral, or professional degree was received; no respondents had received these degrees in rounds 1-4.  For more information on the continuous month scheme, see appendix 7 in this document.


/* First, create the date variables using round 4 information only.*/

hsr4=-4;                  gedr4=-4;             aar4=-4;                  bar4=-4;

mar4=-4;                                docr4=-4;             profr4=-4;             flag=0;

 

if s11700=1 and s11900m gt 0 and s11900y gt 0 then hsr4=(s11900y-1980)*12+s11900m;

if -4<s11700<0 then hsr4=s11700;

if -4<s11900m<0 then hsr4=s11900m;

if -4<s11900y<0 then hsr4=s11900y;

 

if s13300=1 and s13500m>0 and s13500y>0 then gedr4=(s13500y-1980)*12+s13500m;

if -4<s13300<0 then gedr4=s13300;

if -4<s13500m<0 then gedr4=s13500m;

if -4<s13500y<0 then gedr4=s13500y;

 

array s23450 s234501-s234503;

array s23460m s234601m s234602m s234603m;

array s23460y s234601y s234602y s234603y;

array t7000 t7000_1 t7000_2 t7000_3 t7000_4;

 

do i=1 to 3;

if s23450[i]=1 and s23460m[i]>0 and s23460y[i]>0 and aar4=-4 then aar4=(s23460y[i]-1980)*12+s23460m[i];

if s23450[i]=1 and -4<s23460m[i]<0 and aar4=-4 then aar4=s23460m[i];

if s23450[i]=1 and -4<s23460y[i]<0 and aar4=-4 then aar4=s23460y[i];

if s23450[i]=3 and s23460m[i]>0 and s23460y[i]>0 and bar4=-4 then bar4=(s23460y[i]-1980)*12+s23460m[i];

if s23450[i]=3 and -4<s23460m[i]<0 and bar4=-4 then bar4=s23460m[i];

if s23450[i]=3 and -4<s23460y[i]<0 and bar4=-4 then bar4=s23460y[i];

if s23450[i]=4 and s23460m[i]>0 and s23460y[i]>0 and mar4=-4 then mar4=(s23460y[i]-1980)*12+s23460m[i];

if s23450[i]=4 and -4<s23460m[i]<0 and mar4=-4 then mar4=s23460m[i];

if s23450[i]=4 and -4<s23460y[i]<0 and mar4=-4 then mar4=s23460y[i];

if s23450[i]=5 and s23460m[i]>0 and s23460y[i]>0 and docr4=-4 then docr4=(s23460y[i]-1980)*12+s23460m[i];

if s23450[i]=5 and -4<s23460m[i]<0 and docr4=-4 then docr4=s23460m[i];

if s23450[i]=5 and -4<s23460y[i]<0 and docr4=-4 then docr4=s23460y[i];

if s23450[i]=6 and s23460m[i]>0 and s23460y[i]>0 and profr4=-4 then profr4=(s23460y[i]-1980)*12+s23460m[i];

if s23450[i]=6 and -4<s23460m[i]<0 and profr4=-4 then profr4=s23460m[i];

if s23450[i]=6 and -4<s23460y[i]<0 and profr4=-4 then profr4=s23460y[i];

if s23450[i]=9 and s23460m[i]>0 and s23460y[i]>0 and gedr4=-4 then gedr4=(s23460y[i]-1980)*12+s23460m[i];

if s23450[i]=9 and -4<s23460m[i]<0 and gedr4=-4 then gedr4=s23460m[i];                                   

if s23450[i]=9 and -4<s23460y[i]<0 and gedr4=-4 then gedr4=s23460y[i];                                   

if s23450[i]=8 or -4<s23450[i]<0 then flag=1;      

 

if -4<s23450[i]<0 and aar4=-4 then aar4=s23450[i];                     if -4<s23450[i]<0 and bar4=-4 then bar4=s23450[i];

if -4<s23450[i]<0 and mar4=-4 then mar4=s23450[i];                   if -4<s23450[i]<0 and docr4=-4 then docr4=s23450[i];

if -4<s23450[i]<0 and profr4=-4 then profr4=s23450[i];                if -4<s23450[i]<0 and gedr4=-4 then gedr4=s23450[i];

 

end;

 

/*if respondent completes ged in a training program, set date to -3 because we don't know completion date.*/

ged_tr=0;

do i=1 to 4;

   if gedr4=-4 and t7000[i]=4 then do; gedr4=-3; ged_tr=1; end;

end;

if s11700=-5 then do; gedr4=-5; hsr4=-5; aar4=-5; bar4=-5; mar4=-5; docr4=-5; profr4=-5; end;

           

/*change -2 to -3 for those who don't know completion date.*/

array created aar4 bar4 mar4 docr4 profr4 gedr4;

do i=1 to 6; if created[i] = -2 then created[i]=-3; end;

 

/* second, we will check if there is some conflict between round 3 and round 4.*/

flaghs=0;

flagged=0;

if hsr4 not in (-4,-5) and hsr3 not in  (-4,-5) and hsr4 ne hsr3 then flaghs=1;

if gedr4 not in (-4,-5) and gedr3 not in (-4,-5) and gedr4 ne gedr3 then flagged=1;

 

/* at last, we will merge the result from round 2 and round 1.*/

dtged=-4; dths=-4; dtaa=-4; dtba=-4; dtma=-4; dtdoc=-4; dtprof=-4;

 

if flagged ne 1 then do;

   if gedr3 not in (-4,-5) then dtged=gedr3;

   if gedr4 ne -4 then dtged=gedr4;

end;

if flagged eq 1 then do;

   if gedr3 eq -3 and gedr4 gt 0 then do; dtged=gedr4; flagged=0; end;

end;

 

/*hand edit due to interviewer comment*/

if id=4274 then do; dtged=240; flagged=0; end;

/*hand edit due to r give different ged/hs degree dates.  used first date since closer to event and checks out in logs*/

if id=5092 then do; dths=210; flaghs=0; end;

if id=137 then do; dtged=205; flagged=0; end;

if id=7949 then do; dtged=212; flagged=0; end;

 

if flaghs ne 1 then do;

   if hsr3 not in (-4,-5) then dths=hsr3;

   if hsr4 ne -4 then dths=hsr4;

   if dths=-2 then dths=-3;

end;

 

/*account for previously earned assoc. & ba degrees (this needs to be added to program)*/

if id=654 then aar4=240; if id=6565 then aar4=-3; if id=8151 then bar4=-3;

 

dtaa=aar4; dtba=bar4; dtma=mar4; dtdoc=docr4; dtprof=profr4;


Return to top


Number of Grades Repeated or Skipped

Variables Created: 

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

Round 1

 

s9589121

YSCH-9589.01.02.01

r1intday, r1intmo, r1intyr

YINF-900_D, _M, _Y

s9589211-s9589213

YSCH-9589.02.01.01-.03

s3500r1

YSCH-3500

s9589221

YSCH-9589.02.02.01

cvrpevr1

CV_GRADES_REPEAT_EVER

s9589311, s9589312

YSCH-9589.03.01.01, .02

cvskevr1

CV_GRADE_SKIPPED_EVER

s9589411, s9589511

YSCH-9589.04.01.01, .05.01.01

 

 

s691111m, s691111y

YSCH-9691.01.01.01~M, ~Y

Round 2

 

s691112m, s691112y

YSCH-9691.01.01.02~M, ~Y

s2857r2

YSCH-2857

s691113m, s691113y

YSCH-9691.01.01.03~M, ~Y

r2intday, r2intmo, r2intyr

SYMBOL!CURDATE~D, ~M, ~Y

s691114m, s691114y

YSCH-9691.01.01.04~M, ~Y

cvrpevr2

CV_GRADES_REPEAT_EVER

s691121m, s691121y

YSCH-9691.01.02.01~M, ~Y

cvskevr2

CV_GRADE_SKIPPED_EVER

s691211m, s691211y

YSCH-9691.02.01.01~M, ~Y

 

 

s691212m, s691212y

YSCH-9691.02.01.02~M, ~Y

Round 3

 

s691213m, s691213y

YSCH-9691.02.01.03~M, ~Y

s2857r3

YSCH-2857

s691221m, s691221y

YSCH-9691.02.02.01~M, ~Y

r3intday, r3intmo, r3intyr

SYMBOL!CURDATE~D, ~M, ~Y

s691311m, s691311y

YSCH-9691.03.01.01~M, ~Y

cvrpevr3

CV_GRADES_REPEAT_EVER

s691312m, s691312y

YSCH-9691.03.01.02~M, ~Y

cvskevr3

CV_GRADE_SKIPPED_EVER

s691411m, s691411y

YSCH-9691.04.01.01~M, ~Y

 

 

s691511m, s691511y

YSCH-9691.05.01.01~M, ~Y

Round 4

 

s9793111-s9793113

YSCH-9793.01.01.01-.03

r4intday, r4intmo, r4intyr

SYMBOL!CURDATE~D, ~M, ~Y

s9793211, s9793212

YSCH-9793.02.01.01, .02

s3104

YSCH-3104

s9793311

YSCH-9793.03.01.01

s2857

YSCH-2857

s9946111-s9946114

YSCH-9946.01.01.01-.04

s4846m, s4846y

YSCH-4846~M, ~Y

s9946121

YSCH-9946.01.02.01

s162001m, s162001y

YSCH-1620.01~M, ~Y

s9946211-s9946213

YSCH-9946.02.01.01-.03

s162701

YSCH-1627.01

s9946221

YSCH-9946.02.02.01

s4951

YSCH-4951

s9946311, s9946312

YSCH-9946.03.01.01, .02

s841611, s841612

YSCH-8416.01.01, .02

s9946411, s9946511

YSCH-9946.04.01.01, .05.01.01

s842621, s841622

YSCH-8416.02.01, .02

s099111m, s099111y

YSCH-10099.01.01.01~M, ~Y

s841631, s841632

YSCH-8416.03.01, .02

s099112m, s099112y

YSCH-10099.01.01.02~M, ~Y

s841641, s841651

YSCH-8416.04.01, .05.01

s099113m, s099113y

YSCH-10099.01.01.03~M, ~Y

s877411m, s877411y

YSCH-8774.01.01~M, ~Y

s099114m, s099114y

YSCH-10099.01.01.04~M, ~Y

s877412m, s877412y

YSCH-8774.01.02~M, ~Y

s099211m, s099211y

YSCH-10099.02.01.01~M, ~Y

s877421m, s877421y

YSCH-8774.02.01~M, ~Y

s099212m, s099212y

YSCH-10099.02.01.02~M, ~Y

s877422m, s877422y

YSCH-8774.02.02~M, ~Y

s099311m, s099311y

YSCH-10099.03.01.01~M, ~Y

s877431m, s877431y

YSCH-8774.03.01~M, ~Y

s099312m, s099312y

YSCH-10099.03.01.02~M, ~Y

s877432m, s877432y

YSCH-8774.03.02~M, ~Y

strt11m, strt11y

NEWSCHOOL_START1.01~M, ~Y

s877441m, s877441y

YSCH-8774.04.01~M, ~Y

strt12m, strt12y

NEWSCHOOL_START1.02~M, ~Y

s897711, s897712

YSCH-8977.01.01, .02

strt13m, strt13y

NEWSCHOOL_START1.03~M, ~Y

s897721, s897722

YSCH-8977.02.01, .02

strt14m, strt14y

NEWSCHOOL_START1.04~M, ~Y

s897731, s897732

YSCH-8977.03.01, .02

strt15m, strt15y

NEWSCHOOL_START1.05~M, ~Y

s897741

YSCH-8977.04.01

id

PUBID

s913111 s913112

YSCH-9131.01.01, .02

prehga

SYMBOL!REVPREV!HGA

s913121 s913122

YSCH-9131.02.01, .02

enroll

Enrolled at int date r4 - created

s913131 s913132

YSCH-9131.03.01, .02

stop11m, stop11y

NEWSCHOOL_STOP1.01~M, ~Y

s913141 s913151

YSCH-9131.04.01, .05.01

stop12m, stop12y

NEWSCHOOL_STOP1.02~M, ~Y

s933511m, s933511y

YSCH-9335.01.01~M, ~Y

stop13m, stop13y

NEWSCHOOL_STOP1.03~M, ~Y

s933512m, s933512y

YSCH-9335.01.02~M, ~Y

stop14m, stop14y

NEWSCHOOL_STOP1.04~M, ~Y

s933521m, s933521y

YSCH-9335.02.01~M, ~Y

stop15m, stop15y

NEWSCHOOL_STOP1.05~M, ~Y

s933522m, s933522y

YSCH-9335.02.02~M, ~Y

stop21m, stop21y

NEWSCHOOL_STOP2.01~M, ~Y

s933531m, s933531y

YSCH-9335.03.01~M, ~Y

stop22m, stop22y

NEWSCHOOL_STOP2.02~M, ~Y

s933541m, s933541y

YSCH-9335.04.01~M, ~Y

stop23m, stop23y

NEWSCHOOL_STOP2.03~M, ~Y

s933551m, s933551y

YSCH-9335.05.01~M, ~Y

scode1-scode5

NEWSCHOOL_SCHCODE.01-.05

s9589111-s9589114

YSCH-9589.01.01.01-.04

 

 

This program creates variables counting the number of grades the respondent ever repeated or skipped.  The first variable in each pair counts the total number of grades ever repeated/skipped through the interview date; the second variable calculates the number through June 30, 2000.


/******Create new array of start dates for first school depending on whether r. corrected roster data******/

array strt1xm strt11m strt12m strt13m strt14m strt15m strt16m strt17m;

array strt1xy strt11y strt12y strt13y strt14y strt15y strt16y strt17y;

array s8771m s877411m s877421m s877431m s877441m s877451m s877461m s877471m;

array s8771y s877411y s877421y s877431y s877441y s877451y s877461y s877471y;

array startm start1m start2m start3m start4m start5m start6m start7m;

array starty start1y start2y start3y start4y start5y start6y start7y;

 

*Hand edit for respondents whose reported third school is actually the first school;

if id in (253,1804) then do;

   s841631=-4; s9131=-4; s897711=s897731; s897731=-4; strt11m=strt13m; strt13m=-4; strt11y=strt13y; strt13y=-4;

end;

 

numstart=0;

do i = 1 to 7;

   if s8771m[i] gt 0 and s8771y[i] gt 0 then do; startm[i]=s8771m[i]; starty[i]=s8771y[i]; end;

   else if s8771m[i] le 0 or s8771y[i] le 0 then do; startm[i]=strt1xm[i]; starty[i]=strt1xy[i]; numstart=numstart+1; end;

end; 

 

*******Create arrays of grades attended, whether they were completed, and start and completion dates;

***grade attended;

array gr_att s841611 s841612 s841613 s841621 s841622 s841623 s841631 s841632 s841641 s841642 s841651 s841661 s841671 s9589111 s9589112 s9589113 s9589114 s9589121 s9589211 s9589212 s9589213 s9589221 s9589311 s9589312 s9589411 s9589511;

***Completed y/n;

array gr_comp s913111 s913112 s913113 s913121 s913122 s913123 s913131 s913132 s913141 s913142 s913151 s913161 s913171 s9946111 s9946112 s9946113 s9946114 s9946121 s9946211 s9946212 s9946213 s9946221 s9946311 s9946312 s9946411 s9946511;

***When completed grade - month;

array cdate_m s933511m s933512m s933513m s933521m s933522m s933523m s933531m s933532m s933541m s933542m s933551m s933561m s933571m s099111m s099112m s099113m s099114m s099121m s099211m s099212m s099213m s099221m s099311m s099312m s099411m s099511m;

***When completed grade - year;

array cdate_y s933511y s933512y s933513y s933521y s933522y s933523y s933531y s933532y s933541y s933542y s933551y s933561y s933571y s099111y s099112y s099113y s099114y s099121y s099211y s099212y s099213y s099221y s099311y s099312y s099411y s099511y;

***When started - month;

array s_date_m start1m s877412m s877413m start2m s877422m s877423m start3m s877432m start4m s877442m start5m start6m start7m s691111m s691112m s691113m s691114m s691121m s691211m s691212m s691213m s691221m s691311m s691312m s691411m s691511m;

***When started - year;

array s_date_y start1y s877412y s877413y start2y s877422y s877423y start3y s877432y start4y s877442y start5y start6y start7y s691111y s691112y s691113y s691114y s691121y s691211y s691212y s691213y s691221y s691311y s691312y s691312y s691511y;

*****Create arrays of all grades attended and completed and their start and complete dates;

array attend attend1-attend9;                  array comp comp1-comp9;

array datestm datestm1-datestm9;                               array datesty datesty1-datesty9;

array datecpm datecpm1-datecpm9;                             array datecpy datecpy1-datecpy9;

 

****Set all new array vars to -4;

do i=1 to 9;

     datestm[i]=-4; datesty[i]=-4; datecpm[i]=-4; datecpy[i]=-4; comp[i]=-4; attend[i]=-4;

end;

 

*****Record all grades completed and their completion dates;

j=1;

do i= 1 to 26;

   if gr_comp[i] = 1 and gr_att[i] not in (-4,-5) then do;

      comp(j)=gr_att[i]; datecpm(j)=cdate_m[i]; datecpy(j)=cdate_y[i]; j=j+1;

   end;

end;   

 

*****Record all grades attended and their start dates;

k=1;

flag1=0;

if s913111 not in (-4,-5) then do;

   if s841611 not in (-4,-5) then do;

      attend[k]=s841611;

      if start1m>0 then datestm[k]=start1m;

      if start1y>0 then datesty[k]=start1y;

      if s877411m=-4 and s877411y=-4 and strt11m=-4 and strt11y=-4 then flag1=1;

      k=k+1;

   end;

   do i=2 to 25;

      if gr_comp[i] ne -4 and gr_comp[i] ne . then do;

        attend(k)=gr_att[i]; datestm(k)=s_date_m[i]; datesty(k)=s_date_y[i]; k=k+1;

      end;

   end;

end;

 

*******Create date in continuous months for each start and complete date in arrays;

array c_date c_date1 c_date2 c_date3 c_date4 c_date5 c_date6 c_date7 c_date8 c_date9;

array s_date s_date1 s_date2 s_date3 s_date4 s_date5 s_date6 s_date7 s_date8 s_date9;

do i=1 to 9;

      if datecpy[i] gt 0 and datecpm[i] gt 0 then c_date[i]=((datecpy[i]-1980)*12)+datecpm[i];

      else if datecpy[i] in (-1, -2, -3) or datecpm[i] in (-1, -2, -3) then c_date[i]=-3;

      else if datecpy[i] eq -4 or datecpm[i] eq -4 then c_date[i]=-4; 

      if datesty[i] gt 0 and datestm[i] gt 0 then s_date[i]=((datesty[i]-1980)*12)+datestm[i];

      else if datesty[i] in (-1, -2, -3) or datestm[i] in (-1, -2, -3)  then s_date[i]=-3;

      else if datesty[i] eq -4 or datestm[i] eq -4 then s_date[i]=-4;

end;

 

*****Create new arrays of started and completed grades that have grades listed only once and in order- report latest complete date;

array newcomp newcomp1 newcomp2 newcomp3 newcomp4;

array newcdate newcdat1 newcdat2 newcdat3 newcdat4;

 

newcomp1=comp1;

newcdat1=c_date1;

 

***First make sure that the first element in the array is the lowest grade and the latest date for that grade;

do i=2 to 4;

   if comp[i] gt 0 then do;

      if comp[i] eq newcomp1 and c_date[i] gt newcdat1 then newcdat1=c_date[i];

      else if comp[i] lt newcomp1 then do; newcomp1=comp[i]; newcdat1=c_date[i]; end;

   end;

end;

 

j=2;

do i=1 to 4;

   if newcomp(j-1) ne . then do;

      if comp[i] eq newcomp(j-1) and c_date[i] gt newcdate(j-1) then newcdate(j-1)=c_date[i]; 

      else if comp[i] eq newcomp(j-1) + 1 then do; newcomp(j)=comp[i]; newcdate(j)=c_date[i]; end;

      else if newcomp(j)=. and comp[i] gt newcomp(j-1) then do; newcomp(j)=comp[i]; newcdate(j)=c_date[i]; end;

   end;

end;

 

j=3;

do i=1 to 4;

   if newcomp(j-1) ne . then do;

      if comp[i] eq newcomp(j-1) and c_date[i] gt newcdate(j-1) then newcdate(j-1)=c_date[i]; 

      else if comp[i] eq newcomp(j-1) + 1 then do; newcomp(j)=comp[i]; newcdate(j)=c_date[i]; end;

      else if newcomp(j)=. and comp[i] gt newcomp(j-1) then do; newcomp(j)=comp[i]; newcdate(j)=c_date[i]; end;

   end;

end;

 

j=4;

do i=1 to 4;

   if newcomp(j-1) ne . then do;

      if comp[i] eq newcomp(j-1) and c_date[i] gt newcdate(j-1) then newcdate(j-1)=c_date[i]; 

      else if comp[i] eq newcomp(j-1) + 1 then do; newcomp(j)=comp[i]; newcdate(j)=c_date[i]; end;

      else if newcomp(j)=. and comp[i] gt newcomp(j-1) then do; newcomp(j)=comp[i]; newcdate(j)=c_date[i]; end;

   end;

end;

 

***Create a new array with all grades attended in order and an array with the earliest date each grade was started;

array tmpatt tmpatt1 tmpatt2 tmpatt3 tmpatt4 tmpatt5 tmpatt6 tmpatt7 tmpatt8 tmpatt9;

array tmpadate tmpadat1 tmpadat2 tmpadat3 tmpadat4 tmpadat5 tmpadat6 tmpadat7 tmpadat8 tmpadat9;

array newatt newatt1 newatt2 newatt3 newatt4 newatt5 newatt6 newatt7 newatt8 newatt9;

array newadate newadat1 newadat2 newadat3 newadat4 newadat5 newadat6 newadat7 newadat8 newadat9;

 

do i=1 to 9; tmpatt[i]=attend[i]; tmpadate[i]=s_date[i]; end;

j=1;

i=1;

k=1;

do i=1 to 9;

      do j=i+1 to 9;

        if tmpatt[j] ne -4 then do;

            if tmpatt[j] lt tmpatt[i] and tmpatt[i] gt 0 and tmpatt[j] gt 0 then do;

                  att_temp = tmpatt[i]; dat_temp = tmpadate[i]; tmpatt[i]=tmpatt[j]; tmpadate[i] = tmpadate[j]; tmpatt[j] = att_temp; tmpadate[j] = dat_temp;

             end;

         end;

      end;

      if i eq 1 then do; newatt[k] = tmpatt[i]; newadate[k] = tmpadate[i]; end;

      if tmpatt[i] eq newatt[k] then do;

            if tmpadate[i] lt newadate[k] then do; newatt[k] = tmpatt[i]; newadate[k] = tmpadate[i]; end;

      end;

      else if tmpatt[i] gt newatt[k] then do; k=k+1; newatt[k] = tmpatt[i]; newadate[k] = tmpadate[i]; end;

      j=i+1;

end;

 

***Find last enrollment date;

array stopm stop11m stop21m stop12m stop22m stop13m stop23m stop14m stop15m;

array stopy stop11y stop21y stop12y stop22y stop13y stop23y stop14y stop15y;

array stopd stopd1-stopd8;

array scode scode1 scode1 scode2 scode2 scode3 scode3 scode4 scode5;

 

do i=1 to 8;

   if stopy[i] gt 0 and stopm[i] gt 0 then stopd[i]=((stopy[i]-1980)*12)+stopm[i]; 

   else if stopy[i]=-5 then stopd[i]=-5;

   else if stopy[i] in (-1,-2,-3) or stopm[i] in (-1,-2,-3) then stopd[i]=-3;

end;

 

if enroll=0 then do;

    stopdate=stopd1;

    do i=2 to 8; if scode[i] in (1,2,3) and stopd[i]>stopdate then stopdate=stopd[i]; end;

end;

else if enroll=1 then stopdate=-4;

 

****Create interview dates in continuous months; 

if r1intyr gt 0 then r1intdte=((r1intyr-1980)*12)+r1intmo;

if r2intyr gt 0 then r2intdte=((r2intyr-1980)*12)+r2intmo;

else if r2intyr=-5 then r2intdte=-5;

if r3intyr gt 0 then r3intdte=((r3intyr-1980)*12)+r3intmo;

else if r3intyr=-5 then r3intdte=-5;

if r4intyr gt 0 then intdate=((r4intyr-1980)*12)+r4intmo;

 

prevint=r3intdte;

if prevint=-5 then prevint=r2intdte;

if prevint=-5 then prevint=r1intdte;

 

* Set end dates for attended grades: find the end date for each grade attended - if r. doesn't give a completion date, choose the month before they started the next grade;

array newedate newedat1 newedat2 newedat3 newedat4 newedat5 newedat6 newedat7 newedat8 newedat9; 

array iscomp iscomp1 iscomp2 iscomp3 iscomp4 iscomp5 iscomp6 iscomp7 iscomp8 iscomp9;

 

do i=1 to 9; iscomp(i)=0; end;

endimp=0;

do i=1 to 9;

    do j=1 to 4;

       if newatt(i)=newcomp(j) and newatt(i) gt 0 then do; newedate(i)=newcdate(j); iscomp(i)=1; end;

    end;

    if newatt(i) ne . and newedate(i)=. and newadate(i) ne prevint and newadate(i) ne newadate(i+1) and newadate(i+1) ne . then do; newedate(i)=newadate(i+1)-1; endimp=1; end;

    else if newatt(i) ne . and newedate(i)=. and newatt(i+1)=. and enroll=1 then do; newedate(i)=intdate; endimp=1; end;

    else if newatt(i) ne . and newedate(i)=. and newatt(i+1)=. and enroll=0 then do; newedate(i)=stopdate; endimp=1; end;

    else if newedate(i) eq . and newadate(i) eq prevint then do;

        endimp=1;

        if newadate(i) le 210 then newedate(i)=210;

        else if 211 le newadate(i) le 222 then newedate(i)=222;

        else if 223 le newadate(i) le 234 then newedate(i)=234;

        else if 235 le newadate(i) le 246 then newedate(i)=246;

        else if 247 le newadate(i) le 258 then newedate(i)=258;

    end;

end;

 

********delete the grades whose information is repeatedly reported in round 4;

array r3nadate r3nadat1 r3nadat2 r3nadat3 r3nadat4 r3nadat5 r3nadat6 r3nadat7 r3nadat8 r3nadat9;         

array r3natt r3natt1 r3natt2  r3natt3  r3natt4  r3natt5  r3natt6  r3natt7  r3natt8  r3natt9;          

array r3nedate r3nedat1 r3nedat2 r3nedat3 r3nedat4 r3nedat5 r3nedat6 r3nedat7 r3nedat8 r3nedat9;

array r3ncomp r3ncomp1-r3ncomp9;

array r2nadate r2nadat1 r2nadat2 r2nadat3 r2nadat4 r2nadat5 r2nadat6 r2nadat7 r2nadat8 r2nadat9;         

array r2natt r2natt1 r2natt2  r2natt3  r2natt4  r2natt5  r2natt6  r2natt7  r2natt8  r2natt9;          

array r2nedate r2nedat1 r2nedat2 r2nedat3 r2nedat4 r2nedat5 r2nedat6 r2nedat7 r2nedat8 r2nedat9;

array r2ncomp r2ncomp1-r2ncomp9; 

array preadate preadat1 preadat2 preadat3 preadat4 preadat5 preadat6 preadat7 preadat8 preadat9;         

array preatt preatt1 preatt2  preatt3  preatt4  preatt5  preatt6  preatt7  preatt8  preatt9;          

array preedate preedat1 preedat2 preedat3 preedat4 preedat5 preedat6 preedat7 preedat8 preedat9;

array precomp precomp1-precomp9; 

array tmp2att tmp2att1-tmp2att9;

 

do i=1 to 9; tmp2att[i]=newatt[i]; end;

 

backcut=0;

ncut=0;

backrep=0;

 

do i=1 to 9;

  do j=1 to 9;

    if tmp2att[i]>0 and ((tmp2att[i]=r3natt[j]  and r3ncomp[j]=1) or  (tmp2att[i]=r2natt[j] and r2ncomp[j]=1)) then do;

      j=9;backcut=1;ncut=ncut+1;

      do k=i+1-ncut to 9-ncut;

        if newatt[k+1] ne . then do; newatt[k]=newatt[k+1]; newadate[k]=newadate[k+1]; newedate[k]=newedate[k+1]; iscomp[k]=iscomp[k+1]; end;

        else do; newatt[k]=.; newadate[k]=.; newedate[k]=.; iscomp[k]=0; k=9-ncut; end;

      end;

    end;

  end;

end;

 

 

if newatt1>0 then do;

do i=1 to 8;

   if (r3natt[i] ge newatt1 and r3natt[i+1] ne .) or (r3natt[i] ge newatt1 and r3ncomp[i]=1) or (r2natt[i] ge newatt1 and r2natt[i+1] ne .) or (r2natt[i] ge newatt1 and r2ncomp[i]=1) then backrep=1;

   end;

end;

 

*****Substitute start dates in the previous round for first grade in loops;

pre2857=s2857r3;

do i=1 to 9; preatt[i]=r3natt[i]; preadate[i]=r3nadate[i]; preedate[i]=r3nedate[i]; precomp[i]=r3ncomp[i]; end;

   if r3intyr=-5 then do;

      pre2857=s2857r2;

      do i=1 to 9; preatt[i]=r2natt[i]; preadate[i]=r2nadate[i]; preedate[i]=r2nedate[i]; precomp[i]=r2ncomp[i]; end;

   end;

   if r3intyr=-5 and r2intyr=-5 then do;

      pre2857=-5;

      do i=1 to 9; preatt[i]=-5; preadate[i]=-5; preedate[i]=-5; precomp[i]=-5; end;

   end;

badpre=0;

replace=0;

jumprep1=0;

jumprep2=0;

jumpge21=0;

jumpge22=0;

 

*flag the case where the reported grades are jumping;

if preatt1 ne -5 then do;

   do i=1 to 8;

      if preatt[i] ne . and preatt[i+1] eq . then do; lphigh=preatt[i]; lphedat=preedate[i]; lphighcp=precomp[i]; lpnum=i; i=9; end;

    end;

end;

else lphigh=-5;

 

if (lphigh ne -5 and ((newatt1=lphigh+1 and lphighcp ne 1) or newatt1>lphigh+1)) then jumprep1=1;

if (lphigh=-5 and ((hgcr1>0 and newatt1 ge hgcr1+2) or (s3500r1>0 and newatt1 ge s3500r1+2)))  then jumprep2=1;

if (lphigh ne -5 and newatt1 ge lphigh+2) then jumpge21=1;

if (lphigh=-5 and hgcr1>0 and newatt1 ge hgcr1+3) then jumpge22=1;

 

if newatt1 gt 0 and (r3intyr ne -5 or r2intyr ne -5) then do;

   do i=1 to 8;

      if (preadate(i) gt preedate(i) and preedate(i) gt 0) or (preedate(i) gt preadate(i+1) and preadate(i+1) gt 0) or (preadate(i+1) gt preedate(i+1) and preedate(i+1) gt 0) then do;

         newadat1=-3;

         badpre=1;

      end;

      else if preatt(i)=newatt1 and preatt(i+1)=. and precomp[i]=0 and s3104 ne -5 and badpre ne 1 then do;

         newadat1=preadate(i);

         replace=1;

      end;

   end;

end;

 

else if -4 lt newatt1 le 0 then newadat1=-3;

 

***Measure the length that a respondent was in each completed grade and count the number of grades skipped and repeated;

array lengtha length1 length2 length3 length4 length5 length6 length7 length8 length9;     

repeat=0; repeatj=0; skipleng=0; skipl_j=0; skip=-16; skipj=-16; oldstrt=0; nocomp=0;

 

do i=1 to 8;

   if newedate[i] gt 0 and newadate[i] gt 0 then lengtha[i]=newedate[i]-newadate[i];

   if newadate[i] le newedate[i] le newadate[i+1] and lengtha[i] gt 13 and newatt[i+1]-newatt[i]=1 and newatt[i] ne 95 and repeat ne -3 then do;

      repeat=repeat+1;

      if i=1 and newadate(i) lt prevint then oldstrt=1;

      if newedate(i) le 246 then repeatj=repeatj+1;

   end;

   else if newadate[i] le newedate[i] and newatt[i+1]=. and lengtha[i] gt 13 and newatt[i] ne 95 and repeat ne -3 and (iscomp[i]=1 or s2857=newatt[i]) then do;

       repeat=repeat+1;

       if i=1 and newadate(i) lt prevint then oldstrt=1;

       if newedate(i) le 246 then repeatj=repeatj+1;

   end;

   else if newadate[i] le newedate[i] and newatt[i+1]=. and lengtha[i] gt 13 and newatt[i] ne 95 and repeat ne -3 and (iscomp[i]=0 and s2857 ne newatt[i]) then do;

       if i=1 and newadate(i) lt prevint then oldstrt=1;

       repeat=-3;

       repeatj=-3;

   end;

end;

 

do i=1 to 7;

   if newadate(i) lt newedate(i) lt newadate(i+1) lt newedate(i+1) then do;

      if newadate(i) in (212, 213, 224, 225, 236, 237, 248, 249) and (newadate(i) ne prevint) and newatt(i+1)-newatt(i)=1 and iscomp(i+1)=1 and newedate(i+1)-newadate(i) le 12  and newadate(i+2)-newedate(i+1) le 9 then do;

          if (i eq 1 or (i ne 1 and newadate(i)-newedate(i-1) le 9)) and skipleng ne -3 then do;

             skipleng=skipleng+1;

             if newedate(i+1) le 246 and skipl_j ne -3 then skipl_j=skipl_j+1;

          end;

      end;

   end;

end;

 

   *Take care of connection between previous round and current round;

   conect=0;

   conectok=0;

   if newatt1=lphigh and iscomp1=1 and lphighcp ne 1 then do; conect=1; if lpnum>2 then conectok=1; end;

 

***Check for respondents who completely skip (do not attend) a grade;

skipgr=0; skipgrj=0; skipgt2=0;

do i=1 to 8;

    if newatt(i+1)-newatt(i) eq 2 and newadate(i+1)-newedate(i) le 9 and skipgr ne -3 then do;

        skipgr=skipgr+1;

        if newedate(i+1) le 246 then skipgrj=skipgrj+1;

    end;

    else if newatt(i+1)-newatt(i) eq 3 and newadate(i+1)-newedate(i) le 9 then do;

        skipgr=skipgr+2;

        if newedate(i+1) le 246 then skipgrj=skipgrj+2;

    end;

    else if newatt(i+1)-newatt(i) gt 3 and newadate(i+1)-newedate(i) le 9 then do; skipgt2=1; end;

end;

 

***Set repeat and skip to -3 if grades out of order or if backrep=1 or jumprep=1 or if report 0 grade;

allmess=0;

do i=1 to 8;

   if (newadate(i) gt newedate(i) and newedate(i) gt 0) or (newedate(i) gt newadate(i+1) and newadate(i+1) gt 0) or (newadate(i+1) gt newedate(i+1) and newedate(i+1) gt 0) then do; allmess=1; end;

end;

 

zerograd=0;

do i=1 to 9; if newatt[i]=0 then zerogrd=1; end;

 

if allmess=1 or backrep=1 or zerograd=1 or jumprep1=1 or jumprep2=1 then do; repeat=-3; repeatj=-3; skip=-3; skipj=-3; end;

 

***Flag respondents who reported skipping a grade and those who say they did NOT skip grade;  

array whyskip s897711 s897712 s897721 s897722 s897731 s897732 s897741 s9793111 s9793112 s9793113 s9793211 s9793212 s9793311;

skipques=0;

do i=1 to 13; if whyskip[i]=1 then skipques=1; end;

notskip=0;

do i=1 to 13; if whyskip[i] in (-2,2,999) then notskip=1; end;

 

if skip ne -3 then do;

   if (skipques eq 0 and skipleng=0 and skipgr=0) or (notskip ge 1 and skipques=0) then skip=0;

   else if skipleng eq -3 and (skipgr=0 or skipques=0) then skip=-3;

   else if skipgr=-3 and skipleng=0 then skip=-3;

   else if skipleng ge 1 then skip=skipleng;

   else if skipques ge 1 and skipgr ge 1 then skip=skipgr;

   else if skipques ge 1 and skipgr = 0 then skip=-3;

   else if skipques eq 0 and skipgr ge 1 then skip=-3;

   if skipques=-3 or skipgr=-3 or skipleng=-3 then skip=-3;

end;

 

if skipj ne -3 then do;

   if (skipl_j=0 and skipgrj=0) or (notskip ge 1 and skipques=0) then skipj=0;

   else if skipl_j eq -3 and (skipgrj=0 or skipques=0) then skip=-3;

   else if skipgrj=-3 and skipl_j=0 then skipj=-3;

   else if skipl_j ge 1 then skipj=skipl_j;

   else if skipques ge 1 and skipgrj ge 1 then skipj=skipgrj;

   else if skipques ge 1 and skipgrj = 0 then skipj=-3;

   else if skipques eq 0 and skipgrj ge 1 then skipj=-3;

   if skip=-3 then skipj=-3;

end;

 

***Created variable in the previous round;

if cvrpevr3=-5 then cvrpevr3=cvrpevr2;

if cvskevr3=-5 then cvskevr3=cvskevr2;

if cvrpevr3=-5 then cvrpevr3=cvrpevr1;

if cvskevr3=-5 then cvskevr3=cvskevr1;

 

***Take care of the cases whose"repeated grade" could be double counted;

if oldstrt=1 and repeat>0 and cvrpevr3>0 and pre2857 ne -5 then do;

   do i=1 to 8;

      if preatt[i]=newatt1 and preatt[i+1]=. and (preedate[i]-preadate[i]) gt 13 and preatt[i] ne 95 and (precomp[i]=1 or pre2857=preatt[i]) then do;

          repeat=repeat-1;

          if newedat1 le 246 then repeatj=repeatj-1;

      end;

   end;

end;

 

***-3 the jump rep people;

if jumprep1=1 or jumprep2=1 then do; repeat=-3; repeatj=-3; skip=-3; skipj=-3; end;

 

***Combine the previous and current information;

if cvrpevr3 ge 0 and repeat ge 0 then numrep=cvrpevr3+repeat;

   else if cvrpevr3 lt 0 then numrep=cvrpevr3;

   else if cvrpevr3 ge 0 and repeat lt 0 then numrep=repeat;

if cvrpevr3 ge 0 and repeatj ge 0 then numrepj=cvrpevr3+repeatj;

   else if cvrpevr3 lt 0 then numrepj=cvrpevr3;

   else if cvrpevr3 ge 0 and repeatj lt 0 then numrepj=repeatj;

if cvskevr3 ge 0 and skip ge 0 then numskip=cvskevr3+skip;

   else if cvskevr3 lt 0 then numskip=cvskevr3;

   else if cvskevr3 ge 0 and skip lt 0 then numskip=skip;

if cvskevr3 ge 0 and skip ge 0 then numskipj=cvskevr3+skipj;

   else if cvskevr3 lt 0 then numskipj=cvskevr3;

   else if cvskevr3 ge 0 and skipj lt 0 then numskipj=skipj;

 

if s3104=-5 then do; numskip=-5; numrep=-5; numskipj=-5; numrepj=-5; end; 

 

endsas;


Return to top


Number of Schools Attended

Variables Created:

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

Round1

 

s826341

YSCH-8263.04.01

curgdr1

YSCH-3500

s826351

YSCH-8263.05.01

id

PUBID

s841611, s841612

YSCH-8416.01.01, .02

numr1

CV_SCH_ATTEND_EVER

s841621, s841622

YSCH-8416.02.01, .02

 

 

s841631, s841632

YSCH-8416.03.01, .02

Round2

 

s841641

YSCH-8416.04.01

numr2

CV_SCH_ATTEND_EVER

s841651

YSCH-8416.05.01

hgar2

YSCH-2857

s9589111-s9589114

YSCH-9589.01.01.01-.04

 

 

s9589121

YSCH-9589.01.02.01

Round3

 

s9589211-s9589213

YSCH-9589.02.01.01-.03

numr3

CV_SCH_ATTEND_EVER

s9589221

YSCH-9589.02.02.01

hgar3

YSCH-2857

s9589311, s9589312

YSCH-9589.03.01.01, .02

 

 

s9589411

YSCH-9589.04.01.01

Round4

 

s9589511

YSCH-9589.05.01.01

hgar4

YSCH-2857

start1m-start5m

NEWSCHOOL_START1.01~M-.05~M

s826311, s826312

YSCH-8263.01.01, .02

start1y-start5y

NEWSCHOOL_START1.01~Y-.05~Y

s826321, s826322

YSCH-8263.02.01, .02

round1-round5

NEWSCHOOL_INTERVIEW.01-.05

s826331, s826332

YSCH-8263.03.01, .02

schid1-schid5

NEWSCHOOL_PUBID.01-.05

This program calculates the number of schools ever attended by the respondent as of the interview date and as of June 30, 2000.  The program first counts the number of new regular schools that the youth attended since DLI to the date of survey using the first enrollment date in each new school, then adds this number to the created variable from the previous round to get the total number of regular schools that the youth has ever attended. 

Users should note that the variable counts only schools at which the respondent attended grades 7-12.  In addition, if a respondent did not have a parent interview in round 1 and the respondent was already in 7th grade or higher in that round, no information was collected on the number of schools attended prior to round 1.  These respondents receive a -4 in round 1 and a -3 in all subsequent rounds.

array startm start1m start2m start3m start4m start5m ;                array starty start1y start2y start3y start4y start5y ;

array start start1-start5;                                                      array round round1-round5;

array schid schid1-schid5;                                                    array dumgrd dumgrd1-dumgrd5;

array again again1-again5;

 

/*First, create the dummy variable for each school to indicate if the youth attended grade 7 - grade 12 in that school. 

dumgrd1-dumgrd5= dummy to indicate whether R attended grades 7-12 in schools 1-5

again1-again5=dummy indicates whether school 1-5 is the same school as one already recorded, to avoid overcounts

startm/y=start date for a given school*/

 

do i=1 to 5; dumgrd[i]=0; start[i]=-4; end;

 

if (-3<=s841611<=-1 or -3<=s9589111<=-1 or -3<=s9589112<=-1 or -3<=s9589113<=-1 or -3<=s9589114<=-1) or (-3 <=s841612<=-1 or -3<=s9589121<=-1) then dumgrd1=-3;

if (-3<=s841621<=-1 or -3<=s9589211<=-1 or -3<=s9589212<=-1 or -3<=s9589213<=-1 ) or -3<=s841622<=-1 then dumgrd2=-3;                                              

if (-3<=s841631<=-1 or -3<=s9589311<=-1 or -3<=s9589312<=-1) or -3<=s841632<=-1 then dumgrd3=-3;   

if (-3<=s841641<=-1 or -3<=s9589411<=-1) then dumgrd4=-3;                       

if (-3<=s841651<=-1 or -3<=s9589511<=-1) then dumgrd5=-3;                                                            

 

if (7<=s841611<=12 or 7<=s9589111<=12 or 7<=s9589112<=12 or 7<=s9589113<=12 or 7<=s9589114<=12) or (7<=s841612<=12 or 7<=s9589121<=12) then dumgrd1=1;

if (7<=s841621<=12 or 7<=s9589211<=12 or 7<=s9589212<=12 or 7<=s9589213<=12 ) or 7<=s841622<=12 then dumgrd2=1;

if (7<=s841631<=12 or 7<=s9589311<=12 or 7<=s9589312<=12) or 7<=s841632<=12 then dumgrd3=1;

if (7<=s841641<=12 or 7<=s9589411<=12) then dumgrd4=1;

if (7<=s841651<=12 or 7<=s9589511<=12) then dumgrd5=1;

 

/*create a flag (again 1-5) for schools that are reported more than once for a grade 7-12 in the same round, using pubid for the school.  This will be used to avoid double counting schools.*/

 

do i=1 to 5; again(i)=0; end;

do i=1 to 5;

   if i=5 and schid(i)>0 and dumgrd(i)=1 and dumgrd(i-4)=1 and schid(i)=schid(i-4) then again(i)=1;

   if i>=4 and schid(i)>0 and dumgrd(i)=1 and dumgrd(i-3)=1 and schid(i)=schid(i-3) then again(i)=1;

   if i>=3 and schid(i)>0 and dumgrd(i)=1 and dumgrd(i-2)=1 and schid(i)=schid(i-2) then again(i)=1;

   if i>=2 and schid(i)>0 and dumgrd(i)=1 and dumgrd(i-1)=1 and schid(i)=schid(i-1) then again(i)=1;

end;

 

array startdm startdm1-startdm5;

do i=1 to 5;

   if starty[i]>0 or starty[i] in (-1,-2,-3) then startdm[i]=1;

   else startdm[i]=0;

end;

 

/*Next, calculate numjr4 and numr4.*/

  /* Calculate the accumulated month of the start date. */

do i=1 to 5;

   if starty[i]>0 and startm[i]>0 then start[i]=12*(starty[i]-1990)+startm[i];

end;

 

numjr4=0; numr4=0;

 

/**** count the new schools for all the cases.*****/

do i=1 to 5;

   if round[i]=4 and again(i)=0 then do;

      if dumgrd[i]=1 then numr4=numr4+1;

      if dumgrd[i]=1 and (0<start[i]<=126 or 0<starty[i]<2000) then numjr4=numjr4+1;

   end;

end;

 

if -3<=round1<=-1 or -3<=round2<=-1 or -3<=round3<=-1 or -3<=round4<=-1 or -3<=round5<=-1 then do;

   numr4=-3; numjr4=-3;

end;

 

/**** If the respondent was not interviewed in round 3 and had no number of schools info. in round 1 or 2, or if number of schools info. in round 3 is in (0,-4), then count all the schools. That is, for these people, the above count will be overwritten.****/

flagprev=0;

if (numr3=-5 and numr2 in (0,-4,-5) and numr1 in (0,-4)) or numr3 in (0,-4,-5) then do;

   numr4=0; numjr4=0; flagprev=1;

   do i=1 to 5;

      if dumgrd[i]=1 and again(i)=0 then numr4=numr4+1;

      if dumgrd[i]=1 and again(i)=0 and (0<start[i]<=126 or 0<starty[i]<2000 or (round[i] in (1,2,3) and again(i)=0)) then numjr4=numjr4+1;

   end;

end;

if dumgrd1=-3 or dumgrd2=-3 or dumgrd3=-3 or dumgrd4=-3 or dumgrd5=-3 then do; numr4=-3; numjr4=-3; end;

if (round1=4 and again1 =0 and dumgrd1=1 and ((start1y=2000 and -4<start1m<0) or -4<start1y<0)) or

   (round2=4 and again2 =0 and dumgrd2=1 and ((start2y=2000 and -4<start2m<0) or -4<start2y<0)) or

   (round3=4 and again3 =0 and dumgrd3=1 and ((start3y=2000 and -4<start3m<0) or -4<start3y<0)) or

   (round4=4 and again4 =0 and dumgrd4=1 and ((start4y=2000 and -4<start4m<0) or -4<start4y<0)) or

   (round5=4 and again5 =0 and dumgrd5=1 and ((start5y=2000 and -4<start5m<0) or -4<start5y<0)) then numjr4=-3;

 

/*We then add the above two numbers to the corresponding variables from round3, round 2, and/or round 1.*/

if numr3>=0 then do;

   if numjr4>=0 then numj=numjr4+numr3;

   if numr4>=0 then nums=numr4+numr3;

end;

if numr3=-4 and hgar3<7 then do;

   if numjr4>=0 then numj=numjr4;

   if numr4>=0 then nums=numr4;

end;

if numr3=-5 then do;

   if numr2>=0 then do;

      if numjr4>=0 then numj=numjr4+numr2;

      if numr4>=0 then nums=numr4+numr2;

   end;

   if numr1>=0 and numr2<0 then do;

      if numjr4>=0 then numj=numjr4+numr1;

      if numr4>=0 then nums=numr4+numr1;

   end;

 

/*For the youth who didn't answer the number of schools in round 1, we distinguish them into three cases 1)If the 'grade currently attended' in round 1 is <=7 and the 'highest grade attended' in round 3 >= 7, we use the number from round 3 as the total number. 2)If the 'grade currently attended' in round 1 >7, we use -3 for the total number. 3)If both the 'grade currently attended' in round 1 and the 'highest grade attended' in round 3 are <7, we use -4 for the total number.*/

   if numr1 in (0,-4) then do;

      if curgdr1<=7 then do; numj=numjr4; nums=numr4; end;

      if curgdr1>7 or numr1 in (-1,-2,-3) then do; numj=-3; nums=-3; end;

      if curgdr1<7 and hgar4<7 then do; numj=-4; nums=-4; end;

   end;

end;

 

if numr1 in (-4,0) and curgdr1>7 then do; nums=-4; numj=-4; end;

if -3<=numr1<=-1 or -3<=numr2<=-1 or numr3=-3 or numjr4=-3 then numj=-3;

if -3<=numr1<=-1 or -3<=numr2<=-1 or numr3=-3 or numr4=-3 then nums=-3;

if hgar4<7 then do; numj=-4; nums=-4; end;

 

if s826311=-5 then do; numjr4=-5; numr4=-5; numj=-5; nums=-5; end;

 

/*hand edits:*/

if id=3931 then do; nums=-3; numj=-3; end;                if id=4554 then do; nums=-3; numj=-3; end;

if id=383 then do; nums=-3; numj=-3; end;                if id=3858 then do; nums=-3; numj=-3; end;

 

/*these Rs were filled in with -4 because their HGA on the single item question was <7 but they report attending grades 7-12 in loops in prior rounds.  None report new schools in the current round so their CV equals that of the prior round;*/

if id in (155, 347, 694, 958, 1115, 3819, 4385, 8054) then do; nums=numr3; numj=numr3; end;

 

endsas;


Return to top


Total Fraction of Credits Earned towards Bachelors/Associate Degree

Variables Created: 

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

Round 1

 

Round 4

 

id  

PUBID

e16200

YSCH-16200.01

r1_asct 

CV_ASSOC_CREDITS  

e265211-e265214

YSCH-26521.01-.04

r1_bact 

CV_BA_CREDITS     

xcred1-xcred4 

YSCH-26827.01-.04

 

 

apcred1-apcred4

YSCH-26878.01-.04

Round 2

 

hscred1-hscred4

YSCH-26929.01-.04

r2pubid1-r2pubid6

NEWSCHOOL_PUBID.01-.06

e273371-e273374

YSCH-27337.01-.04

r2_asc1-r2_asc5 

CV_ASSOC_CREDITS.01-.05

e273881-e273884

YSCH-27388.01-.04

r2_bac1-r2_bac5 

CV_BA_CREDITS.01-.05

e228001-e228004

YSCH-22800.01-.04

 

 

e230001-e230003

YSCH-23000.01-.03

Round 3

 

r4pubid1-r4pubid5

NEWSCHOOL_PUBID.01-.05

r3pubid1-r3pubid7

NEWSCHOOL_PUBID.01-.07

 

 

r3_bac1-r3_bac5 

CV_BA_CREDITS.01-.05

 

 

Codes for Created Variable

These variables are created on a continuous scale.  They have 2 implied decimal places.

This program calculates the fraction of credits the respondent has completed toward an associate's degree or a bachelor's degree.


/* e23000(1-3) accounts for incorrect tabulation of Round3 credits earned. */

array e23000 (i) e230001-e230004;                               array e22800 (i) e228001-e228004;

array xcred (i) xcred1-xcred4;                    array apcred (i) apcred1-apcred4;

array hscred (i) hscred1-hscred4;                  array tcred (i) tcred1-tcred4;

array tascred (i) tascred1-tascred4;                 array tbacred (i) tbacred1-tbacred4;

array asfrac (i) asfrac1-asfrac4; /* created variable for associate credits */

array bafrac (i) bafrac1-bafrac4; /* created variable for bachelor credits */

array e27337 (i) e273371-e273374;                               array e27388 (i) e273881-e273884;

array r3tbac (i) r3tbac1-r3tbac5;                  array r2tbac (i) r2tbac1-r2tbac5;

array r3tasc (i) r3tasc1-r3tasc5;                   array r2tasc (i) r2tasc1-r2tasc5;

array r4tbac (i) r4tbac1-r4tbac4;                  array r4tasc (i) r4tasc1-r4tasc4;

array e26521 (i) e265211-e265214;                               array e23200 (i) e232001-e232004;

 

/* Initialize both created variables. */

do i=1 to 4; asfrac=0; bafrac=0; end;

 

/* If a respondent completed at least one term, CAPI verifies the total credits for each school at YSCH-22800.  Due to a design error, the check question YSCH-22800 does not include R2 college credits even when the PUBID's from both rounds match. However, if a respondent see this incorrect count and tells us it is correct, we will use it.  Respondents who have yet to complete a term at a given school will not be asked YSCH-22800. The only credits possible for these people are incoming credits at YSCH-26521, or the dli Round c.v. for a matching school. */

/* There are 3 ways to get credits in this program, which are all exclusive (except for 1 case mentioned below).  If the respondent completed any terms, we use YSCH-22800 and/or YSCH-23000. If the respondent has not completed any terms and reported a new school, then we use the incoming credits (YSCH-26521). If the respondent has not completed any terms and reported a dli school, then we use the total credit variable from the dli round (through the PUBID match variable described below).  */

array r4cred (i) r4cred1-r4cred4;

do i=1 to 4;

   if e22800>-4 then do; tcred=e22800; r4cred=1; end;

   if e23000>-4 then do; tcred=e23000; r4cred=1; end;

end;

 

/* Check for people who attended college but were skipped out of YSCH-22800 and YSCH-23000 (because no completed terms). */

array noterm (i) noterm1-noterm4;

do i=1 to 4;

   if e27337 in (1,3) and e22800=-4 and e23000=-4 then noterm=1;

end;

 

/* For people who did not complete any terms, the only data available is the incoming credits count and the created variable from their dli round. These two pieces of data are exclusive. */

do i=1 to 4;

   if noterm=1 and (r3tbac>0 or r3tasc>0) then do; back3=1; end;

   if noterm=1 and (r2tbac>0 or r2tasc>0) and r3int=-5 then do; back2=1; end;

end;

 

/* The flag variable checks for inconsistency of incoming credits answers. When reporting a new college, we ask the respondent for total incoming credits (YSCH-26521) and then to break them up into transfer credits, college credits earned in high school, & AP credits. When the sum of the three components doesn't equal the answer in YSCH-26521, flag=1. */

array flag (i) flag1-flag4;

do i=1 to 4;

   if E26521=>0 and XCRED=>0 and HSCRED=>0 and APCRED=>0 then do;

      if E26521 ne XCRED+HSCRED+APCRED then do; flag=1; end;

   end;

end;

 

/* The following are people who reported a new school and have no completed terms (and thus no answer to YSCH-22800). */

array incred (i) incred1-incred4;

do i=1 to 4;

   if e26521>-4 and e22800=-4 and e23000=-4 then do; tcred=e26521; incred=1; end;

end;

 

/* The last data source for credits are previous round data. Begin by matching Round 4 colleges to dli colleges using the pubid's. Note that this is only used when there are no completed terms in Round 4 (and thus no answer to YSCH-22800) and this school is a dli school (thus no answer to YSCH-26521). The pubid's omitted from the array below have no colleges. */

array r34m1 (i) r34m11-r34m14;                 array r34m2 (i) r34m21-r34m24;

array r34m3 (i) r34m31-r34m34;                 array r34m4 (i) r34m41-r34m44;

array r34m5 (i) r34m51-r34m54;                 array r24m1 (i) r24m11-r24m14;

array r24m2 (i) r24m21-r24m24;                 array r24m3 (i) r24m31-r24m34;

array r24m4 (i) r24m41-r24m44;                 array r24m5 (i) r24m51-r24m54;

array r2pub (i) r2pubid1-r2pubid5;                             array r3pub (i) r3pubid1-r3pubid4;

array r4pub (i) r4pubid1-r4pubid4;

 

do i=1 to 4;

   r34m1=0; r34m2=0; r34m3=0; r34m4=0;

   r24m1=0; r24m2=0; r24m3=0; r24m4=0; r24m5=0;

end;

 

/* 10-22-01 Define r34m14 as the dummy variable that equals one when the first college on the Round3 school roster and the fourth college on the Round4 roster have the same PUBID. Define r24m14 as the dummy variable that equals one when the first college on the Round2 school roster and the fourth college on the Round4 roster have the same PUBID. The "24" match variables require that R missed the Round 3 interview. Any college from Round1 is represented in the "first" position in the Round 2 created variables; i.e. ASFRAC1 (Round 2) is a school from Round 1. */

 

do over r4pub;                       /*If any PUBID from the first position in Round 2/3 matches any PUBID in Round 4*/

   if r3pubid1>0 and r4pub>0 and r3int>0 then do;

      if r3pubid1=r4pub then do; r34m1=1; end;

   end;

   if r2pubid1>0 and r4pub>0 and r3int=-5 and r2int>0 then do;

      if r2pubid1=r4pub then do; r24m1=1; end;

   end;

end;

do over r4pub;                       /*If any PUBID from the second position in Round 2/3 matches any PUBID in Round 4*/

   if r3pubid2>0 and r4pub>0 and r3int>0 then do;

      if r3pubid2=r4pub then do; r34m2=1; end;

   end;

   if r2pubid2>0 and r4pub>0 and r3int=-5 and r2int>0 then do;

      if r2pubid2=r4pub then do; r24m2=1; end;

   end;

end;

do over r4pub;                       /*If any PUBID from the third position in Round 2/3 matches any PUBID in Round 4*/

   if r3pubid3>0 and r4pub>0 and r3int>0 then do;

      if r3pubid3=r4pub then do; r34m3=1; end;

   end;

   if r2pubid3>0 and r4pub>0 and r3int=-5 and r2int>0 then do;

      if r2pubid3=r4pub then do; r24m3=1; end;

   end;

end;

do over r4pub;                       /*If any PUBID from the fourth position in Round 2/3 matches any PUBID in Round 4*/

   if r3pubid4>0 and r4pub>0 and r3int>0 then do;

      if r3pubid4=r4pub then do; r34m4=1; end;

   end;

   if r2pubid4>0 and r4pub>0 and r3int=-5 and r2int>0 then do;

      if r2pubid4=r4pub then do; r24m4=1; end;

   end;

end;

do over r4pub;                       /*If any PUBID from the fifth position in Round 2/3 matches any PUBID in Round 4*/

   if r2pubid5>0 and r4pub>0 and r3int=-5 and r2int>0 then do;

      if r2pubid5=r4pub then do; r24m5=1; end;

   end;

end;

 

/* Create a dummy that equals one if any of the "match" variables above equal one. This is just a shortcut, so we don't have to keep writing "or match11=1 or match12=1..." anytime we want to look at people with identical Round2 and Round3 colleges. */

do i=1 to 4;

   if r34m1=1 or r34m2=1 or r34m3=1 or r34m4=1 or r24m1=1 or r24m2=1 or r24m3=1 or r24m4=1 or r24m5=1 then do; same=1; end;

end;

 

/* We will accept dli credits without a matching degree working towards answer from current and dli round. For example, if a respondent reports working toward a associate's in his/her dli round and then reports working toward a bachelor's in the current round, we will still use the total dli credits in the current round c.v., as long as the pubid's match (i.e., it is the same school). */

array dlicred (i) dlicred1-dlicred4;

do i=1 to 4;

   if r2tasc1=>0 and r24m1=1 and e22800=-4 then do; tcred=r2tasc1; dlicred=1; end;

   if r2tbac1=>0 and r24m1=1 and e22800=-4 then do; tcred=r2tbac1; dlicred=1; end;

   if r2tasc2=>0 and r24m2=1 and e22800=-4 then do; tcred=r2tasc2; dlicred=1; end;

   if r2tbac2=>0 and r24m2=1 and e22800=-4 then do; tcred=r2tbac2; dlicred=1; end;

   if r2tasc3=>0 and r24m3=1 and e22800=-4 then do; tcred=r2tasc3; dlicred=1; end;

   if r2tbac3=>0 and r24m3=1 and e22800=-4 then do; tcred=r2tbac3; dlicred=1; end;

   if r2tasc4=>0 and r24m4=1 and e22800=-4 then do; tcred=r2tasc4; dlicred=1; end;

   if r2tbac4=>0 and r24m4=1 and e22800=-4 then do; tcred=r2tbac4; dlicred=1; end;

   if r2tasc5=>0 and r24m5=1 and e22800=-4 then do; tcred=r2tasc5; dlicred=1; end;

   if r2tbac5=>0 and r24m5=1 and e22800=-4 then do; tcred=r2tbac5; dlicred=1; end;

end;

 

do i=1 to 4;

   if r3tasc1=>0 and r34m1=1 and e22800=-4 then do; tcred=r3tasc1; dlicred=1; end;

   if r3tbac1=>0 and r34m1=1 and e22800=-4 then do; tcred=r3tbac1; dlicred=1; end;

   if r3tasc2=>0 and r34m2=1 and e22800=-4 then do; tcred=r3tasc2; dlicred=1; end;

   if r3tbac2=>0 and r34m2=1 and e22800=-4 then do; tcred=r3tbac2; dlicred=1; end;

   if r3tasc3=>0 and r34m3=1 and e22800=-4 then do; tcred=r3tasc3; dlicred=1; end;

   if r3tbac3=>0 and r34m3=1 and e22800=-4 then do; tcred=r3tbac3; dlicred=1; end;

   if r3tasc4=>0 and r34m4=1 and e22800=-4 then do; tcred=r3tasc4; dlicred=1; end;

   if r3tbac4=>0 and r34m4=1 and e22800=-4 then do; tcred=r3tbac4; dlicred=1; end;

end;

 

/* Associates Degree */

do i=1 to 4;

   if e27337=1 and tcred=>0 then do; r4tasc=tcred; end;

   if -4<e27388<0 and e27337=1 then do; asfrac=e27388; end;

   if -4<tcred<0 and e27337=1 then do; asfrac=tcred; end;

   if r4tasc=>0 and e27388>0 then do; asfrac=(r4tasc/e27388)*100; end;

   asfrac=round(asfrac,1);

   /* respondents who say they have graduated */ if e23200=1 and e27337=1 then asfrac=100;

end;

 

/* Bachelors Degree */

do i=1 to 4;

   if e27337=3 and tcred=>0 then do; r4tbac=tcred; end;

   if -4<e27388<0 and e27337=3 then do; bafrac=e27388; end;

   if -4<tcred<0 and e27337=3 then do; bafrac=tcred; end;

   if r4tbac=>0 and e27388>0 then do; bafrac=(r4tbac/e27388)*100; end;

   bafrac=round(bafrac,1);

   /* respondents who say they have graduated */ if e23200=1 and e27337=3 then bafrac=100;

end;

 

/* Non-interview & invalid data cases */

do i=1 to 4;

   if e16200=-5 then do; bafrac=-5; asfrac=-5; end;

end;

 

do i=1 to 4;

   if asfrac in (-2,-1) then do; asfrac=-3; end;

   if bafrac in (-2,-1) then do; bafrac=-3; end;

end;

 

/* These people we calculate 100 percent credits earned but say they haven't graduated. After looking at their college credits answers, we decided to assign them -3's in their respective c.v.'s. */

if id in (654, 4688) then asfrac1=-3;

if id in (6449, 8956) then asfrac2=-3;

if id=8797 then bafrac1=-3;

 

/* 15 people have either amiss or bmiss. Some of them have valid dli info but switched the degree working towards, some have zeros in credits earned, and some have zeros in credits needed to graduate. */

do i=1 to 4;

   if asfrac>100 or bafrac>100 then over=1;

   if e27337=1 and asfrac=. then amiss=1;

   if e27337=3 and bafrac=. then bmiss=1;

end;

 

/* There are 28 people with YSCH-27388 (# of credits needed to graduate) equal to zero. Information was not available from previous rounds.  */

do i=1 to 4;

   if e23200=1 and e27337=1 and 0<asfrac<100 then acheck=1;

   if e23200=1 and e27337=3 and 0<bafrac<100 then bcheck=1;

end;

 

do over e27337;

   if e27337=-4 then do; asfrac=-4; bafrac=-4; end;

end;

 

do over e27337;

   if e27337=1 then do; bafrac=-4; end;

end;

 

do over e27337;

   if e27337=3 then do; asfrac=-4; end;

end;

 

endsas;


Return to top


Youth's Math PIAT Score

Variables Created: 

Variables Used

Name in Program

Question Name on CD

bdate_d, m, y

KEY!BDATE_D, _M, _Y (round 1)

intdated, m, y

CV_INTERVIEW_DATE~D, ~M, ~Y

piat_r99

PIAT_RAW_SCORE

This program calculates the respondent's age utilizing the interview date information and the respondent's date of birth information.  It then uses the age data and the raw PIAT score to create a standard PIAT score and percentile rank for each respondent.


/***************interview date section: calculate the interview date in continuous months format******************/

if intdated  ge  0 and intdatem  ge  0 then int_cmon=((intdatey-1990)*12)+intdatem;

   else if intdatey eq -5 then int_cmon=-5;

if int_cmon=. then do;

    put 'PROBLEM: Unexpected value for interview date variable ' id= intdated= intdatem= intdatey=;

end;  

  

/****************respondent age section****************/

if bdate_y lt 1980 or bdate_y gt 1984 then do;

   put 'PROBLEM: Unexpected value for birthdate year ' id= bdate_d= bdate_m= bdate_y=;

end;

 

/**calculate the youth's age in continuous months**/

if int_cmon ne . then do;           

   age_cmon=((intdatey-bdate_y)*12)+(intdatem-bdate_m);

   if intdated-bdate_d<0 then age_cmon=age_cmon-1;

end;

 

/********************piat standard score section************/

if PIATR00 lt 0 then piat_s00=PIATR00;

else if PIATR00 ge 0 then do;

 

/* At this point the program loops through each three-month age range and assigns appropriate standard scores based on the respondent's raw score.  This code is quite lengthy and is not reproduced here; instead, we include a table that provides the standard score and percentile rank associated with each raw score in each age range.  Users who need the precise programming code should contact NLS User Services. */

 

********************piat percentile rank section************;

 

if piat_s00 lt 0 then piat_p00=piat_s00;

else if piat_s00 ge 0 then do;

 

/* At this point the program assigns percentile scores based on the standard scores.  These are also shown in the table on the following page. */

 

endsas;

 

   

Raw Score by Age Range (Years-Months)

   

Raw Score by Age Range (Years-Months)

Standard Score

Percentile Rank

15-9 to 15-11

16-0 to 16-2

16-3 to 16-5

16-6 to 16-8

16-9 to 16-11

17-0 to 17-2

Standard Score

Percentile Rank

15-9 to 15-11

16-0 to 16-2

16-3 to 16-5

16-6 to 16-8

16-9 to 16-11

17-0 to 17-2

55

0

£26

£27

£27

£28

£28

£28

99

47

85

85

86

86

86

87

56

0

27

28

28

29

29

29

100

50

86

86

87

87

87

88

57

0

28

29

29

 

 

30

101

53

87

87

88

88

88

 

58

0

29

 

 

30

30

31

102

55

88

88

 

 

 

89

59

0

 

30

30

31

31

32

103

58

 

 

89

89

89

90

60

0

30

31

31

32

32

33

104

61

89

89

90

90

 

 

61

0

31

32

32

33

33

34

105

63

90

90

 

 

91

91

62

1

32

33

33

34

34

36

106

66

 

 

91

91

92

92

63

1

33

34

34

36

36

37

107

68

91

91

92

92

 

 

64

1

34

36

37

37

38

38

108

70

92

92

 

 

93

93

65

1

36

37

38

38

39

39

109

73

 

93

93

93

 

 

66

1

38

38

39

39

40

40

110

75

93

 

 

94

94

94

67

1

39

39

40

40

41

41

111

77

 

94

94

 

 

 

68

2

40

40

41

41

43

43

112

79

94

 

 

 

 

 

69

2

41

41

43

43

44

44

113

81

 

 

 

95

95

95

70

2

43

43

44

45

45

45

114

82

 

95

95

 

 

 

71

3

44

45

45

47

47

48

115

84

95

 

 

 

 

96

72

3

46

47

47

49

49

50

116

86

 

 

96

96

96

 

73

4

48

49

49

50

50

52

117

87

96

96

 

 

 

 

74

4

49

50

50

52

52

53

118

88

 

 

 

97

97

97

75

5

51

52

52

53

53

54

119

90

 

97

97

 

 

 

76

5

53

53

54

54

54

56

120

91

97

 

 

 

 

98

77

6

54

54

56

56

56

58

121

92

 

 

98

98

98

 

78

7

57

56

58

58

58

59

122

93

98

98

 

 

 

 

79

8

58

58

59

59

60

61

123

94

 

 

 

 

 

 

80

9

59

59

61

61

62

62

124

95

 

 

 

 

 

 

81

10

61

61

62

62

64

64

125

95

 

 

 

 

 

 

82

12

62

62

64

64

66

66

126

96

 

 

 

 

 

 

83

13

64

64

66

66

68

68

127

96

 

 

 

 

 

 

84

14

66

67

68

68

69

69

128

97

 

 

 

 

 

 

85

16

68

69

69

69

70

70

129

97

 

 

 

 

 

 

86

18

69

70

70

71

71

71

130

98

 

 

 

 

99

99

87

19

70

71

71

72

72

72

131

98

 

 

99

99

 

 

88

21

71

72

72

74

74

74

132

98

99

99

 

 

 

 

89

23

72

74

74

75

75

75

133

99

 

 

 

 

 

 

90

25

74

75

75

76

76

76

134

99

 

 

 

 

 

 

91

27

75

76

76

77

77

77

135

99

 

 

 

 

 

 

92

30

76

77

77

78

78

79

136

99

 

 

 

 

 

 

93

32

78

78

78

79

79

81

137

99

 

 

 

 

 

 

94

34

79

79

79

81

81

82

138

99

 

 

 

 

 

 

95

37

81

81

81

82

82

83

139

100

 

 

 

 

 

 

96

39

82

82

82

83

83

84

140

100

 

 

 

100

100

100

97

42

83

83

83

84

84

85

141

100

 

100

100

 

 

 

98

45

84

84

85

85

85

86

142

100

100

 

 

 

 

 

Note:  This table of PIAT scores is based on the information provided by the testing company.  Users interested in more information about the PIAT-Math Assessment may wish to consult the following reference:

Markwardt, Frederick C. Jr.  Peabody Individual Achievement Test-Revised.  Circle Pines, Minn.:  American Guidance Service, Inc., 1989.


Return to top


QED Data:  School Size and Student-Teacher Ratio

Variables Created: 

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

pubid 

PUBID                        

starm11-starm51

NEWSCHOOL_START1.01~M-.05~M

e2857 

YSCH-2857           

stary11-stary51

NEWSCHOOL_START1.01~Y-.05~Y

e21625

YSCH-21625          

starm12, stary12

NEWSCHOOL_START2.01~M, ~Y

pin1-pin5

NEWSCHOOL_ID.01-.05     

starm22, stary22

NEWSCHOOL_START2.02~M, ~Y

age   

SYMBOL!KEY!AGE      

starm32, stary32

NEWSCHOOL_START2.03~M, ~Y

race  

SYMBOL!KEY!RACE     

stopm11-stopm51

NEWSCHOOL_STOP1.01~M-.05~M

gender

SYMBOL!KEY!SEX      

stopy11-stopy51

NEWSCHOOL_STOP1.01~Y-.05~Y

 

 

stopm12, stopy12

NEWSCHOOL_STOP2.01~M, ~Y

 

 

stopm22, stopy22

NEWSCHOOL_STOP2.02~M, ~Y

 

 

stopm32, stopy32

NEWSCHOOL_STOP2.03~M, ~Y

 

 

type1-type5 

NEWSCHOOL_SCHCODE.01-.05

Codes for Created Variable

School Size

Student-teacher ratio

1 = <100
2 = 100-299
3 = 300-499
4 = 500-749
5 = 750-999
6 = 1000+

1 = <14
2 = 14-17
3 = 18-21
4 = 22+

This program merges school identification information from the NLSY97 data with data from the "National Education Database," provided under copyright by Quality Education Data (QED), Inc.  It then creates two variables that provide information about the respondent's most recent K-12 school.


/* Before creating the QED variables, survey staff used dates of enrollment data to identify the respondent's current or most recent school and then merged that information with the QED data.  The process for identifying the most recent school is the same as that used in the creation of the CV_SCHOOL_TYPE variable, which appears earlier in this section.  This information is excluded here due to length and confidentiality restrictions.  Researchers needing more information about this process should contact NLS User Services. */

if e21625=999 then e21625=9;

schsize=-4;

studteac=-4;

 

/* Now, create schsize and studteac while checking that the grade reported in the QED coincides with that being reported in the NLSY97  */

 

if gradspan='"2"' then gradspan='"3"';

if gradspan='"a"' then gradspan='"2"';

if gradspan='"b"' or gradspan='"c"' or gradspan='"d"' or gradspan='"e"' or gradspan='"*"' then gradspan='"0"'; 

 

/* Redefine each gradspan to gradspn to eliminate character value problems */

if gradspan='"0"' then gradspn=0;

if gradspan='"1"' then gradspn=1;

if gradspan='"2"' then gradspn=2;

if gradspan='"3"' then gradspn=3;

if gradspan='"4"' then gradspn=4;

if gradspan='"5"' then gradspn=5; 

if gradspan='"6"' then gradspn=6;

if gradspan='"7"' then gradspn=7;

if gradspan='"8"' then gradspn=8;  

if gradspan='"9"' then gradspn=9; 

 

/* For respondents with e2857>12 but have a matching PIN number we will use the school with the matching pin instead of the college. Even though the college is the most recent school in these cases, the QED c.v.'s refer to the most recent high school (or middle, elementary, etc.).  */

if e2857>12 and pin>100 and typesch=3 then do;

   e2857=12; hgaflag=1;

end;

 

 dummy1=0;          dummy4=0; dummy5=0;

 dummy6=0;          dummy7=0; dummy8=0;

 dummy9=0;          dummy10=0;

if e2857 ge 1 and e2857 le 3 then do;

 dummy1=1;          dummy4=1; dummy5=1;

 dummy6=0;          dummy7=0; dummy8=0;

 dummy9=0;          dummy10=0;

end;

if e2857 ge 4 and e2857 le 6 then do;

 dummy1=1;          dummy4=1; dummy5=1;

 dummy6=1;          dummy7=0; dummy8=0;

 dummy9=0;          dummy10=0;

end;

if e2857 ge 7 and e2857 le 8 then do;

 dummy1=1;          dummy4=0; dummy5=1;

 dummy6=1;          dummy7=1; dummy8=1;

 dummy9=0;          dummy10=0;

end;

if e2857 eq 9 then do;

 dummy1=1;          dummy4=0; dummy5=0;

 dummy6=0;          dummy7=1; dummy8=1;

 dummy9=1;          dummy10=0;

end;

if e2857 ge 10 and e2857 le 12 then do;

 dummy1=1;          dummy4=0; dummy5=0;

 dummy6=0;          dummy7=0; dummy8=1;

 dummy9=1;          dummy10=1;

end;

 

correct=0;

if gradspn=1 and dummy1=1 then correct=1;     

if gradspn=4 and dummy4=1 then correct=1;

if gradspn=5 and dummy5=1 then correct=1;

if gradspn=6 and dummy6=1 then correct=1;

if gradspn=7 and dummy7=1 then correct=1;

if gradspn=8 and dummy8=1 then correct=1;

if gradspn=9 and dummy9=1 then correct=1;

if gradspn=2 and dummy10=1 then correct=1;

 

/* Rename character student range variable to numeric variable. */

if studrang='"0"' then stdrang=0;

if studrang='"1"' then stdrang=1;

if studrang='"2"' then stdrang=2;

if studrang='"3"' then stdrang=3;

if studrang='"4"' then stdrang=4;

if studrang='"5"' then stdrang=5;

if studrang='"6"' then stdrang=6;

if studrang='"7"' then stdrang=7;

if studrang='"8"' then stdrang=8;

if studrang='"9"' then stdrang=9;

if studrang='"."' then stdrang=-3;

 

/* If the grades reported in the QED and the NLSY97 do not coincide, we make both created variables equal to -3; otherwise, we proceed to create them according to the definition provided at the top of the program */

if studrang='"0"' or studrang='"1"' then schsize=1;

if studrang='"2"' then schsize=2;

if studrang='"3"' then schsize=3;

if studrang='"4"' then schsize=4;

if studrang='"5"' then schsize=5;

if studrang='"6"' or studrang='"7"' or studrang='"8"' or studrang='"9"' then schsize=6;

if studrang='"."' then schsize=-3;

 

if nostud gt 0 and noteach gt 0 then studtea1=nostud/noteach;

if studtea1 lt 14 then studteac=1;

if studtea1 ge 14 and studtea1 lt 18 then studteac=2;

if studtea1 ge 18 and studtea1 lt 22 then studteac=3;

if studtea1 ge 22 then studteac=4;

if studtea1 eq . then studteac=-3;

 

if correct=0 then schsize=-3;

if correct=0 then studteac=-3;

 

if e2857=-5 then schsize=-5;

if e2857=-5 then studteac=-5;

 

/* We also make sure that there are not five or less schools in each cell determined by the region, type of school, control, school size and the student-teacher ratio to avoid any possibilities of identifying the schools. We first run the tabulations, then assign -3 to the created variables for schools that fall in cells of five or less schools. */

index=census||typesch||e21625||schsize||studteac;

proc freq;

 tables census*typesch*e21625*schsize*studteac / out=a;

 proc freq data=A noprint;

 tables count;

data A;

set a;

index=census||typesch||e21625||schsize||studteac;

 

if count le 5 then schsize=-3;

if count le 5 then studteac=-3;

if e2857=-5 then do; studteac=-5; schsize=-5; end;  

 

/*If a respondent reports no schools in the Round 3 roster or the only schools in the R3 roster are 2 or 4 year universities */

if pin=-4 then schsize=-4;

if pin=-4 then studteac=-4;

 

endsas;


Return to top


Training:  Receipt of Certificate or Vocational License

Variables Created:

Variables Used

Name in Program

Question Name on CD

Name in Program

Question Name on CD

t6400d1-t6400d3

YTRN-640.01~D-.03~D

t1500m1-t1500m7

YTRN-1500.01~M-.07~M

t6400m1-t6400m3

YTRN-640.01~M-.03~M

t1500y1-t1500y7

YTRN-1500.01~Y-.07~Y

t6400y1-t6400y3

YTRN-640.01~Y-.03~Y

trncrt97-99

CV_TRN_CERT (rounds 1-3)

t690001-t690007

YTRN-6900.01-.07

trncdy97, 98

internal created variable for day of receipt

t700001-t700004

YTRN-7000.01-.04

trncmo97-99

CV_TRN_CERT_DATE (rounds 1-3)

t1500d1-t1500d7

YTRN-1500.01~D-.07~D

trncy97-99

CV_TRN_CERT_DATE (rounds 1-3)

Codes for Created Variable

Ever Received Vocational/Completion Certificate or State License (TRNCERT)

0  Condition Does Not Apply (no)--R took a training, but didn't earn cert.
1  Condition Applies (yes)

This program creates a variable that reports whether the respondent has ever received a certificate or license other than a GED through a training program.  If so, a pair of variables provide the month and year that the most recent certificate or license was obtained. 


TRNCERT=.; /*Ever received vocational/completion certificate or state license*/

TRNCMTH=.; /*Month of most recent certificate/license--based on date of completion of most recent cert/lic granting training program*/

TRNCYR=.;  /*Year of most recent certificate/license--based on date of completion of most recent cert/lic granting training program*/

reccert=0; /* a counting variable for use in programming to check do loops*/

 

/*Defining arrays*/

array t69000{5} t69001 - t69005;                  array t70000{5} t70001 - t70005;

array t1500m{5} t1500m1 - t1500m5;                array t1500y{5} t1500y1 - t1500y5;

array t6400m{5} t6400m1 - t6400m5;                array t6400y{5} t6400y1 - t6400y5;

array trncrt{3} trncrt97 - trncrt99;                 array trncmo{3} trncmo97 - trncmo99;

array trncy{3} trncy97 - trncy99;

 

do i=1 to 5;

   if reccert=0 and t69000{i}=1 and 1<=t70000{i}<=3 and t6400y{i}>1 then do;

       TRNCERT=1; TRNCYR=t6400y{i}; TRNCMTH=t6400m{i}; reccert=1;

   end;

   if reccert=0 and t69000{i}=1 and 1<=t70000{i}<=3 and t1500y{i}>1 then do;

       TRNCERT=1; TRNCYR=t1500y{i}; TRNCMTH=t1500m{i}; reccert=1;

   end;

   if reccert>=1 and t69000{i}=1 and 1<=t70000{i}<=3 and t1500y{i}=TRNCYR and t1500m{i}>TRNCMTH then do;

       TRNCMTH=t1500m{i}; reccert=reccert+1;

   end;

   if reccert>=1 and t69000{i}=1 and 1<=t70000{i}<=3 and t6400y{i}=TRNCYR and t6400m{i}>TRNCMTH then do;

       TRNCMTH=t6400m{i}; reccert=reccert+1;

   end;

   if reccert>=1 and t69000{i}=1 and 1<=t70000{i}<=3 and t1500y{i}>TRNCYR then do;

      TRNCYR=t1500y{i}; TRNCMTH=t1500m{i}; reccert=reccert+1;

   end;

   if reccert>=1 and t69000{i}=1 and 1<=t70000{i}<=3 and t6400y{i}>TRNCYR then do;

      TRNCYR=t6400y{i}; TRNCMTH=t6400m{i}; reccert=reccert+1;

   end;

   if TRNCERT^=1 then do;

      if t69000{i}=0 then TRNCERT=0;

      if t69000{i}=1 and t70000{i}>3 then TRNCERT=0;

      if t69000{i}=1 and t70000{i}<1 then TRNCERT=0;

   end;      

end;

 

/*code non-interviews*/

if t69001=-5 then do;

   TRNCERT=-5; TRNCYR=-5;  TRNCMTH=-5;

end;

 

/*This part compares values for current round to created vars for previous round(s) to obtain the most recent date of cert/lic receipt*/

do i=1 to 3;

   if trncert=. and trncrt{i}=1 then do;

      TRNCERT=TRNCRT{i}; TRNCYR=TRNCY{i}; TRNCMTH=TRNCMO{i};

   end;

   if trncert=0 and trncrt{i}=1 then do;

      TRNCERT=TRNCRT{i}; TRNCYR=TRNCY{i}; TRNCMTH=TRNCMO{i};

   end;

   if TRNCERT=1 and TRNCRT{i}=1 and TRNCY{i}>TRNCYR then do;

      TRNCYR=TRNCY{i}; TRNCMTH=TRNCMO{i};

   end;

   if TRNCERT=1 and TRNCRT{i}=1 and TRNCY{i}=TRNCYR and TRNCMO{i}>TRNCMTH then do;

      TRNCMTH=TRNCMO{i};

   end;

   if TRNCERT=. and TRNCRT{i}=0 then do;

      TRNCERT=TRNCRT{i}; TRNCYR=TRNCY{i}; TRNCMTH=TRNCMO{i};

   end;

end;

 

if TRNCYR=-2 or TRNCYR=-1 then TRNCYR=-3;

if TRNCMTH=-2 or TRNCMTH=-1 then TRNCMTH=-3;

if TRNCERT=. and t69001=-4 then TRNCERT=-4; 

if TRNCERT=. and t69001=-5 then TRNCERT=-5;

if TRNCERT=. and t69001=-2 then TRNCERT=-3;

if TRNCERT=. and t69001=-1 then TRNCERT=-3;

if TRNCERT=. and t69001=-3 then TRNCERT=-3;

if TRNCERT=. then TRNCERT=0;

if TRNCERT=1 and TRNCMTH<1 then TRNCMTH=-3;

if TRNCERT=1 and TRNCYR<1 then TRNCYR=-3;

 

/*if R took training but did not receive training cert then the date variables= valid skip  */

if TRNCERT=0 then TRNCMTH=-4;

if TRNCERT=0 then TRNCYR=-4;

 

/*if R received training cert but there is no date, then date variables = invalid skip*/

if TRNCERT=-3 then TRNCMTH=-3;

if TRNCERT=-3 then TRNCYR=-3;

 

/*valid skip*/  if TRNCERT=-4 then TRNCMTH=-4;

if TRNCERT=-4 then TRNCYR=-4;

/*noninterview*/  if TRNCERT=-5 then TRNCMTH=-5;

if TRNCERT=-5 then TRNCYR=-5;

 

endsas;


Return to top Return to Table of Contents