Variables Created:
CV_ENROLLSTAT
CV_HGC_EVER
CV_HGC_YR
CV_HIGHEST_DEGREE_EVER
CV_HIGHEST_DEGREE_YR
Variables Used
|
Name in Program |
Question Name on CD |
Name in Program |
Question Name on CD |
|
| Round 1 | Round 6 cont. | |||
| compyr5 | from r5 program | E841612 | YSCH-8416.01.02 | |
| e3500r1 | YSCH-3500 | E841621 | YSCH-8416.02.01 | |
| e11700r1 | YSCH-11700 | E841622 | YSCH-8416.02.02 | |
| e26700r1 | YSCH-26700 | E841631 | YSCH-8416.03.01 | |
| 28200r1 | YSCH-28200 | E841641 | YSCH-8416.04.01 | |
| t70001r1 | YTRN-7000.01 | E913111 | YSCH-9131.01.01 | |
| t70002r1 | YTRN-7000.02 | E913112 | YSCH-9131.01.02 | |
| t70003r1 | YTRN-7000.03 | E913121 | YSCH-9131.02.01 | |
| ENCATR1 | CV_ENROLLSTAT | E913122 | YSCH-9131.02.02 | |
| GRSURVR1 | CV_HGC_EVER | E913131 | YSCH-9131.03.01 | |
| DEGSURVR1 | CV_HIGHEST_DEGREE_EVER | E913141 | YSCH-9131.04.01 | |
| E933511M | YSCH-9335.01.01~M | |||
| Round 2 | E933511Y | YSCH-9335.01.01~Y | ||
| e2857r2 | YSCH-2857 | E933512M | YSCH-9335.01.02~M | |
| e3112r2 | YSCH-3112 | E933512Y | YSCH-9335.01.02~Y | |
| e11700r2 | YSCH-11700 | E933521M | YSCH-9335.02.01~M | |
| t70001r2 | YTRN-7000.01 | E933521Y | YSCH-9335.02.01~Y | |
| t70002r2 | YTRN-7000.02 | E933531M | YSCH-9335.03.01~M | |
| ENCATR2 | CV_ENROLLSTAT | E933531Y | YSCH-9335.03.01~Y | |
| GRSURVR2 | CV_HGC_EVER | E933541M | YSCH-9335.04.01~M | |
| GRJUNER2 | CV_HGC_YR | E933541Y | YSCH-9335.04.01~Y | |
| DEGSURVR2 | CV_HIGHEST_DEGREE_EVER | E938511 | YSCH-9385.01.01 | |
| DEGJUNER2 | CV_HIGHEST_DEGREE_YR | E938512 | YSCH-9385.01.02 | |
| E938521 | YSCH-9385.02.01 | |||
| Round 3 | E938522 | YSCH-9385.02.02 | ||
| e2857r3 | YSCH-2857 | E938531 | YSCH-9385.03.01 | |
| e3112r3 | YSCH-3112 | E938541 | YSCH-9385.04.01 | |
| e11700r3 | YSCH-11700 | E9589111 | YSCH-9589.01.01.01 | |
| t70001r3 | YTRN-7000.01 | E9589112 | YSCH-9589.01.01.02 | |
| t70002r3 | YTRN-7000.02 | E9589113 | YSCH-9589.01.01.03 | |
| t70003r3 | YTRN-7000.03 | E9589114 | YSCH-9589.01.01.04 | |
| t70004r3 | YTRN-7000.04 | E9589115 | YSCH-9589.01.01.05 | |
| encatr3 | CV_ENROLLSTAT | E9589121 | YSCH-9589.01.02.01 | |
| grsurvr3 | CV_HGC_EVER | E9589211 | YSCH-9589.02.01.01 | |
| grjuner3 | CV_HGC_YR | E9589212 | YSCH-9589.02.01.02 | |
| degsurvr3 | CV_HIGHEST_DEGREE_EVER | E9589213 | YSCH-9589.02.01.03 | |
| degjuner3 | CV_HIGHEST_DEGREE_YR | E9589214 | YSCH-9589.02.01.04 | |
| E9589311 | YSCH-9589.03.01.01 | |||
| Round 4 | E9589312 | YSCH-9589.03.01.02 | ||
| e2857r4 | YSCH-2857 | E9589313 | YSCH-9589.03.01.03 | |
| e3112r4 | YSCH-3112 | E9589411 | YSCH-9589.04.01.01 | |
| e11700r4 | YSCH-11700 | E9589412 | YSCH-9589.04.01.02 | |
| t70001r4 | YTRN-7000.01 | E9946111 | YSCH-9946.01.01.01 | |
| t70002r4 | YTRN-7000.02 | E9946112 | YSCH-9946.01.01.02 | |
| t70003r4 | YTRN-7000.03 | E9946113 | YSCH-9946.01.01.03 | |
| t70004r4 | YTRN-7000.04 | E9946114 | YSCH-9946.01.01.04 | |
| encatr4 | CV_ENROLLSTAT | E9946115 | YSCH-9946.01.01.05 | |
| grsurvr4 | CV_HGC_EVER | E9946121 | YSCH-9589.01.02.01 | |
| grjuner4 | CV_HGC_YR | E9946211 | YSCH-9589.02.01.01 | |
| degsurvr4 | CV_HIGHEST_DEGREE_EVER | E9946212 | YSCH-9589.02.01.02 | |
| degjuner4 | CV_HIGHEST_DEGREE_YR | E9946213 | YSCH-9589.02.01.03 | |
| E9946214 | YSCH-9589.02.01.04 | |||
| Round 5 | E9946311 | YSCH-9589.03.01.01 | ||
|
e2857 |
YSCH-2857 |
E9946312 | YSCH-9589.03.01.02 | |
|
e3112r5 |
YSCH-3112 |
E9946313 | YSCH-9589.03.01.03 | |
| e11700r5 | YSCH-11700 | E9946411 | YSCH-9589.04.01.01 | |
| t70001r5 | YTRN-7000.01 | E9946412 | YSCH-9946.04.01.02 | |
| t70002r5 | YTRN-7000.02 | E10099111M | YSCH-10099.01.01.01~M | |
| t70003r5 | YTRN-7000.03 | E10099111Y | YSCH-10099.01.01.01~Y | |
| t70004r5 | YTRN-7000.04 | E10099112M | YSCH-10099.01.01.02~M | |
| ENCATR5 | CV_ENROLLSTAT | E10099112Y | YSCH-10099.01.01.02~Y | |
| GRSURVR5 | CV_HGC_EVER | E10099113M | YSCH-10099.01.01.03~M | |
| GRJUNER5 | CV_HGC_YR | E10099113Y | YSCH-10099.01.01.03~Y | |
| DEGSURVR5 | CV_HIGHEST_DEGREE_EVER | E10099114M | YSCH-10099.01.01.04~M | |
| DEGJUNER5 | CV_HIGHEST_DEGREE_YEAR | E10099114Y | YSCH-10099.01.01.04~Y | |
| Round 6 | E10099211M | YSCH-10099.02.01.01~M | ||
| E3103 | YSCH-3103 | E10099211Y | YSCH-10099.02.01.01~Y | |
| E3104 | YSCH-3104 | E10099212M | YSCH-10099.02.01.02~M | |
| E2806 | YSCH-2806 | E10099212Y | YSCH-10099.02.01.02~Y | |
| E2857 | YSCH-2857 | E10099213M | YSCH-10099.02.01.03~M | |
| E2908 | YSCH-2908 | E10099213Y | YSCH-10099.02.01.03~Y | |
| E3010 | YSCH-3010 | E10099214M | YSCH-10099.02.01.04~M | |
| E3061 | YSCH-3061 | E10099214Y | YSCH-10099.02.01.04~Y | |
| E3112 | YSCH-3112 | E10099311M | YSCH-10099.03.01.01~M | |
| E3877 | YSCH-3877 | E10099311Y | YSCH-10099.03.01.01~Y | |
| E3877B | YSCH-3877B | E10099312M | YSCH-10099.03.01.02~M | |
| E3878 | YSCH-3878 | E10099312Y | YSCH-10099.03.01.02~Y | |
| E4793 | YSCH-4793 | E10099313M | YSCH-10099.03.01.03~M | |
| E4795 | YSCH-4795 | E10099313Y | YSCH-10099.03.01.03~Y | |
| E1605 | YSCH-1605 | E10099411M | YSCH-10099.04.01.01~M | |
| E16151 | YSCH-1615.01 | E10099411Y | YSCH-10099.04.01.01~Y | |
| E16241 | YSCH-1624.01 | E11700 | YSCH-11700 | |
| E16271 | YSCH-1627.01 | E11900M | YSCH-11900~M | |
| E4951 | YSCH-4951 | E11900Y | YSCH-11900~Y | |
| E54581 | YSCH-5458.01 | E11900Y | YSCH-13300 | |
| E54582 | YSCH-5458.02 | E13500M | YSCH-13500M | |
| E54583 | YSCH-5458.03 | E13500Y | YSCH-13500Y | |
| E54584 | YSCH-5458.04 | E273371 | YSCH-27337.01 | |
| E67841 | YSCH-6784.01 | E273372 | YSCH-27337.02 | |
| E67842 | YSCH-6784.02 | E273373 | YSCH-27337.03 | |
| E67843 | YSCH-6784.03 | E273374 | YSCH-27337.04 | |
| E67844 | YSCH-6784.04 | E273375 | YSCH-27337.05 | |
| E69381 | YSCH-6938.01 | E234501 | YSCH-23450.01 | |
| E69382 | YSCH-6938.02 | E234502 | YSCH-23450.02 | |
| E69383 | YSCH-6938.03 | E234503 | YSCH-23450.03 | |
| E694311 | YSCH-6943.01.01 | E234505 | YSCH-23450.05 | |
| E694321 | YSCH-6943.02.01 | T70001 | YTRN-7000.01 | |
| E714111 | YSCH-7141.01.01 | T70002 | YTRN-7000.02 | |
| E714121 | YSCH-7141.02.01 | T70003 | YTRN-7000.03 | |
| E714131 | YSCH-7141.03.01 | T70004 | YTRN-7000.04 | |
| E714141 | YSCH-7141.04.01 | T70005 | YTRN-7000.05 | |
| E71921 | YSCH-7192.01 | PUBID | PUBID | |
| E71922 | YSCH-7192.02 | YINT_D | SYMBOL!CURDATE~D | |
| E71923 | YSCH-7192.03 | YINT_M | SYMBOL!CURDATE~M | |
| E71924 | YSCH-7192.04 | YINT_Y | SYMBOL!CURDATE~Y | |
| E841611 | YSCH-8416.01.01 |
Codes for Created Variables
|
Enrollment Status (CV_ENROLLSTAT) |
|
|
1.
not enrolled, no high school degree, no GED |
7.
not enrolled, graduate degree |
|
Highest Grade Completed (CV_HGC_EVER, CV_HGC_YR) |
|||
|
0.
none |
6.
sixth |
12.
twelfth |
17.
fifth year college |
|
Highest Degree Received (CV_HIGHEST_DEGREE_EVER, CV_HIGHEST_DEGREE_YR) |
|
|
0.
none |
4.
bachelor's degree (B.A., B.S., or unspecified) |
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 6 interview date and as of June 30, 2002. 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 5, approximately 100 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 **/
FILL1=-4; /*FILL1-FILL3 are a filler variable to make the arrays match */
FILL2=-4;
FILL3=-4;
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 working towards an undergrad or grad degree or neither */
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 */
SOMECOLL=0; /* Indicator to flag respondents having attended a college (in a degree program) in current or
previous rounds */
PREVCOLL=0; /* Indicator to flag respondents having attended a college (in a degree program) in previous rounds */
CURRCOLL=0; /* Indicator to flag respondents having attended a college (in a degree program) in current round */
FLAGGRADE=0; /* Indicator to flag respondents reporting HGC greater than HGA */
QUEX_PROB_LOOP=0; /* Indicator to flag when respondents reporting attending a 2 or 4 year college are not asked
degree that they are working towards. */
PROB_SEAM=0; /* Indicator to flag respondents who received a degree in the same month as the interview and so
the ENCAT is not correct. **/
PROB_PREVINFO=0; /* Indicator to flag respondents who received a degree in the last round and that information was
not incorporated when computing ENCAT and so the ENCAT is not correct. **/
NODEGREE=0; /* Flag for rs enrolled in non-degree college programs */
FLAGVOC=0; /* Flag for rs enrolled in "vocational/technical certificate program" */
LASTENROLL=0; /* Indicates the last round that respondent was enrolled */
FLAGENDE=0; /* Indicates rs who have a high school diploma and hgc=12 but still report enrollment in school */
FLAGGED=0; /* Indicates respondent is enrolled in a non-degree college program in college but has neither ged nor hs diploma yet hga>12 */
UNGRADED=0; /* Indicates respondent has no high school diploma or ged and hga=ungraded */
FLAGNDEG=0; /* Indicates respondent is enrolled in a non-degree program at college */
SAMEMONTH=0; /* Indicates the date of last degree received is the same as the interview month */
BOTH=0; /* Flag to indicate that respondent reports receiving both ged and hs diploma */
ENR_DEG=0; /* Flag to indicate if respondent is currently enrolled in a degree program when a non-degree program is reported after a degree-program in the school loops */
ROSPRB=0; /* Flag to indicate cases where roscode(i)=-4 but e27337(i)>-4 */
/*
GED_TR=1 If we have assigned a ged to R in the cveduR5_3.sas i.e. DATE OG DEGREE RECEIVED program
GED_TR=2 if we have assigned a ged to R in this program and training questions are not -1, -2, -3.
GED_TR=3 if we have assigned a ged to R in this program and training questions are either -1, -2, -3.*/
/** Defining arrays to be used later in the program **/
array e6784 e67841 e67842 e67843 e67844;
array e7192 e71921 e71922 e71923 e71924;
array e6938 e69381 e69382 e69383 FILL1;
array e69431 e694311 e694321 FILL2 FILL3;
array e7142 e714211 e714221 e714231 e714241;
array e23450 e234501 e234502 e234503 e234504 e234505;
array e27337 e273371 e273372 e273373 e273374 e273375;
array roscode roscode1 roscode2 roscode3 roscode4;
array t7000a t70001 t70002 t70003 t70004
t70001r1 t70002r1 t70003r1
t70001r2 t70002r2
t70001r3 t70002r3 t70003r3 t70004r3
t70001r4 t70002r4 t70003r4 t70004r4;
array grcomp E913111 E913112 E913121 E913122 E913131 E913141
E9946111 E9946112 E9946113 E9946114 E9946115 E9946121
E9946211 E9946212 E9946213 E9946214
E9946311 E9946312 E9946313
E9946411 E9946412;
array yrcomp E933511Y E933512Y E933521Y E933522Y E933531Y E933541Y
E10099111Y E10099112Y E10099113Y E10099114Y E10099115Y E10099121Y
E10099211Y E10099212Y E10099213Y E10099214Y
E10099311Y E10099312Y E10099313Y
E10099411Y E10099412Y;
array mcomp E933511M E933512M E933521M E933522M E933531M E933541M
E10099111M E10099112M E10099113M E10099114M E10099115M E10099121M
E10099211M E10099212M E10099213M E10099214M
E10099311M E10099312M E10099313M
E10099411M E10099412M;
array grade E841611 E841612 E841621 E841622 E841631 E841641
E9589111 E9589112 E9589113 E9589114 E9589115 E9589121
E9589211 E9589212 E9589213 E9589214
E9589311 E9589312 E9589313
E9589411 E9589412;
array intm int97_m int98_m int99_m int00_m int01_m;
array inty int97_y int98_y int99_y int00_y int01_y;
array encatr encat1-encat5;
array enrollr enroll1-enroll5;
array degsurvr degsurvr1-degsurvr5
HANDEDITS (1): Incorporating information
from comments & earlier rounds and round7.;
if pubid=3232 then do; E933511M=5; end;
if pubid=7860 then do; E933511M=10; end;
if pubid=175 then do; E273371=3; end;
if pubid=1359 then do; E273372=1; end;
if pubid=5987 then do; E273371=1; end;
if pubid=7476 then do; E273371=1; end;
if pubid=1612 then do; E273371=1; end;
if pubid=5438 then do; E273371=1; end;
do J=1 to 5;
if intm(J) NE -5 then do;
dlicm=((inty(J)-1980)*12)+intm(J);
dlirnd=J;
end;
if int02_m NE -5 then doicm=((int02_y-1980)*12)+int02_m;
end;
do I=1 to 4;
if (ROSCODE[i]=4 or ROSCODE[i]=5) and E27337[i]=-4 then QUEX_PROB_LOOP=1;
if ROSCODE[i]=-4 and E27337[i]
gt -4 then ROSPRB=I;
end;
if E273375 gt -4 then ROSPRB=5;
do i=1 to 5;
if ENCATR[i] in (8,9,10,11) then ENROLLR[i]=1;
if ENCATR[i] in (1,2,3,4,5,6,7) then ENROLLR[i]=0;
if ENCATR[i] lt 0
then ENROLLR[i]=ENCATR[i];
end;
do i=1 to 5;
if ENROLLR[i]=1 then LASTENROLL=I;
end;
do i=1 to 5;
if E27337[i]=2 then FLAGVOC=1;
end;
*** Create variables to be used in the
program;
** DIP.
NOTE: DIP_X=1 is a variable created in the "date of degree received" program
which is 1 if
respondent received a HS DIPLOMA.;
if DIP_X=1 then DIP=1;
else if E11700R1 in (-1, -2, -3) or E26700R1 in (-1, -2, -3) or E11700R2 in (-1,
-2, -3)
or E11700R3 in (-1, -2, -3) or E11700R4 in (-1, -2, -3) or E11700R5 in (-1, -2,
-3)
or E11700 in (-1, -2, -3) then DIP=-3;
** GED.
NOTE: E13300 is not available for round2-- use ENCATR2. GED_X=1 is a variable
created in the "date
of degree received" program which is 1 if respondent received GED;
if GED_X=1 then GED=1;
if E28200R1 in (-1, -2, -3) or ENCATR2 in (-1, -2, -3) or E13300R3 in (-1, -2,
-3)
or E13300R4 in (-1, -2, -3) or E13300R5 in (-1, -2, -3) or E13300 in (-1, -2,
-3)
or E234501 in (-1, -2, -3) or E234502 in (-1, -2, -3) or E234503 in (-1, -2, -3)
or E234504 in (-1, -2, -3) or E234505 in (-1, -2, -3) then GED=-3;
do i=1 to DIM(T7000A);
if T7000A[i]=4 then do;
GED=1;
GED_TRN=1;
end;
if GED=0 and T7000A[i] in (-1, -2, -3) then do;
GED=-3;
GED_TRN=2;
end;
end;
if DIP=1 and GED=1 then BOTH=1;
** SOMECOLL;
** - When respondent attended college (in a degree program) in a previous round;
do i=1 to 5;
if ENCATR[i] in (4,5,6,7,9,10,11) and DEGSURVR[i] in (1,2) then do;
SOMECOLL=1;
PREVCOLL=1;
end;
end;
** - When respondent attended college (in a degree program) in a previous round
and did not correct
highest grade attended as of last interview (E2806) to highest grade attended
<13 i.e. accepts
being in college as of last interview;
do i=2 to 5;
if ((E2806 in (-4,-5)) or (E2806>=13)) and ENCATR[i] in (4,5,6,7,9,10,11) and
(DIP=1 or GED=1)
then do;
SOMECOLL=1;
PREVCOLL=1;
end;
end;
** Flag to indicate that respondent attended college (in a degree program) in
this round;
do i=1 to 4;
if ROSCODE[i] in (4,5) and E27337[i] in (1,3,4,5,6) then do;
SOMECOLL=1;
CURRCOLL=1;
end;
end;
** Create variable indicating highest grade attended (HGALOOP), highest grade
completed(HGCLOOP) and
the date of completion of the HGCLOOP(HGCDT) from loops;
HGALOOP=E841611;
do i=2 to DIM(GRADE);
if GRADE(I)>HGALOOP then do;
HGALOOP=GRADE(I);
end;
end;
HGCLOOP=-16;
do i=1 to DIM(GRADE);
if GRADE[i]>=0 and GRADE[i]>HGCLOOP then do;
if GRCOMP[i]=1 then do;
HGCLOOP=GRADE[i];
if MCOMP[i]>0 and YRCOMP[i]>0 then HGCDT=((YRCOMP[i]-1980)*12)+MCOMP[i];
if MCOMP[i]>0 and YRCOMP[i]>0 then HGCDT=-3;
end;
else if GRCOMP[i] in (-1,-2,-3) then HGCLOOP=GRCOMP[i];
end;
if GRADE[i] in (0,-1, -2, -3,-4) and GRCOMP[i]>-4 then HGCLOOP=-55;
end;
do i=1 to 5;
if E27337[i] in (2,7,8) then FLAGNDEG=1;
end;
if (1<=E2857<=12) and DIP=0 and GED=0 then HS=1;
do i=1 to 5;
if E27337[i] in (1,3) then COLLEGE=1;
if E27337[i] in (4,5,6) then COLLEGE=2;
if E27337[i] in (-1,-2,-3) then COLLEGE=-3;
end;
** ENCATPREV: ENCAT in the last round that respondent was interviewed;
do i= 1 to DIM(ENCATR);
if ENCATR(I)~=-5 then ENCATPREV=ENCATR(I);
end;
** ENR_DEG;
if E273371 in (1,3,4,5,6) and (E273372 in (2,7,8) or E273373 in (2,7,8) or
E273374 in (2,7,8))
and (ROS_STOP11M=INT02_M and ROS_STOP11Y=INT02_Y) then ENR_DEG=1;
if E273372 in (1,3,4,5,6) and (E273373 in (2,7,8) or E273374 in (2,7,8))
and (ROS_STOP12M=INT02_M and ROS_STOP12Y=INT02_Y) then ENR_DEG=2;
/** ENROLLMENT STATUS: Begin by determining whether the respondent is enrolled
Note that summer vacations are included as part of the enrollment period **/
if e2857 lt e3112 then FLAGGRADE=1;
if (0<=E2857<12) and (E3112>=12) then FLAGGRADE=2;
**
NOTE: 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.;
if E16241=1 then FLAGLOOP=1; * FLAG THOSE WHO RE-ENROLL;
** NOT ENROLLED AT and SDLI;
if E3878=0 then ENROLL=0;
** OLD SCHOOL;
if E4795=1 then ENROLL=1; * Enrolled at DLI, continuously enrolled in old school
SDLI, no new schools;
if E4795=0 and E4951=0 then ENROLL=0; * Enrolled at SDLI, not continuously
enrolled, no new schools;
if E4793=1 then ENROLL=1; * Not enrolled at DLI but re-enrolled in old school
SDLI, continuously
re-enrolled in old school sdli, no new schools;
if E4793=0 and E4951=0 then ENROLL=0; * Not enrolled at SDLI, re-enrolled in
old-school, not
continuously enrolled, no new schools;
if (E4795=0 or E4793=0) then do; * Not continuously enrolled;
if E1605=1 then do; * But re-enrolled in old school;
if E16151=1 and E4951=0 then ENROLL=1; * Continuously re-enrolled in old school,
no new schools;
if E16151=0 and E16241=0 and E16271=0 and E4951=0 then ENROLL=0; * Not
continuously re-enrolled
in old school, first time
through loop, no other
re-enrollments at old school,
and no new schools reported;
end;
if E1605=0 and E4951=0 then ENROLL=0; * Not continuously enrolled in old school
SDLI, not
re-enrolled, no new schools;
end;
** NEW SCHOOL;
if (E4951=1 or E3878=1) then do; *
Enrolled or not enrolled at DLI but enrolled in new school SDLI;
** Enrollment in new schools;
do i=1 to 4;
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,
no other new schools reported;
end;
** Re-enrollment periods in new schools;
do i=1 to 4;
if (E6784[i]=0 and E6938[i]=1) then do; * Not continuously enrolled in new
school, re-enrolled;
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;
if E4793=1 or E4795=1 then ENROLL=1; *
If continuous enrollment is reported we keep that as it is.;
** If respondent has received a high school degree, highest grade attended &
highest grade completed
is 12 and there a valid end date for the completed 12th grade then we check
whether respondent
should be coded as enrolled or not. If respondent reports a 2-yr or 4-yr college
then respondent
is coded as enrolled irrespective of the type of degree working towards;
if DIP=1 and HGCLOOP=12 and HGCDT>0 and ENROLL=1 then do;
CHK_ENR=1;
ENROLL=0;
do i=1 to 4;
if ROSCODE(I) in (4,5) then ENROLL=1;
end;
end;
** HANDEDITS (2): Incorporating information from comments.;
if pubid=11 then do; ENROLL=1; end;
if pubid=951 then do; ENROLL=0; end;
*** (IB) Determining the sub-categories of not enrolled;
if ENROLL=0 then do;
** NO HIGH SCHOOL DEGREE, NO GED - ENCAT=1;
if (GED<=0) and (DIP<=0) then ENCAT=1;
** GED - ENCAT=2;
if GED=1 then ENCAT=2;
** HIGH SCHOOL DEGREE - ENCAT=3;
if DIP=1 then ENCAT=3;
** Respondent(now not enrolled) attended some college and was enrolled in a
degree program (i.e.
E27337 in (1,3,4,5,6), - ENCAT=4.;
** Respondent attended some college, perhaps in a prior round;
if PREVCOLL=1 then ENCAT=4;
** Respondent attended some college in current round;
if CURRCOLL=1 and ((13<=E2857<=20) or E3112>=12 or DIP=1 or GED=1) then ENCAT=4;
do i=1 to 5;
** RECEIVED JUNIOR COLLEGE or 2 YEAR ASSOCIATE DEGREE - ENCAT=5;
if DTAA>-4 then ENCAT=5;
** RECEIVED BACHELOR'S DEGREE - ENCAT=6;
if DTBA>-4 then ENCAT=6;
** RECEIVED MASTER'S, DOCTORAL or PROFESSIONAL DEGREE - ENCAT=7;
if DTMA>-4 or DTDOC>-4 or DTPROF>-4 then ENCAT=7;
end;
** If highest grade attended is at least 1 year of college
(E2857>=13),respondent reports a
college on the roster and has HS DIPLOMA/GED, but does not indicate being
enrolled in a
college degree program (i.e. E27337=2 or>=7) then respondent will not be coded
as having
attended college.
Note: Respondents who indicate 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 BACHELORS or ASSOCIATES DEGREE.;
do i=1 to 4;
if DIP=1 and ROSCODE[i] in (4,5) and (E27337[i]>6 or E27337[i]=2) and SOMECOLL=0
then ENCAT=3;
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 ENCAT=2;
end;
end;
*** (IC) Determining the sub-categories of enrolled;
if ENROLL=1 then do;
** Note: Use roster info. on school enrollment to identify type of school
(2-yr/4-yr) enrolled in.
That is a better indicator of current enrollment status than e27337 (the type of
degree
program working towards). Many attending 2-yr schools report being in a 4-yr
degree program
because that is their ultimate degree goal. Use e27337 only to identify those
working towards
"some" degree program - AA/BA/MA and higher. Also use highest grade attended
info. (E3112 and
E2857) to identify those not in high school. In addition to identify those
working towards a
post-baccalaureate degree use E2857 and E3112;
do i=1 to 4;
** Respondents who report receiving a HS DIPLOMA, provide a valid date for
diploma receipt,
highest grade completed as 12 yet also report current enrollment in a high
school are coded
ENCAT = 3.;
if DTHS>0 and E3112=12 and ROSCODE[i] in (-4,1,2,3) then do;
ENCAT=3;
FLAGENDE=1;
end;
end;
** Current highest grade attended is not greater than 12th grade and doesn't
have a DIPLOMA/GED
- ENCAT=8;
if (1<=E2857<=12) and (DIP<=0) and (GED<=0) then ENCAT=8;
do i=1 to 4;
** Respondent enrolled in a 2/4 year school (roscode in 4,5) and working towards
a vocational
or technical certificate, or not enrolled in a degree program or other
(E27337=2,7,8) and
has a GED/HS DIPLOMA but did not attend some college (degree program) in this or
previous
rounds then - ENCAT = 2 or 3;
if 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 GED=1 and DIP=0 and ROSCODE[i] in (4,5) and E27337[i] in (2,7,8) and
SOMECOLL=0 then do;
ENCAT=2;
NODEGREE=1;
end;
** Respondent is enrolled in a 2-yr/4-yr college, working towards a GED and has
neither GED or
HS DIPLOMA - ENCAT=8;
if DIP=0 and GED=0 and ROSCODE[i] in (4,5) and E27337[i]=9 then ENCAT=8;
** Respondent is enrolled in a 2-yr/4-yr college, reports being in a non-degree
college program
- has neither GED or HS DIPLOMA and highest grade attended is greater than 12 -
ENCAT=8;
if DIP=0 and GED=0 and ROSCODE[i] in (4,5) and E27337[i] in (7,8) and
(13<=E2857<95) then do;
ENCAT=8;
FLAGGED=1;
NODEGREE=1;
end;
end;
do i=1 to 4;
** Respondent is enrolled in a 2-yr/4-yr college, reports being in a non-degree
college program,
and previously attended a college in a degree program,
if respondent has a GED or HS DIPLOMA then - ENCAT=4.
if respondent has a ASSOCIATES DEGREE then ENCAT=5.
if respondent has a BACHELOR'S DEGREE then ENCAT=6.
if respondent has a MASTER'S, DOCTORATE or PROFESSIONAL DEGREE then ENCAT=7.
Note: In a few cases (quex_prob_loop=1) respondents report a 2 or 4-yr college
but are not
asked the type of degree working towards. If they report some college we compute
their encat
accordingly;
if ROSCODE[i] in (4,5) and E27337[i] in (2,7,8) and SOMECOLL=1 then do;
if (DIP=1 or GED=1) then do;
ENCAT=4;
NODEGREE=1;
end;
if DTAA>-4 then ENCAT=5;
if DTBA>-4 then ENCAT=6;
if (DTMA>-4 or DTDOC>-4 or DTPROF>-4) then ENCAT=7;
end;
** Respondent enrolled in 2-yr school, working toward a degree, and current
grade is greater
than high school - ENCAT=9;
if ROSCODE[i]=4 and (E27337[i] in (1,3,4,5,6)) and ((13<=E2857<95) or E3112>=12)
then ENCAT=9;
** Respondent enrolled in 2-yr school, working toward a degree, and has GED or
HS DIPLOMA
- ENCAT=9;
if ROSCODE[i]=4 and (E27337[i] in (1,3,4,5,6)) and (GED=1 or DIP=1) then
ENCAT=9;
** Respondent enrolled in 4-yr school, working toward a degree and current grade
is greater
than high school - ENCAT=10;
if ROSCODE[i]=5 and (E27337[i] in (1,3,4,5,6)) and ((13<=E2857<95) or E3112>=12)
then ENCAT=10;
** Respondent enrolled in 4-yr school, working toward a degree and has GED or HS
DIPLOMA
- ENCAT=10;
if ROSCODE[i]=5 and (E27337[i] in (1,3,4,5,6)) and (GED=1 or DIP=1) then
ENCAT=10;
** Respondent enrolled in a university, working towards a graduate degree and
current grade
is greater than or equal to 4th year college.;
if ROSCODE[i]=5 and (4<=E27337[i]<=6) and ((16<E2857<95) or E3112>=16) then
ENCAT=11;
end;
** Respondents who are enrolled, have no evidence of a high school diploma, yet
reported that
highest grade attended was 1st year of college will be placed under enrolled in
grades 1-12
(ENCAT=8) since there is no evidence these people have a diploma and have not
attended a new
school;
if E2857=13 and DIP=0 and GED=0 then ENCAT=8;
** Respondents who report the highest grade attended as ungraded (YSCH-2857=95),
show no evidence
of a HS DIPLOMA, were skipped out of the homeschool question, and are enrolled
are
coded as enrolled between grades 1 and 12 (ENCAT=8) since there is no evidence
of a HS DIPLOMA.;
if DIP=0 and GED=0 and E2857=95 then do;
ENCAT=8;
UNGRADED=1;
end;
** FLAG individuals who are enrolled in grades 1 to 12 as well as 2-yr/4-yr
colleges and have
neither a GED not a HS DIPLOMA. They could be getting credits towards GED. -
ENCAT=8.;
if HS=1 and COLLEGE=1 then do;
FLAGCOL=1;
ENCAT=8;
end;
end;
** [ID] Taking care of miscoding because of inconsistent information;
** 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 respondent is working toward a
BA and the second
school is a 2/4 year college respondent 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 respondent reports earning a diploma or
ged--continuous
enrollment in a high school is overwritten with ENCAT in (2,3) depending on
degree reported.
Note: since there is no option to report graduate school using E27337 (degree
working towards)
information to identify master's and higher graduates;
if E4795=1 and ENROLL=1 then do;
if ROSCODE1=4 and E273371 in (1,3,4,5,6) and E273372 in (-4,2,7,8) and E273373
in (-4,2,7,8)
and E273374 in (-4,2,7,8) then ENCAT=9;
if ROSCODE1=5 and E273371 in (1,3,4,5,6) and E273372 in (-4,2,7,8) and E273373
in (-4,2,7,8)
and E273374 in (-4,2,7,8) then ENCAT=10;
if ROSCODE1=5 and E273371 in (4,5,6) and E273372 in (-4,2,7,8) and E273373 in
(-4,2,7,8)
and E273374 in (-4,2,7,8) and ((16<E2857<95) or E3112>=16) then ENCAT=11;
end;
** HANDEDITS (3): When respondent reports a school earlier in the loop which is a
degree program but
reports going to that school even at the date current interview. For such cases
this program erroneously codes encat based on the later non-degree program
reported
in the loops. So check the stop dates when a non-degree program is reported
after a
degree-program. Also check that respondent has GED or DIP before assigning them
ENCAT=9 or 10.;
if pubid in (953,7826) then do;
ENCAT=9;
end;
if pubid in (844,1227,1962,1998,3457,5452,642,3867)
then do;
ENCAT=10;
end;
** Respondents receiving the BACHELOR'S DEGREE in and around the month of the
interview are
coded as being enrolled by the program. So the encat is not correct and we
recode the ENCAT;
if DTHS>0 and DOICM=DTHS and ENCAT in (-3,1,2,8) then do;
ENCAT=3;
SAMEMONTH=1;
end;
if DTGED>0 and DOICM=DTGED and ENCAT in (-3,1,8) then do;
ENCAT=2;
SAMEMONTH=1;
end;
if DTAA>0 and DOICM=DTAA and ENCAT in (-3,1,2,8,3,4,9) then do;
ENCAT=5;
SAMEMONTH=1;
end;
if DTBA>0 and DOICM=DTBA and ENCAT in (-3,1,2,8,3,4,5,10) then do;
ENCAT=6;
SAMEMONTH=1;
end;
if DTMA>0 and DOICM=DTMA and ENCAT~=7 then do;
ENCAT=7;
SAMEMONTH=1;
end;
if DTDOC>0 and DOICM=DTDOC and ENCAT~=7 then do;
ENCAT=7;
SAMEMONTH=1;
end;
** Missing values;
do i=1 to 4;
if INV1~=0 and ROSCODE[i] in (-2,-3) then INV1=1;
if ROSCODE[i] not in (-2,-3) then INV1=0;
end;
do i=1 to 4;
if INV2~=0 and ROSCODE[i] in (4,5) and E27337[i] in (-2,-3) then INV2=1;
if ROSCODE[i] in (4,5) and E27337[i]>0 then INV2=0;
end;
if INV1=1 then do;
FLAGCOL=-3;
COLLEGE=-3;
ENCAT=-3;
end;
if INV2=1 then do;
FLAGCOL=-3;
COLLEGE=-3;
ENCAT=-3;
end;
** Respondents who received a HS DIPLOMA (or a GED), report highest grade
attended >12 but do not
identify a college on the school rosters - ENCAT=-3.;
if (DIP=1 or GED=1) and (13<=E2857<95) and ROSCODE1 not in (-4,4,5) and ROSCODE2
not in (-4,4,5)
and ROSCODE3 not in (-4,4,5) and ROSCODE4 not in (-4,4,5) then ENCAT=-3;
** Respondents who received a HS DIPLOMA, but report Highest grade attended <=12
and highest grade
completed<12 - ENCAT=-3.;
if DIP=1 and E2857<=12 and E3112<12 then ENCAT=-3;
** If respondent has neither GED nor HS DIPLOMA but reports going to a college,
in a degree program,
and highest grade attended>=13 - ENCAT=-3;
do i=1 to 4;
if GED=0 and DIP=0 and ROSCODE[i] in (4,5) and (E27337[i]<=6 and E27337[i]~=2)
and 13<=E2857<=20
then ENCAT=-3;
end;
** HANDEDITS (4): Incorporating information from comments.;
if pubid=8513 then do; ENCAT=3; end;
if pubid=4809 then do; ENCAT=8; end;
if pubid=2479 then do; ENCAT=10; end;
if pubid=378 then do; ENCAT=4; end;
if pubid=8320 then do; ENCAT=3; end;
if pubidin (1212,2506) then do; ENCAT=1; end;
if pubid=428 then do; ENROLL=1; ENCAT=8; end;
if pubid=5701 then do; ENCAT=3; end;
if pubid=5701 then do; ENCAT=3; end;
if pubid=8377 then do; ENCAT=1; end;
if pubid=4415 then do; ENCAT=4; end;
if pubidin (1842 3543 4262 5995 6622 6644 8785 9018)
then do;
ENCAT=1;
end;
if pubid=440 then do; ENCAT=4; end;
if pubidin (4419 1862) then do; ENCAT=-3; end;
** Must fix "ENROLL" flag because this flag is used in the grades
skipped/repeated program;
if ENCAT in (1,2,3,4,5,6,7) and ENROLL~=0 then ENROLL=0;
if ENCAT in (8,9,10,11) and ENROLL~=1 then ENROLL=1;
********************************************* SECTION II
***********************************************;
MAXGRADE=-16;
COMPMON=-16;
COMPYR=-16;
EVERLOOP=0; * Flag to indicate respondents who go through a grade loop at least
once;
SUBSITEM=0; * Flag to indicate E3112 (single item) is being used to compute
GRSURV;
SUBSHGAM=0; * Flag to hgaloop (HIGHEST GRADE ATTENDED from loop) minus 1 is
being used to compute
GRSURV;
DATEITEM=0; * Flag to indicate date of grade completion missing and single item
is being used to
compute GRSURV;
SET12=0; * Flag to indicate GRSURV being set to 12;
DISAGREE=0; * Flag to indicate that GRSURV from previous rounds is greater than
from the current round;
SUBSPREV=0; * Flag to indicate grade from last interviewed round is being used
to compute GRSURV;
PREVJU=0; * Flag to indicate grade from last interviewed round is being used to
compute GRJUNE;
DATEFLAG=0; * Flag to indicate date of degree received is invalid;
COMPGR_INV=0; * Flag to indicate that the completed grade from loops is 0 or
invalid;
/***** CREATED VARIABLE - HIGHEST GRADE COMPLETED AS OF THE SURVEY DATE (GRSURV)
-HIGHEST GRADE COMPLETED AS JUNE 30, 2002 (GRJUNE) ****/
*** [IIA] Enrolled or not enrolled;
** Compute maximum grade completed using information in this round (grade
loops);
do i=1 to DIM(GRADE);
if GRADE[i]>=0 and GRADE[i]>MAXGRADE then do; ** Select cases where there is a
valid grade and it
is greater than the previously recorded grade;
if GRCOMP[i]=1 then do;
MAXGRADE=GRADE[i];
COMPMON=MCOMP[i];
COMPYR=YRCOMP[i];
if (0<YRCOMP[i]<2002) or (YRCOMP[i]=2002 and 0<MCOMP[i]<=6) then do;
GRJUNE_O=GRADE[i];
CJUMON=MCOMP[i];
CJUYR=YRCOMP[i];
GRJUNE=GRADE[i];
end;
end;
else if GRCOMP[i] in (-1,-2,-3) then MAXGRADE=GRCOMP[i];
end;
if GRADE[i] in (0,-1, -2, -3,-4) and GRCOMP[i]>-4 then MAXGRADE=-55;
if GRADE[i] in (0,-1, -2, -3,-4) and GRCOMP[i]=1 then COMPGR_INV=1;
if GRCOMP[i]>-4 then EVERLOOP=1;
end;
** Create variable indicating maximum grade completed from previous rounds;
GRSPREV=GRSURVR5;
if GRSURVR5<0 then do;
GRSPREV=GRSURVR4;
if GRSURVR4<0 then do;
GRSPREV=GRSURVR3;
if GRSURVR3<0 then do;
GRSPREV=GRSURVR2;
if GRSURVR2<0 then do;
GRSPREV=GRSURVR1;
end;
end;
end;
end;
if E3061>=0 then GRSPREV=E3061;
** Make GRSURV equal to maximum completed grade reported in the loops;
GRSURV=MAXGRADE;
** If invalid or incorrect grade data was read into loop or if respondent never
goes through the
loops (usually because they now attend 2 or 4 year colleges, sometimes because
of infosheet err or)
and they attended school at some time either at DLI or SDLI, then replace GRSURV
with single item;
** However, this single item must be checked against the roster data: if
respondent 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.;
if (((E841611<=0) and E913111~=-4) or GRSURV=-55 or EVERLOOP=0) and E3878~=0 and
E3112~=-4 then do;
SUBSITEM=1;
do i=1 to 4;
if E3112>12 and ROSCODE[i] in (4,5) and E27337[i] in (2,7,8,9) then do;
GRSURV=12;
GRJUNE=-3;
end;
if E3112>12 and ENCAT in (4,5,6,7,9,10,11) then do;
GRSURV=E3112;
GRJUNE=-4;
end;
if E3112>=12 and ROSCODE[i] in (4,5) and E27337[i] in (1,3,4,5,6) then do;
GRSURV=E3112;
GRJUNE=-4;
end;
if E3112<12 and DIP=0 and GED=0 then do;
GRSURV=E3112;
GRJUNE=-3;
end;
if E3112>=12 and DIP=0 and GED=0 and ROSCODE[i] not in (4,5) then do;
GRSURV=-16;
GRJUNE=-3;
end;
end;
end;
** If respondent was enrolled SDLI 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 highest grade attended from loop (HGALOOP) is equal to the single item
highest grade
attended (E2857) then must have completed HGALOOP-1 and so substitute HGALOOP-1.
else if HGALOOP-1 >= E3112 or GRSPREV=E3112 then E3112 makes sense and so
substitute single item
(E3112). Else if HGALOOP-1 < E3112 and GRSPREV < E3112 then E3112 becomes
suspect and so
substitution GRSPREV;
if GRSURV=-16 and E3878~=0 then do;
if (HGALOOP=E2857) and (E2857>=0) then do;
SUBSHGAM=1;
GRSURV=HGALOOP-1;
GRJUNE=-3;
end;
else if (HGALOOP>=0) and (E3112>=0) and ((HGALOOP-1)=E3112) then do;
SUBSITEM=1;
SUBSHGAM=1;
GRSURV=E3112;
GRJUNE=-3;
end;
else if (GRSPREV=E3112) and (E3112>=0) then do;
SUBSITEM=1;
GRSURV=E3112;
GRJUNE=-3;
end;
else if (HGALOOP>=0) and (E3112>=0) and ((HGALOOP-1)>E3112) then do;
SUBSITEM=1;
GRSURV=E3112;
GRJUNE=-3;
end;
else if (HGALOOP>=0) and (E3112>=0) and ((HGALOOP-1)<E3112) and (GRSPREV<E3112)
then do;
SUBSPREV=1;
GRSURV=GRSPREV;
GRJUNE=GRSPREV;
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.;
if MAXGRADE=GRSURV and COMPYR=-2 then do;
if MAXGRADE>E3112 and E3112>=0 then do;
DATEITEM=1;
SUBSITEM=1;
GRSURV=E3112;
GRJUNE=-3;
end;
GRJUNE=MAXGRADE;
end;
if MAXGRADE=GRSURV and COMPYR~=-2 and COMPMON=-2 then do;
if COMPYR<2002 then GRJUNE=GRSURV;
if COMPYR>=2002 then GRJUNE=-3;
end;
else if (COMPYR~=-2 and COMPMON~=-2) then DATEITEM=.;
** If someone reported receiving a GED or H.S. DIPLOMA, but their GRSURV<12 then
set their GRSURV=12.;
SET12=0;
if (DIP=1 or GED=1) and GRSURV<12 then do;
SET12=1;
GRSURV=12;
if 0<DTGED<=270 then GRJUNE=12;
if 0<DTHS<=270 then GRJUNE=12;
if DTGED>270 and MAXGRADE>0 then GRJUNE=MAXGRADE;
if DTGED>270 and MAXGRADE<=0 then GRJUNE=GRSPREV;
if DTHS>270 and MAXGRADE>0 then GRJUNE=MAXGRADE;
if DTHS>270 and MAXGRADE<=0 then GRJUNE=GRSPREV;
if DTGED=-3 or DTHS=-3 then GRJUNE=-3;
end;
** If college attendance is not reported in the loops then use should be made of
the single item
highest grade completed (E3112), 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
respondent was ever in college. Given that respondent attends college then
(a) If E3112>=12 then set GRSURV=E3112
(b) If E3112<12 and respondent reports completing a grade>12 in a previous round
and also
attending college in that round then set the previous round GRSURV.
(c) Otherwise if E3112<12 and respondent reports completing a HS DIPLOMA or GED
then GRSURV is
set equal to 12.
(d) Otherwise if E3112<12 and none of the above conditions hold then it is
unclear what GRSURV is
so GRSURV=-3;
if ENCAT in (4,5,6,7,9,10,11) then do;
GRJUNE=-4;
if E3112<12 then GRSURV=-3;
if E3112<12 and (DIP=1 or GED=1) then do;
GRSURV=12;
SET12=1;
end;
if E3112<12 and GRSPREV>12 and ENCATPREV in (4,5,6,7,9,10,11) then do;
GRSURV=GRSPREV;
SUBSPREV=1;
end;
if 12<=E3112<95 then do;
GRSURV=E3112;
SUBSITEM=1;
end;
end;
** If respondent reports completing a grade in a previous round that is greater
than 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, then GRSURV value from the previous round
is used.;
** Note: don't use single item if it is>12 and no college is reported;
if 0<GRSPREV<95 and 0<GRSURV<GRSPREV then DISAGREE=1;
if DISAGREE=1 then do;
MX=6-DLIRND+1;
SITM_GRPR=E3112-GRSPREV;
if ((12<E3112<95) or (12<GRSPREV<95)) and ENCAT in (4,5,6,7,9,10,11) then do;
if 0<=SITM_GRPR<=MX then do;
GRSURV=E3112;
GRJUNE=-4;
SUBSITEM=1;
end;
if GRSPREV>E3112 and E3112>=0 then do;
GRSURV=GRSPREV;
GRJUNE=-4;
SUBSPREV=1;
end;
end;
if E3112<=12 then do;
if 0<=SITM_GRPR<=MX or GRSPREV=95 then do;
GRSURV=E3112;
GRJUNE=-3;
if GRSPREV=E3112 then GRJUNE=GRSPREV;
SUBSITEM=1;
end;
if GRSPREV>E3112 then do;
GRSURV=GRSPREV;
GRJUNE=GRSPREV;
SUBSPREV=1;
end;
end;
if ((12<E3112<95) or (12<GRSPREV<95)) and ENCAT in (1,2,3,8,-3) then do;
GRSURV=-3;
GRJUNE=-3;
end;
end;
*** [IIB] If not enrolled SDLI;
** Assign previous GRSURV. If previous GRSURV is missing, then assign single
item (E3112).;
**** Note for user's guide: every respondent who reports not being enrolled SDLI
is given the highest
grade completed at DLI except for those who report receiving a GED or HS DIPLOMA
during the
interim. The latter are assigned a highest grade completed of 12. Some of these
respondents who
were not enrolled SDLI report a completed grade higher than highest grade
completed from last
interview. We do not use this new information for the computation of their
highest grade
completed this information is not consistent.;
if (E3878=0 and pubid not in (2479,4809)) and GRSPREV>=0 and SET12=0 then
do;
GRSURV=GRSPREV;
SUBSPREV=1;
GRJUNE=GRSPREV;
end;
if (E3878=0 and pubid not in (2479,4809)) and GRSPREV<=0 and SET12=0 then
do;
GRSURV=E3112;
SUBSITEM=1;
GRJUNE=-3;
end;
** If respondent doesn't report any college but reports a completed grade higher
than 12, we code
GRSURV=12 as long as respondent has at least a GED or a HS DIPLOMA. If
respondent does not have
either we code GRSURV=-3. A person reporting going to a 2/4-yr college for a
vocational training
but reporting a highest grade completed of more than 12 would also fall in this
category.;
if 12<GRSURV<95 and ENCAT not in (-3,4,5,6,7,9,10,11) then do;
if GED=1 or DIP=1 then do;
GRSURV=12;
SET12=1;
if 0<DTGED<=270 then GRJUNE=12;
if 0<DTHS<=270 then GRJUNE=12;
if DTGED>270 and MAXGRADE>0 then GRJUNE=MAXGRADE;
if DTGED>270 and MAXGRADE<=0 then GRJUNE=GRSPREV;
if DTHS>270 and MAXGRADE>0 then GRJUNE=MAXGRADE;
if DTHS>270 and MAXGRADE<=0 then GRJUNE=GRSPREV;
if DTGED=-3 or DTHS=-3 then GRJUNE=-3;
end;
if GED=0 and DIP=0 then do;
GRSURV=-3;
GRJUNE=-3;
end;
end;
if GRSURV in (-55,-2,-16,0) then GRSURV=-3;
if GRSURV=-3 then GRJUNE=-3;
if GRJUNE=. then do;
if (E3878=0 and pubid not in (2479,4809)) then GRJUNE=GRSURV;
if MAXGRADE=GRSURV and ((COMPYR=2002 and COMPMON>6) or COMPYR>2002) then
GRJUNE=GRSPREV;
if (COMPYR=-2 or COMPMON=-2) then GRJUNE=-3;
end;
if GRSPREV=GRSURV then GRJUNE=GRSPREV;
if GRJUNE=. then GRJUNE=-3;
if ENCAT in (4,5,6,7,9,10,11) then GRJUNE=-4;
** Cases where respondent reported a higher grade in E3112 than was reported in
the last round that
they were interviewed and who indicate their E2857 is at least two grade higher
than the GRSPREV
value, but who indicated that they were not enrolled should be coded as a -3 on
both GRSURV and
GRJUNE since the respondent is providing conflicting information.;
if (E3878=0 and pubid not in (2479,4809)) and (GRSURV=GRSPREV) and
GRSURV<E3112<=12 and
E2857>0 and E2857-2>=GRSURV then do;
GRSURV=-3;
GRJUNE=-3;
ENCAT=-3;
end;
** HANDEDITS (5): Incorporating information from comments, earlier rounds &
round7;
if pubid=6872 then do; GRSURV=GRSPREV; end;
if pubid=3544 then do; GRSURV=12; end;
if pubid=7736 then do; GRSURV=10; end;
if pubid=1219 then do; GRSURV=11; end;
if pubid=8375 then do;
GRSURV=10;
GRJUNE=10;
GRJUNE_O=10;
end;
/****** CREATED VARIABLE - HIGHEST GRADE COMPLETED AS OF JUNE 30, 2002 -- OLD METHOD (GRJUNE_O) *****/
/** 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. **/
if
GRJUNE_O=. then do;
if SET12=1 then GRJUNE_O=-3;
if (SUBSITEM=1 or SUBSHGAM=1) and (GRSURV<=12 or GRSURV=95) then ZRJUNE_O=-3;
if (SUBSITEM=1 or SUBSHGAM=1) and (12<GRSURV<95) then GRJUNE_O=-4;
if (E3878=0 and pubid not in (2479,4809)) or SUBSPREV=1 then GRJUNE_O=GRSURV;
if SET12=1 and GED=1 then do;
if (0<DTGED<=270) then GRJUNE_O=GRSURV;
if DTGED>270 then do;
if MAXGRADE>0 then GRJUNE_O=GRSURV;
if MAXGRADE<=0 and SUBSPREV=1 then GRJUNE_O=GRSPREV;
if MAXGRADE<=0 and SUBSITEM=1 then GRJUNE_O=E3112;
end;
end;
if SET12=1 and DIP=1 then do;
if (0<DTHS<=270) then GRJUNE_O=GRSURV;
if DTHS>270 then do;
if MAXGRADE>0 then GRJUNE_O=GRSURV;
if MAXGRADE<=0 then GRJUNE_O=GRSPREV;
if MAXGRADE<=0 and SUBSITEM=1 then GRJUNE_O=E3112;
end;
end;
if (0<DTGED<=270) and GRSURV=12 then GRJUNE_O=12;
if (0<DTGED<=270) and GRSURV>12 then GRJUNE_O=-4;
if (0<DTHS<=270) and GRSURV=12 then GRJUNE_O=12;
if (0<DTHS<=270) and GRSURV>12 then GRJUNE_O=-4;
if (E3878=0 and pubid not in (2479,4809)) and E3010=0 and MAXGRADE<0 and
GRSURV=E3061 then
GRJUNE_O=E3061;
if GRSURV=GRSPREV then do;
GRJUNE_O=GRSURV;
if ENROLL=1 then FUNNY=1; * Respondents who either did not report completing a
grade, or did
not report the date of completion or reported a highest grade
completed lower than that or previous rounds;
end;
** If current GRSURV is same as last round and respondent reports no correction
to that and
GRJUNE_O computed for this round
is less than that grade, then we take that grade as GRJUNE_o.;
if DLIRND=5 and 0<GRSURV=GRSURVR5=E3061 and GRJUNE_O<GRSURV then GRJUNE_O=GRSURV;
if DLIRND=4 and 0<GRSURV=GRSURVR4=E3061 and GRJUNE_O<GRSURV then GRJUNE_O=GRSURV;
if DLIRND=3 and 0<GRSURV=GRSURVR3=E3061 and GRJUNE_O<GRSURV then GRJUNE_O=GRSURV;
if DLIRND=2 and 0<GRSURV=GRSURVR2=E3061 and GRJUNE_O<GRSURV then GRJUNE_O=GRSURV;
if DLIRND=1 and 0<GRSURV=GRSURVR1=E3061 and GRJUNE_O<GRSURV then GRJUNE_O=GRSURV;
** If no grade completed before june of 2002 is reported in this round, then we
use the GRSURV
reported in the last round. if some grade completed before june of 2002 is
reported in this
round, even if it is less than the completed grade reported after june 2002, it
will be
computed as GRJUNE_O;
if COMPYR>0 and MAXGRADE=GRSURV then do;
if (COMPYR=2002 and COMPMON>6) or COMPYR>2002 then do;
GRJUNE_O=GRSPREV;
PREVJU=1;
end;
end;
end;
if COMPYR=-2 then GRJUNE_O=-3;
if GRJUNE_O=. or GRJUNE_O=0 then GRJUNE_O=-3;
** If respondent 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_O=-4;
if GRSURV=-3 and GRJUNE_O~=-3 then GRJUNE_O=-3;
/****** CREATED VARIABLE - HIGHEST DEGREE RECEIVED AS OF THE SURVEY DATE (DEGSURV)****/
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;
/* Junior college or two-year associate degree */
if DTAA>-4 then DEGSURV=3;
/* Bachelor's degree */
if DTBA>-4 then DEGSURV=4;
/* Master's degree */
if DTMA>-4 then DEGSURV=5;
/* Doctoral degree */
if DTDOC>-4 then DEGSURV=6;
/* Professional degree */
if DTPROF>-4 then DEGSURV=7;
** If cannot determine what degree
received;
do i=1 to 5;
if E23450[i] in (-1, -2, -3) then DEGSURV=-3;
end;
** To constrain DEGSURV by the DEGSURV from the last interviewed round;
PREVDEGSURV=DEGSURVR5;
if DEGSURVR5=-5 then do;
PREVDEGSURV=DEGSURVR4;
if DEGSURVR4=-5 then do;
PREVDEGSURV=DEGSURVR3;
if DEGSURVR3=-5 then do;
PREVDEGSURV=DEGSURVR2;
if DEGSURVR2=-5 then do;
PREVDEGSURV=DEGSURVR1;
end;
end;
end;
end;
** HANDEDITS (6): Correction for some errors made in earlier rounds;
if pubid=6886 then do;
PREVDEGSURV=1;
end;
if pubid=8751 then do;
PREVDEGSURV=2;
end;
if 0<=DEGSURV<PREVDEGSURV then DEGSURV=PREVDEGSURV;
** HANDEDITS (7): The DEGSURV in the previous round is wrong and so cannot use
that information to
overwrite the DEGSURV computed in this round.;
if pubid in (6507 7004) then do;
DEGSURV=1;
end;
/******* CREATED VARIABLE - HIGHEST DEGREE COMPLETED AS OF JUNE 30, 2002 (DEGJUNE) ******/
degjune=0;
/* ged */
if dtged gt 0 and dtged le 270 then degjune=1;
else if dtged in (-3, -2, -1) then degjune=-3;
/* High school diploma */
if dths gt 0 and dths le 270 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 270 then degjune=3;
else if dtaa in (-3, -2, -1) then degjune=-3;
/* Bachelor's degree */
if dtba gt 0 and dtba le 270 then degjune=4;
else if dtba in (-3, -2, -1) then degjune=-3;
/* Master's degree */
if dtma gt 0 and dtma le 270 then degjune=5;
else if dtma in (-3, -2, -1) then degjune=-3;
/* Doctoral degree */
if dtdoc gt 0 and dtdoc le 270 then degjune=6;
else if dtdoc in (-3, -2, -1) then degjune=-3;
/* Professional degree */
if dtprof gt 0 and dtprof le 270 then degjune=7;
else if dtprof in (-3, -2, -1) then degjune=-3;
** Constrain DEGJUNE by PREVDEGSRUV if
the latter is equal to DEGSRUV in this round;
if DEGJUNE~=DEGSURV and DEGSURV=PREVDEGSURV and DEGSURV>=0 and DEGJUNE>=0 then
DEGJUNE=PREVDEGSURV;
if DEGSURV=-3 then DEGJUNE=-3;
if (DEGSURV=1 and -4<DTGED<=0) or (DEGSURV=2 and -4<DTHS<=0) or (DEGSURV=3 and
-4<DTAA<=0)
or (DEGSURV=4 and -4<DTBA<=0) or (DEGSURV=5 and -4<DTMA<=0) or (DEGSURV=6 and
-4<DTDOC<=0)
or (DEGSURV=7 and -4<DTPROF<=0) then DATEFLAG=1;
if DATEFLAG=1 then DEGJUNE=-3;
** Convert all invalid skips to -3;
if ENCAT in (-1,-2) then ENCAT=-3;
if GRSURV in (-1,-2) then GRSURV=-3;
if GRJUNE in (-1,-2) then GRJUNE=-3;
if DEGSURV in (-1,-2) then DEGSURV=-3;
if DEGJUNE in (-1,-2) then DEGJUNE=-3;
if GRJUNE_O in (-1,-2) then GRJUNE_O=-3;
** Take care of non-interviews;
if E3112=-5 then do;
ENROLL=-5;
ENCAT=-5;
GRSURV=-5;
GRJUNE=-5;
GRJUNE_O=-5;
DEGSURV=-5;
DEGJUNE=-5;
GED=-5;
DIP=-5;
end;
endsas;
Variables Created: CV_SCHOOL_TYPE
Variables Used
|
Name in Program |
Question Name on CD |
| TYPER1 | CV_SCHOOL_TYPE_1997 |
| TYPER2 | CV_SCHOOL_TYPE_1998 |
| TYPER3 | CV_SCHOOL_TYPE_1999 |
| TYPER4 | CV_SCHOOL_TYPE_2000 |
| TYPER5 | CV_SCHOOL_TYPE_2001 |
| SPERIOD1 | NEWSCHOOL_PERIODS_01_2001 |
| SPERIOD2 | NEWSCHOOL_PERIODS_02_2001 |
| SPERIOD3 | NEWSCHOOL_PERIODS_03_2001 |
| SPERIOD4 | NEWSCHOOL_PERIODS_04_2001 |
| SSTOP1M1 | NEWSCHOOL_STOP1_01_M_2002 |
| SSTOP1Y1 | NEWSCHOOL_STOP1_01_Y_2002 |
| SSTOP1M2 | NEWSCHOOL_STOP1_02_M_2002 |
| SSTOP1Y2 | NEWSCHOOL_STOP1_02_Y_2002 |
| SSTOP1M3 | NEWSCHOOL_STOP1_03_M_2002 |
| SSTOP1Y3 | NEWSCHOOL_STOP1_03_Y_2002 |
| SSTOP1M4 | NEWSCHOOL_STOP1_04_M_2002 |
| SSTOP1Y4 | NEWSCHOOL_STOP1_04_Y_2002 |
| SSTOP2M1 | NEWSCHOOL_STOP2_01_M_2002 |
| SSTOP2Y1 | NEWSCHOOL_STOP2_01_Y_2002 |
| SSTOP2M2 | NEWSCHOOL_STOP2_02_M_2002 |
| SSTOP2Y2 | NEWSCHOOL_STOP2_02_Y_2002 |
| SSTOP2M3 | NEWSCHOOL_STOP2_03_M_2002 |
| SSTOP2Y3 | NEWSCHOOL_STOP2_03_Y_2002 |
| SSTOP3M1 | NEWSCHOOL_STOP3_01_M_2002 |
| SSTOP3Y1 | NEWSCHOOL_STOP3_01_Y_2002 |
| SCODE1 | NEWSCHOOL_SCHCODE_01_2002 |
| SCODE2 | NEWSCHOOL_SCHCODE_02_2002 |
| SCODE3 | NEWSCHOOL_SCHCODE_03_2002 |
| SCODE4 | NEWSCHOOL_SCHCODE_04_2002 |
| STYPE1 | NEWSCHOOL_TYPE_01_2002 |
| STYPE2 | NEWSCHOOL_TYPE_02_2002 |
| STYPE3 | NEWSCHOOL_TYPE_03_2002 |
| STYPE4 | NEWSCHOOL_TYPE_04_2002 |
| pubid | PUBID |
Codes for Created Variable
1 = Public school
2 = Private, not parochial
3 = Parochial
4 = Other
This program is used to create the school type variables from Round 6, i.e. the
current or most recent schools
that the youth attended are public, private, parochial or other. This is
completed in the following steps:
1) We first decide which school is the most recent school (non-college) that the
youth participated by the ending
date for different enrollment periods.
2) We can get the school type from the new school roster.
However, in the program, these two steps can not be
separated.
/* Create the array variables.*/
* # of enrollment periods;
array speriod speriod1-speriod4;
* ending date for each period;
array sstop1m sstop1m1-sstop1m4;
array sstop1y sstop1y1-sstop1y4;
array sstop2m sstop2m1-sstop2m3;
array sstop2y sstop2y1-sstop2y3;
array sstop3m sstop3m1-sstop3m3;
array sstop3y sstop3y1-sstop3y3;
* school code, i.e. elementary school, high school or college;
array scode scode1-scode4;
*school type for round 6;
array stype stype1-stype4;
* ending time for each school;
array srecm srecm1-srecm4;
array srecy srecy1-srecy4;
* school length counting both month&year: the month length from jan. 1990 to the ending month for each school;
array mlength mlength1-mlength4;
* 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-ylength4;
/************************* step 1).In the process to decide the most recent school. ************************/
do i=1 to 4;
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 speriod[i]=3 and scode[i] in (1,2,3) then do;
srecm[i]=sstop3m[i];
srecy[i]=sstop3y[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);
if stype1=-5 then maxmleng=-5;
maxyleng=max(ylength1,ylength2, ylength3, ylength4);
if stype1=-5 then maxyleng=-5;
/************** step 2). Decide the latest non-college school and its type*************/
type1=-4;
***** create the flag variables;
* flag the cases where multiple schools' ending year/month are same as "maxmleng";
maxmeq=0;
do i=1 to 4;
if maxmleng>0 and mlength[i]=maxmleng then maxmeq=maxmeq+1;
end;
* flag the cases where multiple schools' ending year are the same as "maxyleng" and ending months are invalid answer;
invalidm=0; maxyeq=0;
do i=1 to 4;
if maxyleng>0 and ylength[i]=maxyleng and srecm[i] in (-1,-2,-3) then invalidm=invalidm+1;
if maxyleng>0 and ylength[i]=maxyleng then maxyeq=maxyeq+1;
end;
***** first step to create school type;
* use only the year information first;
do i=1 to 4;
if maxyleng>0 and ylength[i]=maxyleng then type1=stype[i];
end;
* then use the month information to make it more precise;
do i=1 to 4;
if maxmleng>0 and mlength[i]=maxmleng then type1=stype[i];
end;
***** Fix the special cases where multiple schools' ending years are same as maxyleng;
/* 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 ending on 97.12 as most recent school.*/
if maxyeq=1 then do;
do i=1 to 4;
if ylength[i]=maxyleng then type1=stype[i];
end;
end;
if invalidm ge 2 then type1=-3;
* flag the cases which has 98.02 and 98.-3;
flag=0;
if maxyeq ge 2 and invalidm ge 1 then flag=1;
if flag=1 then type1=-3; /* There were no such cases in round 4, but there are a couple of cases in round 5*/
* fix the case such as 99.12, 99.-2 99.-3 or 2000.12 2000.-2;
if maxyeq ge 2 then do;
do i=1 to 4;
if ylength[i]=maxyleng and srecm[i]=12 then type1=stype[i];
end;
end;
***** Fix the special cases where multiple schools ending year/months are same as maxmleng;
/*This loop assigns value of PUBLIC schools (1) to TYPE1 in cases where one reported school type=public
and one reported school type="other". In cases where one reported school type=PRIVATE and one reported
type="other", value for PRIVATE school type is assigned. Cases where one school type=PUBLIC and another
school type=PRIVATE are flagged and looked into. */
*dummy for one school is public school and the other is religious school;
pubrelg=0;
*dummy for one school is public school and the other is private school;
pubpriv=0;
*dummy for one school is private and the other is religious school;
privrelg=0;
if maxmeq ge 2 then do;
do i=1 to 4;
if mlength(i)=maxmleng and stype(i)^=type1 then do;
if stype(i) in (6,9,10,11,-1,-2,-3) and type1 in (1,2,12,13) then type1=type1;
if stype(i) in (1,2,12,13) and type1 in (6,9,10,11,-1,-2,-3) then type1=stype[i];
if stype(i) in (6,9,10,11,-1,-2,-3) and type1 in (3,4) then type1=type1;
if stype(i) in (3,4) and type1 in (6,9,10,11,-1,-2,-3) then type1=stype[i];
if stype(i) in (6,9,10,11,-1,-2,-3) and type1=5 then type1=5;
if stype(i)=5 and type1 in (6,9,10,11,-1,-2,-3) then type1=5;
if (stype(i) in (1,2,12,13) and type1 in (3,4)) or
(stype(i) in (3,4) and type1 in (1,2,12,13)) then pubrelg=1;
if (stype(i) in (1,2,12,13) and type1=5) or
(stype(i)=5 and type1 in (1,2,12,13)) then pubpriv=1;
if (stype(i)=5 and type1 in (3,4)) or
(stype(i) in (3,4) and type1=5) then privrelg=1;
end;
end;
end;
***** Invalid answers;
* 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)
then type1=-3;
if (scode1 in (1,2,3) and srecy1 in (-1,-2,-3))
or (scode2 in (1,2,3) and srecy2 in (-1,-2,-3))
or (scode3 in (1,2,3) and srecy3 in (-1,-2,-3))
or (scode4 in (1,2,3) and srecy4 in (-1,-2,-3))
then type1=-3;
* if the respondent only goes to one school in r6,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)
then type1=stype1;
/************* recode the type variable.************/
sltype=-4;
if type1 in (1,2,12,13) then sltype=1;
if type1=5 then sltype=2;
if type1 in (3,4) then sltype=3;
if type1 in (6,9,10,11) then sltype=4;
if -4<type1<0 then sltype=-3;
if stype1=-5 then sltype=-5;
***** Hand edit;
* Hand edit for 1 case who report two schools with the same ending date but different school type;
if pubid=4433 then sltype1=1;
if pubid=4093 then sltype1=-3;
* Hand edit other cases who got "-3" because of stopping date but have same school type for all valid schools
or the most recent school is detectable from the other information such as interview date;
flag1=0;
flag2=0;
if sltype=-3 and stype1=stype2 and stype1>0 then flag1=1;
if flag1=1 then sltype=1; /*R6 case 5820,7410,8734 only */
endsas;
Variables Created:
CV_GED (DTGED)
CV_HS_DIPLOMA (DTHS)
CV_AA_DEGREE (DTAA)
CV_BA_DEGREE (DTBA)
CV_MA_DEGREE (DTMA)
Variables Used
|
Name in Program |
Question Name on CD |
| GEDR1 | CV_GED |
| HSR1 | CV_HS_DIPLOMA |
| GEDR2 | CV_GED |
| HSR2 | CV_HS_DIPLOMA |
| GEDR3 | CV_GED |
| HSR3 | CV_HS_DIPLOMA |
| AAR3 | CV_AA_DEGREE |
| BAR3 | CV_BA_DEGREE |
| GEDR4 | CV_GED |
| HSR4 | CV_HS_DIPLOMA |
| AAR4 | CV_AA_DEGREE |
| BAR4 | CV_BA_DEGREE |
| GEDR5 | CV_GED |
| HSR5 | CV_HS_DIPLOMA |
| AAR5 | CV_AA_DEGREE |
| BAR5 | CV_BA_DEGREE |
| S11700 | YSCH-11700 |
| S11900M | YSCH-11900~M |
| S11900Y | YSCH-11900~Y |
| S13300 | YSCH-13300 |
| S13500M | YSCH-13500~M |
| S13500Y | YSCH-13500~Y |
| S24685 | YSCH-24685 |
| S234501 | YSCH-23450.01 |
| S234502 | YSCH-23450.02 |
| S234503 | YSCH-23450.03 |
| S234505 | YSCH-23450.05 |
| S234601M | YSCH-23460.01~M |
| S234601Y | YSCH-23460.01~Y |
| S234602M | YSCH-23460.02~M |
| S234602Y | YSCH-23460.02~Y |
| T70001 | YTRN-7000.01 |
| T70002 | YTRN-7000.02 |
| T70003 | YTRN-7000.03 |
| T70004 | YTRN-7000.04 |
| T70005 | YTRN-7000.05 |
| PUBID | PUBID |
| YINT_D | SYMBOL ! CURDATE~D |
| YINT_M | SYMBOL ! CURDATE~M |
| YINT_Y | SYMBOL ! CURDATE~Y |
This program creates the variables that indicate the dates on which the youth received GED, High School Diploma, Associate Degree, Bachelor's Degree, Master's Degree, Doctoral Degree and Professional Degree from NLSY97 round 6 (2002). The dates will be calculated as the number of accumulated months from 1980.
Note: The program will check if there is some conflict in these answers between round 6 and earlier rounds. In case of conflicting information about the dates of degree receipt the information from the earlier round, if valid, will be used. If either the date from the earlier round or this is invalid then only the valid date is used.
Note: If R attends college without a High School diploma or GED then R is asked
for an
explanation in question, YSCH-13900. If R reports receiving a HS diploma or GED
and gives
a valid date then that is assigned. If however, R gives no date of receipt then
a -3 is
assigned.
The variables created are the following:
DTHS Date that the respondent received High School Diploma.
DTGED Date that the respondent received GED.
DTAA Date that the respondent received Associate Degree.
DTBA Date that the respondent received Bachelor's Degree.
DTMA Date that the respondent received Master's Degree.
DTDOC Date that the respondent received Doctoral Degree.
DTPROF Date that the respondent received Professional Degree.
/** Stating all the array to be used in this program. **/
array VARS1 [3] MAR1 DOCR1 PROFR1;
array VARS2 [3] MAR2 DOCR2 PROFR2;
array VARS3 [3] MAR3 DOCR3 PROFR3;
array VARS4 [3] MAR4 DOCR4 PROFR4;
array VARS5 [3] MAR5 DOCR5 PROFR5;
array CR1 [7] HSR1 GEDR1 AAR1 BAR1 MAR1 DOCR1 PROFR1;
array CR2 [7] HSR2 GEDR2 AAR2 BAR2 MAR2 DOCR2 PROFR2;
array CR3 [7] HSR3 GEDR3 AAR3 BAR3 MAR3 DOCR3 PROFR3;
array CR4 [7] HSR4 GEDR4 AAR4 BAR4 MAR4 DOCR4 PROFR4;
array CR5 [7] HSR5 GEDR5 AAR5 BAR5 MAR5 DOCR5 PROFR5;
array CR6 [7] HSR6 GEDR6 AAR6 BAR6 MAR6 DOCR6 PROFR6;
array CRP [7] HSRP GEDRP AARP BARP MARP DOCRP PROFRP;
array S23450 [4] S234501-S234503 S234505;
array S23460M [4] S234601M S234602M S234603M S234605M;
array S23460Y [4] S234601Y S234602Y S234603Y S234605Y;
array T7000 [4] T70001 T70002 T70003 T70004;
array DT [7] DTHS DTGED DTAA DTBA DTMA DTDOC DTPROF;
array FLAG [7] FLAGHS FLAGGED FLAGAA FLAGBA FLAGMA FLAGDOC FLAGPROF;
array HANDEDIT [7] HEHS HEGED HEAA HEBA HEMA HEDOC HEPROF;
*** FLAG & DUMMY variables created and used in this program;
** GED_TRN: This is 1 if GED information is collected from the training section;
** FLAGHS FLAGGED FLAGAA FLAGBA FLAGMA FLAGDOC FLAGPROF: This is 1 if there is
some conflict between
date of degree information obtained from this and earlier rounds.;
** HEHS HEGED HEAA HEBA HEMA HEDOC HEPROF: These are 1 if date from earlier
rounds is valid
while that from this round is invalid, 2 if it is the other way round. If both
dates are valid
then these are 3.
GED_TRN=0;
/** Merging information from previous rounds. **/
** HANDEDIT (1): Cases
where comments of YSCH-13900 were not incorporated in earlier rounds (1 thru 4);
IF pubid IN (939 962 6680 6759) THEN DO;
IF -5<GEDR2<0 THEN GEDR2=-3;
IF -5<GEDR3<0 THEN GEDR3=-3;
IF -5<GEDR4<0 THEN GEDR4=-3;
IF -5<GEDR5<0 THEN GEDR5=-3;
END;
IF pubid =3492 THEN DO;
IF -5<GEDR3<0 THEN GEDR3=-3;
IF -5<GEDR4<0 THEN GEDR4=-3;
IF -5<GEDR5<0 THEN GEDR5=-3;
END;
IF pubid IN (2370 5967 7652) THEN DO;
IF -5<GEDR4<0 THEN GEDR4=-3;
IF -5<GEDR5<0 THEN GEDR5=-3;
END;
** HANDEDIT (2): Valid/good ged dates were handedited by mistake. These need to
be handedited back to
the earlier valid dates.;
IF pubid =190 THEN DO; GEDR5=242; END;
IF pubid =216 THEN DO; GEDR5=246; END;
IF pubid =1309 THEN DO; GEDR5=247; END;
IF pubid =2136 THEN DO; GEDR5=247; END;
IF pubid =2138 THEN DO; GEDR5=249; END;
IF pubid =2422 THEN DO; GEDR5=245; END;
IF pubid =4148 THEN DO; GEDR5=243; END;
IF pubid =4220 THEN DO; GEDR5=251; END;
IF pubid =4444 THEN DO; GEDR5=250; END;
IF pubid =5649 THEN DO; GEDR5=246; END;
IF pubid =7064 THEN DO; GEDR5=242; END;
IF pubid =8316 THEN DO; GEDR5=246; END;
IF pubid =8754 THEN DO; GEDR5=227; END;
** HANDEDIT (3): A hs diploma has been reported erroneously, so we delete that
information. The GED
information is correct and so we keep that.;
IF pubid IN (6507 7004) THEN DO;
HSR1=-4; HSR2=-4; HSR3=-4; HSR4=-4; HSR5=-4;
END;
** Setting all variables that are missing as -4 and if R was not interviewed in
that round as -5.;
AAR1=-4; BAR1=-4; AAR2=-4; BAR2=-4;
IF GEDR1=-5 THEN DO;
AAR1=-5; BAR1=-5;
END;
IF GEDR2=-5 THEN DO;
AAR2=-5; BAR2=-5;
END;
DO I=1 TO 3;
VARS1[I]=-4; VARS2[I]=-4; VARS3[I]=-4; VARS4[I]=-4; VARS5[I]=-4;
IF GEDR1=-5 THEN VARS1[I]=-5;
IF GEDR2=-5 THEN VARS2[I]=-5;
IF GEDR3=-5 THEN VARS3[I]=-5;
IF GEDR4=-5 THEN VARS4[I]=-5;
IF GEDR5=-5 THEN VARS5[I]=-5;
END;
** Creating the latest available date of degree received variables using
information from previous
rounds.;
DO I=1 TO 7;
IF CR5[I]~=-5 THEN CRP[I]=CR5[I];
IF CR5[I]=-5 THEN DO;
IF CR4[I]~=-5 THEN CRP[I]=CR4[I];
IF CR4[I]=-5 THEN DO;
IF CR3[I]~=-5 THEN CRP[I]=CR3[I];
IF CR3[I]=-5 THEN DO;
IF CR2[I]~=-5 THEN CRP[I]=CR2[I];
IF CR2[I]=-5 THEN DO;
CRP[I]=CR1[I];
END;
END;
END;
END;
END;
** Creating the date of degree received variables using round 6 information
only.;
DO I=1 TO 7;
CR6[I]=-4;
END;
S234604M=0; S234605M=0; S234606M=0;
S234604Y=0; S234605Y=0; S234606Y=0;
IF S11700=1 AND S11900M>0 AND S11900Y>0 THEN HSR6=(S11900Y-1980)*12+S11900M;
IF -4<S11700<0 THEN HSR6=S11700;
IF -4<S11900M<0 THEN HSR6=S11900M;
IF -4<S11900Y<0 THEN HSR6=S11900Y;
IF S11700=1 AND (S11900M=-4 AND S11900Y=-4) AND HSR6=-4 THEN DO;
HSR6=-3;
END;
IF S13300=1 AND S13500M>0 AND S13500Y>0 THEN GEDR6=(S13500Y-1980)*12+S13500M;
IF -4<S13300<0 THEN GEDR6=S13300;
IF -4<S13500M<0 THEN GEDR6=S13500M;
IF -4<S13500Y<0 THEN GEDR6=S13500Y;
IF S13300=1 AND (S13500M=-4 AND S13500Y=-4) AND GEDR6=-4 THEN GEDR6=-3;
DO I=1 TO 4;
IF S23450[I]=1 AND S23460M[I]>0 AND S23460Y[I]>0 AND AAR6=-4
THEN AAR6=(S23460Y[I]-1980)*12+S23460M[I];
IF S23450[I]=1 AND -4<S23460M[I]<0 AND AAR6=-4 THEN AAR6=S23460M[I];
IF S23450[I]=1 AND -4<S23460Y[I]<0 AND AAR6=-4 THEN AAR6=S23460Y[I];
IF S23450[I]=1 AND (S23460M[I]=-4 AND S23460Y[I]=-4) AND AAR6=-4 THEN AAR6=-3;
IF S23450[I]=3 AND S23460M[I]>0 AND S23460Y[I]>0 AND BAR6=-4
THEN BAR6=(S23460Y[I]-1980)*12+S23460M[I];
IF S23450[I]=3 AND -4<S23460M[I]<0 AND BAR6=-4 THEN BAR6=S23460M[I];
IF S23450[I]=3 AND -4<S23460Y[I]<0 AND BAR6=-4 THEN BAR6=S23460Y[I];
IF S23450[I]=3 AND (S23460M[I]=-4 AND S23460Y[I]=-4) AND BAR6=-4 THEN BAR6=-3;
IF S23450[I]=4 AND S23460M[I]>0 AND S23460Y[I]>0 AND MAR6=-4
THEN MAR6=(S23460Y[I]-1980)*12+S23460M[I];
IF S23450[I]=4 AND -4<S23460M[I]<0 AND MAR6=-4 THEN MAR6=S23460M[I];
IF S23450[I]=4 AND -4<S23460Y[I]<0 AND MAR6=-4 THEN MAR6=S23460Y[I];
IF S23450[I]=4 AND (S23460M[I]=-4 AND S23460Y[I]=-4) AND MAR6=-4 THEN MAR6=-3;
IF S23450[I]=5 AND S23460M[I]>0 AND S23460Y[I]>0 AND DOCR6=-4
THEN DOCR6=(S23460Y[I]-1980)*12+S23460M[I];
IF S23450[I]=5 AND -4<S23460M[I]<0 AND DOCR6=-4 THEN DOCR6=S23460M[I];
IF S23450[I]=5 AND -4<S23460Y[I]<0 AND DOCR6=-4 THEN DOCR6=S23460Y[I];
IF S23450[I]=5 AND (S23460M[I]=-4 AND S23460Y[I]=-4) AND DOCR6=-4 THEN DOCR6=-3;
IF S23450[I]=6 AND S23460M[I]>0 AND S23460Y[I]>0 AND PROFR6=-4
THEN PROFR6=(S23460Y[I]-1980)*12+S23460M[I];
IF S23450[I]=6 AND -4<S23460M[I]<0 AND PROFR6=-4 THEN PROFR6=S23460M[I];
IF S23450[I]=6 AND -4<S23460Y[I]<0 AND PROFR6=-4 THEN PROFR6=S23460Y[I];
IF S23450[I]=6 AND (S23460M[I]=-4 AND S23460Y[I]=-4) AND PROFR6=-4 THEN
PROFR6=-3;
IF S23450[I]=9 AND S23460M[I]>0 AND S23460Y[I]>0 AND GEDR6=-4
THEN GEDR6=(S23460Y[I]-1980)*12+S23460M[I];
IF S23450[I]=9 AND -4<S23460M[I]<0 AND GEDR6=-4 THEN GEDR6=S23460M[I];
IF S23450[I]=9 AND -4<S23460Y[I]<0 AND GEDR6=-4 THEN GEDR6=S23460Y[I];
IF S23450[I]=9 AND (S23460M[I]=-4 AND S23460Y[I]=-4) AND GEDR6=-4 THEN GEDR6=-3;
END;
DO I=1 TO 4;
IF -4<S23450[I]<0 AND AAR6=-4 THEN AAR6=S23450[I];
IF -4<S23450[I]<0 AND BAR6=-4 THEN BAR6=S23450[I];
IF -4<S23450[I]<0 AND MAR6=-4 THEN MAR6=S23450[I];
IF -4<S23450[I]<0 AND DOCR6=-4 THEN DOCR6=S23450[I];
IF -4<S23450[I]<0 AND PROFR6=-4 THEN PROFR6=S23450[I];
IF -4<S23450[I]<0 AND GEDR6=-4 THEN GEDR6=S23450[I];
END;
** If respondent completes GED in a training program, setting date to -3 because
we don't know
completion date.;
DO I=1 TO 4;
IF GEDR6=-4 AND T7000[I]=4 then DO;
GEDR6=-3;
GED_TRN=1;
END;
END;
** Changing -1 & -2 to -3.;
DO I=1 TO 7;
IF CRP[I]=-1 THEN CRP[I]=-3;
IF CRP[I]=-2 THEN CRP[I]=-3;
IF CR6[I]=-1 THEN CR6[I]=-3;
IF CR6[I]=-2 THEN CR6[I]=-3;
END;
** Taking care of non-interviews.;
DO I=1 TO 7;
IF S11700=-5 THEN CR6[I]=-5;
END;
** Checking if there is some conflict between round 6 and the latest information
available from previous
rounds.;
DO I=1 TO 7;
FLAG[I]=0;
IF CR6[I] NOT IN (-4,-5) AND CRP[I]~=-4 AND CR6[I]~=CRP[I] THEN FLAG[I]=1;
END;
** Merging the results from previous rounds.;
** HANDEDIT (4): To resolve two dates:
(i) take the date reported in the earlier round if both dates are valid
(ii) only the valid date if only one of them is a valid date
if AA or higher have two valid dates then that is not a questionnaire err or as
a
person may have the same type of degree in different majors. It may however be a
data
inconsistency if R reports receiving the same type of degree in the same major
from the
same institution. These must be looked at case by case;
DO I=1 TO 7;
DT[I]=-4;
** When there is no conflict.;
IF FLAG[I]~=1 THEN DO;
IF CRP[I]~=-4 THEN DT[I]=CRP[I];
IF CR6[I]~=-4 THEN DT[I]=CR6[I];
END;
** When there is conflict.;
IF FLAG[I]=1 THEN DO;
IF CRP[I]>0 AND CR6[I]=-3 THEN DO;
HANDEDIT[I]=1;
DT[I]=CRP[I];
END;
IF CR6[I]>0 AND CRP[I]=-3 THEN DO;
HANDEDIT[I]=2;
DT[I]=CR6[I];
END;
IF CR6[I]>0 AND CRP[I]> 0 THEN DO;
HANDEDIT[I]=3;
DT[I]=CRP[I];
END;
END;
END;
** HANDEDIT (5) : These Rs reported college even though they had no GED or HS
diploma. So they were
asked how this happened in YSCH-13900. If there answer was that they had a GED
or
HS Diploma and give a valid date we use that date. But if they said they
received
sometime earlier but did not give a valid date we assign the dates as -3.;
IF pubid IN
(83,216,438,662,884,993,1409,1934,1963,2456,4349,
4587,4742,5177,5332,5886,5981,6338,6924,7833,8091,8126,
8497,8702,2360,3666,4451) AND (DTGED<=0) THEN DO;
DTGED=-3;
END;
IF pubid =2422 AND (DTGED<=0) THEN DO; DTGED=243; END;
IF pubid =2645 AND (DTGED<=0) THEN DO; DTGED=270; END;
IF pubid =4151 AND (DTGED<=0) THEN DO; DTGED=261; END;
IF pubid =4259 AND (DTGED<=0) THEN DO; DTGED=234; END;
IF pubid =4287 AND (DTGED<=0) THEN DO; DTGED=253; END;
IF pubid =4655 AND (DTGED<=0) THEN DO; DTGED=239; END;
IF pubid =5648 AND (DTGED<=0) THEN DO; DTGED=247; END;
IF pubid =5811 AND (DTGED<=0) THEN DO; DTGED=228; END;
** HANDEDIT (6) : Incorporating additional information from comments.;
IF pubid IN (1666,5048,6169,8671,8686,212,397) AND
(DTGED<=0) THEN DO;
DTGED=-3;
END;
IF pubid =1665 AND (DTGED<=0) THEN DO; DTGED=276; END;
IF pubid =6924 AND (DTGED<=0) THEN DO; DTGED=264; END;
IF pubid =6119 AND (DTGED<=0) THEN DO; DTGED=270; END;
IF pubid =8686 AND (DTGED<=0) THEN DO; DTGED=259; END;
IF pubid IN (5701,4836) AND (DTHS<=0) THEN DO;
DTHS=-3;
END;
IF pubid =3812 AND (DTHS<=0) THEN DO; DTHS=269; END; /** USED INFO FROM
COMMENTS AND R7 **/
IF pubid =3207 AND (DTHS<=0) THEN DO; DTHS=269; END;
IF pubid =3825 AND (DTHS<=0) THEN DO; DTHS=271; END;
IF pubid =6015 AND (DTHS<=0) THEN DO; DTHS=245; END; /** USED INFO FROM
COMMENTS AND R7 **/
IF pubid =7624 AND (DTHS<=0) THEN DO; DTHS=270; END;
IF pubid =8294 AND (DTHS<=0) THEN DO; DTHS=272; END;
IF pubid =8412 AND (DTHS<=0) THEN DO; DTHS=273; END;
IF pubid =5471 THEN DO; DTHS=258; END;
IF pubid =5488 THEN DO; DTHS=258; END;
IF pubid =7774 THEN DO; DTAA=-3; END;
IF pubid =4826 THEN DO; DTBA=-3; END;
IF pubid =757 THEN DO; DTBA=-3; END;
IF pubid =4136 AND (DTBA<=0) THEN DO;
DTBA=-3;
END;
ENDSAS;
Variables Created:
CV_GRADES_REPEAT_EVER
CV_GRADES_REPEAT_YR
CV_GRADE_SKIPPED_EVER
CV_GRADE_SKIPPED_YR
Variables Used
|
Name in Program |
Question Name on CD |
Name in Program |
Question Name on CD |
|
| Round 1 | Round 6 ctd. | |||
| rlintD | YINF-900_D | s9691115M | YSCH-9691.01.01.05~M | |
| rlintM | YINF-900_M | s9691115Y | YSCH-9691.01.01.05~Y | |
| rlintY | YINF-900_Y | s9691121M | YSCH-9691.01.02.01~M | |
| s3500r1 | YSCH_3500_1997 | s9691121Y | YSCH-9691.01.02.01~Y | |
| s3500r1 | s9691211M | YSCH-9691.02.01.01~M | ||
| s3900r1 | s9691211Y | YSCH-9691.02.01.01~Y | ||
| s4000r1 | s9691212M | YSCH-9691.02.01.02~M | ||
| s5000r1 | s9691212Y | YSCH-9691.02.01.02~Y | ||
| HGCr1_symbol | s9691213M | YSCH-9691.02.01.03~M | ||
| Round 2 | s9691213Y | YSCH-9691.02.01.03~Y | ||
| r2intD | SYMBOL ! CURDATE~D | s9691214M | YSCH-9691.02.01.04~M | |
| r2intM | SYMBOL ! CURDATE~M | s9691214Y | YSCH-9691.02.01.04~Y | |
| r2intY | SYMBOL ! CURDATE~Y | s9691311M | YSCH-9691.03.01.01~M | |
| Round 3 | s9691311Y | YSCH-9691.03.01.01~Y | ||
| r3intD | SYMBOL ! CURDATE~D | s9691312M | YSCH-9691.03.01.02~M | |
| r3intM | SYMBOL ! CURDATE~M | s9691312Y | YSCH-9691.03.01.02~Y | |
| r3intY | SYMBOL ! CURDATE~Y | s9691313M | YSCH-9691.03.01.02~Y | |
| Round 4 | s9691313Y | YSCH-9691.03.01.03~Y | ||
| r4intD | SYMBOL ! CURDATE~D | s9691411M | YSCH-9691.04.01.01~M | |
| r4intM | SYMBOL ! CURDATE~M | s9691411Y | YSCH-9691.04.01.01~Y | |
| r4intY | SYMBOL ! CURDATE~Y | s9691412M | YSCH-9691.04.01.02~M | |
| Round 5 | s9691412Y | YSCH-9691.04.01.02~Y | ||
| r5intD | SYMBOL ! CURDATE~D | s9793111 | YSCH-9793.01.01.01 | |
| r5intM | SYMBOL ! CURDATE~M | s9793112 | YSCH-9793.01.01.02 | |
| r5intY | SYMBOL ! CURDATE~Y | s9793113 | YSCH-9793.01.01.03 | |
| numrepr5 | CV_GRADES_REPEAT_EVER | s9793211 | YSCH-9793.02.01.01 | |
| numrepjr5 | CV_GRADES_REPEAT_YR | s9793212 | YSCH-9793.02.01.02 | |
| numskipr5 | CV_GRADE_SKIPPED_EVER | s9793311 | YSCH-9793.03.01.01 | |
| numskipjr5 | CV_GRADE_SKIPPED_YR | s9946111 | YSCH-9946.01.01.01 | |
| Round 6 | s9946112 | YSCH-9946.01.01.02 | ||
| s3102 | YSCH-3102 | s9946113 | YSCH-9946.01.01.03 | |
| s3103 | YSCH-3103 | s9946114 | YSCH-9946.01.01.04 | |
| s3104 | YSCH-3104 | s9946115 | YSCH-9946.01.01.05 | |
| s3010 | YSCH-3010 | s9946121 | YSCH-9946.01.02.01 | |
| s3061 | YSCH-3061 | s9946211 | YSCH-9946.02.01.01 | |
| s4793 | YSCH-4793 | s9946212 | YSCH-9946.02.01.02 | |
| s4795 | YSCH-4795 | s9946213 | YSCH-9946.02.01.03 | |
| s4846M | YSCH-4846~M | s9946214 | YSCH-9946.02.01.04 | |
| s4846Y | YSCH-4846~Y | s9946311 | YSCH-9946.03.01.01 | |
| s1600 | YSCH-1600 | s9946312 | YSCH-9946.03.01.02 | |
| s1605 | YSCH-1605 | s9946313 | YSCH-9946.03.01.03 | |
| s16101M | YSCH-1610.01~M | s9946411 | YSCH-9946.04.01.01 | |
| s16101Y | YSCH-1610.01~Y | s9946412 | YSCH-9946.04.01.02 | |
| s16201M | YSCH-1620.01~M | s099111M | YSCH-10099.01.01.01~M | |
| s16201Y | YSCH-1620.01~Y | s099111Y | YSCH-10099.01.01.01~Y | |
| s16251 | YSCH-1625.01 | s099112M | YSCH-10099.01.01.02~M | |
| s16271 | YSCH-1627.01 | s099112Y | YSCH-10099.01.01.02~Y | |
| s841611 | YSCH-8416.01.01 | s099113M | YSCH-10099.01.01.03~M | |
| s841612 | YSCH-8416.01.02 | s099113Y | YSCH-10099.01.01.03~Y | |
| s841621 | YSCH-8416.02.01 | s099114M | YSCH-10099.01.01.04~M | |
| s841622 | YSCH-8416.02.02 | s099114Y | YSCH-10099.01.01.04~Y | |
| s841631 | YSCH-8416.03.01 | s099211M | YSCH-10099.02.01.01~M | |
| s841641 | YSCH-8416.04.01 | s099211Y | YSCH-10099.02.01.01~Y | |
| s877411M | YSCH-8774.01.01~M | s099212M | YSCH-10099.02.01.02~M | |
| s877411Y | YSCH-8774.01.01~Y | s099212Y | YSCH-10099.02.01.02~Y | |
| s877412M | YSCH-8774.01.02~M | s099213M | YSCH-10099.02.01.03~M | |
| s877412Y | YSCH-8774.01.02~Y | s099213Y | YSCH-10099.02.01.03~Y | |
| s877421M | YSCH-8774.02.01~M | s099214M | YSCH-10099.02.01.04~M | |
| s877421Y | YSCH-8774.02.01~Y | s099214Y | YSCH-10099.02.01.04~Y | |
| s877422M | YSCH-8774.02.02~M | s099311M | YSCH-10099.03.01.01~M | |
| s877422Y | YSCH-8774.02.02~Y | s099311Y | YSCH-10099.03.01.01~Y | |
| s877431M | YSCH-8774.03.01~M | s099312M | YSCH-10099.03.01.02~M | |
| s877431Y | YSCH-8774.03.01~Y | s099312Y | YSCH-10099.03.01.02~Y | |
| s897711 | YSCH-8977.01.01 | s099313M | YSCH-10099.03.01.03~M | |
| s897712 | YSCH-8977.01.02 | s099313Y | YSCH-10099.03.01.03~Y | |
| s897721 | YSCH-8977.02.01 | s099411M | YSCH-10099.04.01.01~M | |
| s897731 | YSCH-8977.03.01 | s099411Y | YSCH-10099.04.01.01~Y | |
| s897741 | YSCH-8977.04.01 | scode1 | NEWSCHOOL_SCHCODE.01 | |
| s913111 | YSCH-9131.01.01 | scode2 | NEWSCHOOL_SCHCODE.02 | |
| s913112 | YSCH-9131.01.02 | scode3 | NEWSCHOOL_SCHCODE.03 | |
| s913121 | YSCH-9131.02.01 | scode4 | NEWSCHOOL_SCHCODE.04 | |
| s913122 | YSCH-9131.02.02 | strt11M | NEWSCHOOL_START1.01~M | |
| s913131 | YSCH-9131.03.01 | strt11Y | NEWSCHOOL_START1.01~Y | |
| s913141 | YSCH-9131.04.01 | strt12M | NEWSCHOOL_START1.02~M | |
| s933511M | YSCH-9335.01.01~M | strt12Y | NEWSCHOOL_START1.02~Y | |
| s933511Y | YSCH-9335.01.01~Y | strt13M | NEWSCHOOL_START1.03~M | |
| s933512M | YSCH-9335.01.02~M | strt13Y | NEWSCHOOL_START1.03~Y | |
| s933512Y | YSCH-9335.01.02~Y | strt14M | NEWSCHOOL_START1.04~M | |
| s933521M | YSCH-9335.02.01~M | strt14Y | NEWSCHOOL_START1.04~Y | |
| s933521Y | YSCH-9335.02.01~Y | strt21M | NEWSCHOOL_START2.01~M | |
| s933531M | YSCH-9335.03.01~M | strt21Y | NEWSCHOOL_START2.01~Y | |
| s933531Y | YSCH-9335.03.01~Y | strt22M | NEWSCHOOL_START2.02~M | |
| s933541M | YSCH-9335.04.01~M | strt22Y | NEWSCHOOL_START2.02~Y | |
| s933541Y | YSCH-9335.04.01~Y | strt23M | NEWSCHOOL_START2.03~M | |
| s9589111 | YSCH-9589.01.01.01 | strt23Y | NEWSCHOOL_START2.03~Y | |
| s9589112 | YSCH-9589.01.01.02 | stop11M | NEWSCHOOL_STOP1.01~M | |
| s9589113 | YSCH-9589.01.01.03 | stop11Y | NEWSCHOOL_STOP1.01~Y | |
| s9589114 | YSCH-9589.01.01.04 | stop12M | NEWSCHOOL_STOP1.02~M | |
| s9589115 | YSCH-9589.01.01.05 | stop12Y | NEWSCHOOL_STOP1.02~Y | |
| s9589121 | YSCH-9589.01.02.01 | stop13M | NEWSCHOOL_STOP1.03~M | |
| s9589211 | YSCH-9589.02.01.01 | stop13Y | NEWSCHOOL_STOP1.03~Y | |
| s9589212 | YSCH-9589.02.01.02 | stop14M | NEWSCHOOL_STOP1.04~M | |
| s9589213 | YSCH-9589.02.01.03 | stop14Y | NEWSCHOOL_STOP1.04~Y | |
| s9589214 | YSCH-9589.02.01.04 | stop21M | NEWSCHOOL_STOP2.01~M | |
| s9589311 | YSCH-9589.03.01.01 | stop21Y | NEWSCHOOL_STOP2.01~Y | |
| s9589312 | YSCH-9589.03.01.02 | stop22M | NEWSCHOOL_STOP2.02~M | |
| s9589313 | YSCH-9589.03.01.03 | stop22Y | NEWSCHOOL_STOP2.02~Y | |
| s9589411 | YSCH-9589.04.01.01 | stop23M | NEWSCHOOL_STOP2.03~M | |
| s9589412 | YSCH-9589.04.01.02 | stop23Y | NEWSCHOOL_STOP2.03~Y | |
| s9691111M | YSCH-9691.01.01.01~M | PUBID | PUBID | |
| s9691111Y | YSCH-9691.01.01.01~Y | r6intD | SYMBOL!CURDATE~D | |
| s9691112M | YSCH-9691.01.01.02~M | r6intM | SYMBOL!CURDATE~M | |
| s9691112Y | YSCH-9691.01.01.02~Y | r6intY | SYMBOL!CURDATE~Y | |
| s9691113M | YSCH-9691.01.01.03~M | pregrdin | SYMBOL!PREV!GRADE_IN | |
| s9691113Y | YSCH-9691.01.01.03~Y | prehga | SYMBOL!PREV!HGA | |
| s9691114M | YSCH-9691.01.01.04~M | enroll | enrolled at date of interview in round 6-- created | |
| s9691114Y | YSCH-9691.01.01.04~Y |
Same as in round 4, in round 5, in round 6 - we are not using the read-in symbol variable for the first grade the youths enrolled, instead, we are using YSCH-8416.01.01. The reason for this is that, in round 2 and round 3, we ask the question YSCH-8263 ("Is this a DLI school") and YSCH-3401 ("Is this the first enrollment period") if they answer "yes" to YSCH-8263. So only the people who are not in the first enrollment period goes on to question YSCH-8416.01.01. But in round 4 and 5, we don't ask question YSCH-3401 anymore, so even though a youth was in the first enrollment period of DLI school, we still goes on to YSCH-8416.01.01. In this case, we rather use YSCH-8416.01.01 for the first grade attended than the symbol variable read in from the previous rounds.
PROGRAM STARTS;
if s3500r1>=0 then HGAr1=s3500r1;
if s4000r1>=0 then HGAr1=s4000r1;
if s5000r1>=0 then HGCr1=s5000r1;
if HGCr1_symbol>=0 then HGCr1=HGCr1_symbol;
** Interview dates in cumulative months;
if r6inty>0 then intdate=(r6inty-1980)*12 + r6intm;
***Create new array of start dates for first school depending on whether r. corrected roster data;
* start date - month;
array strt1xm strt11m strt12m strt13m strt14m strt15m strt16m;
* start date - month;
array strt1xy strt11y strt12y strt13y strt14y strt15y strt16y;
* corrected start date - month;
array s8771m s877411M s877421M s877431M s877441M s877451M s877461M;
* corrected start date - month;
array s8771y s877411Y s877421Y s877431Y s877441Y s877451Y s877461Y;
* correct start date - month - created;
array startm start1m start2m start3m start4m start5m start6m;
* correct start date - month - created;
array starty start1y start2y start3y start4y start5y start6y;
numstart=0;
do i=1 to 6;
if s8771m(i)>0 and s8771y(i)>0 then do;
startm(i)=s8771m(i);
starty(i)=s8771y(i);
end;
else if s8771m(i)<=0 or s8771y(i)<=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 s841621 s841622 s841631 s841641 s9589111 s9589112 s9589113 s9589114 s9589115 s9589121 s9589211 s9589212 s9589213 s9589214 s9589311 s9589312 s9589313 s9589411 s9589412;
***Completed y/n;
array gr_comp s913111 s913112 s913121 s913122 s913131 s913141 s9946111 s9946112 s9946113 s9946114 s9946115 s9946121 s9946211 s9946212 s9946213 s9946214 s9946311 s9946312 s9946313 s9946411 s9946412;
***When completed grade - month;
array cdate_m s933511M s933512M s933521M s933522M s933531M s933541M s099111M s099112M s099113M s099114M s099115M s099121M s099211M s099212M s099213M s099214M s099311M s099312M s099313M s099411M s099412M;
***When completed grade - year;
array cdate_y s933511Y s933512Y s933521Y s933522Y s933531Y s933541Y s099111Y s099112Y s099113Y s099114Y s099115Y s099121Y s099211Y s099212Y s099213Y s099214Y s099311Y s099312Y s099313Y s099411Y s099412Y;
***When started - month;
array sdate_m start1M s877412M start2M s877422M start3M start4M s691111M s691112M s691113M s691114M s691115M s691121M s691211M s691212M s691213M s691214M s691311M s691312M s691313M s691411M s691412M;
***When started - year;
array sdate_y start1Y s877412Y start2Y s877422Y start3Y start4Y s691111Y s691112Y s691113Y s691114Y s691115Y s691121Y s691211Y s691212Y s691213Y s691214Y s691311Y s691312Y s691313Y s691411Y s691412Y;
*****Create arrays of all grades attended and completed and their start and complete dates;
* grade attended;
array attend (9) attend1-attend9;
* grade completed;
array comp (9) comp1-comp9;
* date of grade enrollment/start - month;
array datestm (9) datestm1-datestm9;
* date of grade enrollment/start - year;
array datesty (9) datesty1-datesty9;
* date of grade completion - month;
array datecpm (9) datecpm1-datecpm9;
* date of grade completion - year;
array datecpy (9) 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 21;
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 21;
if gr_comp[i] ne -4 and gr_comp[i] ne . then do;
attend(k)=gr_att[i];
datestm(k)=sdate_m[i];
datesty(k)=sdate_y[i];
k=k+1;
end;
end;
end;
*******Create date in continuous months for each start and complete date in arrays;
* date of grade completion in
continuous month scheme;
array c_date (9) c_date1 c_date2 c_date3 c_date4 c_date5 c_date6 c_date7 c_date8
c_date9;
* date of grade enrollment/start in continuous month scheme;
array s_date (9) 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;
* completed grade and date of
grade completion when grades have been listed only once and in order;
array newcomp (7) newcomp1-newcomp7;
array newcdate (7) newcdat1-newcdat7;
newcomp1=comp1;
newcdat1=c_date1;
reorder=0;
***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 7;
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];
reorder=reorder=1;
end;
end;
end;
do j=2 to 7;
do i=1 to 7;
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];
reorder=reorder+1;
end;
end;
end;
end;
***Create a new array with all grades attended in order and an array with the earliest date each grade was started;
*
intermediate variables;
array tmpatt (9) tmpatt1 tmpatt2 tmpatt3 tmpatt4 tmpatt5 tmpatt6 tmpatt7 tmpatt8
tmpatt9;
array tmpadate (9) tmpadat1 tmpadat2 tmpadat3 tmpadat4 tmpadat5 tmpadat6
tmpadat7 tmpadat8 tmpadat9;
* grades attended and the start dates for enrollment in these grades in proper
order;
array NEWATT (9) NEWATT1 NEWATT2 NEWATT3 NEWATT4 NEWATT5 NEWATT6 NEWATT7 NEWATT8
NEWATT9;
array NEWADATE (9) NEWADAT1 NEWADAT2 NEWADAT3 NEWADAT4 NEWADAT5 NEWADAT6
NEWADAT7 NEWADAT8 NEWADAT9;
do i=1 to 9;
tmpatt[i]=attend[i];
tmpadate[i]=s_date[i];
end;
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;
reorder=reorder+1
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 (0 lt tmpadate[i] lt newadate[k]) or (newadate[k]=-4 and tmpadate[i]>0) then do;
newadate[k] = tmpadate[i];
end;
else if tmpadate[i] in (-1,-2,-3) or newadate[k] in (-1,-2,-3) then newadate[k]=-3;
end;
else if tmpatt[i] gt newatt[k] then do;
k=k+1;
newatt[k] = tmpatt[i];
newadate[k] = tmpadate[i];
end;
end;
***Compute the last enrollment date - stopdate;
* school stop date - month;
array stopm (7) stop11m stop21m stop12m stop22m stop13m stop23m stop14m;
* school stop date - month;
array stopy (7) stop11y stop21y stop12y stop22y stop13y stop23y stop14y;
* school stop date in continuous month scheme;
array stopd (7) stopd1-stopd7;
* school code;
array scode (7) scode1 scode1 scode2 scode2 scode3 scode3 scode4;
do i=1 to 7;
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;
if scode1 in (1,2,3) then stopdate=stopd1;
do i=2 to 7;
if scode(i) in (1,2,3) and stopd(i)>stopdate
then stopdate=stopd(i);
end;
end;
else if enroll=1 then stopdate=-4;
***** Compute end dates for attended grades:
find the end date for each grade
attended - if R doesn't
give a completion date then:
(a) choose the month before they started the next grade,
(b) if there is not another grade and currently enrolled then take the interview
date,
(c) if there is not another grade and not currently enrolled then take the last
stop date - stopdate,
(d) if the enrollment date for the grade is the last interview date then take
the next june.;
** array for date of completion/stop attending a grade;
array NEWEDATE (9) NEWEDAT1 NEWEDAT2 NEWEDAT3 NEWEDAT4 NEWEDAT5 NEWEDAT6
NEWEDAT7 NEWEDAT8 NEWEDAT9;
** array for flags of grade completion;
array ISCOMP (9) ISCOMP1 ISCOMP2 ISCOMP3 ISCOMP4 ISCOMP5 ISCOMP6 ISCOMP7 ISCOMP8
ISCOMP9;
do i=1 to 9;
if newatt(i)~=. then ISCOMP(i)=0;
end;
endimp=0;
do i=1 to 9;
do j=1 to 7;
if NEWATT(i)=newcomp(j) and NEWATT(i)>0 then do;
NEWEDATE(i)=newcdate(j);
ISCOMP(i)=1;
end;
end;
if NEWATT(i)~=. and NEWEDATE(i)=. and NEWADATE(i)~=r5bfint and NEWADATE(i)~=NEWADATE(i+1)
and NEWADATE(i+1)~=. then do;
NEWEDATE(i)=NEWADATE(i+1)-1;
endimp=1;
end;
else if NEWATT(i)~=. and NEWEDATE(i)=. and NEWATT(i+1)=. and enroll=1 then do;
NEWEDATE(i)=intdate;
endimp=1;
end;
else if NEWATT(i)~=. and NEWEDATE(i)=. and NEWATT(i+1)=. and enroll=0 then do;
NEWEDATE(i)=stopdate;
endimp=1;
end;
else if NEWEDATE(i)=. and NEWADATE(i)=r5bfint then do;
endimp=1;
if NEWADATE(i)<=210 then NEWEDATE(i)=210;
else if 211<=NEWADATE(i)<=222 then NEWEDATE(i)=222;
else if 223<=NEWADATE(i)<=234 then NEWEDATE(i)=234;
else if 235<=NEWADATE(i)<=246 then NEWEDATE(i)=246;
else if 247<=NEWADATE(i)<=258 then NEWEDATE(i)=258;
else if 259<=NEWADATE(i)<=270 then NEWEDATE(i)=270;
else if 271<=NEWADATE(i)<=282 then NEWEDATE(i)=282;
end;
end;
********delete the grades whose information is repeatedly reported in round 6;
If a grade is reported in the
previous rounds and was completed, we don't repeat this grade's info.
in round 6;
* The grade attended up to round 5 in order;
array r5bfat (15) r5bfat1-r5bfat15;
* enrollment dates for grade attended up to round 5 in order;
array r5bfst (15) r5bfst1-r5bfst15;
* stop dates for grade attended up to round 5 in order;
array r5bfed (15) r5bfed1-r5bfed15;
* flag to indicate whether the grade was completed or not for grades attended up
to round 5 in order;
array r5bfcp (15) r5bfcp1-r5bfcp15;
* intermediate variables;
array tmp2att (9) 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 15;
if 0<tmp2att(i)<13 and tmp2att(i)=r5bfat(j) and r5bfcp(j)=1 then do;
j=15;
backcut=1;
ncut=ncut+1;
do k=i+1-ncut to 9-ncut;
if NEWATT(k+1)~=. 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 0<NEWATT1<13 then do;
do i=1 to 15;
if r5bfat(i)>=NEWATT1 then do;
if r5bfat(i+1)~=. then backrep=1;
if r5bfcp(i)=1 then backrep=2;
end;
end;
end;
** flag the case where the reported grades are jumping;
badpre=0;
replace=0;
jumprep1=0;
jumprep2=0;
jumpge21=0;
jumpge22=0;
if r5bfat1~=. then do;
do i=1 to 14;
if r5bfat(i)~=. and r5bfat(i+1)=. then do;
lphigh=r5bfat(i);
lphighst=r5bfst(i);
lphighed=r5bfed(i);
lphighcp=r5bfcp(i);
lpnum=i;
i=15;
end;
end;
end;
else lphigh=-5;
if 0<NEWATT1<13 then do;
if (lphigh~=-5 and ((NEWATT1=lphigh+1 and lphighcp~=1) or NEWATT1>lphigh+1))
then jumprep1=1;
if (lphigh=-5 and ((HGCr1>0 and NEWATT1>=HGCr1+2) or (HGAr1>0 and
NEWATT1>=HGAr1+2)))
then jumprep2=1;
if (lphigh~=-5 and NEWATT1>=lphigh+2) then jumpge21=1;
if (lphigh=-5 and HGCr1>0 and NEWATT1>=HGCr1+3) then jumpge22=1;
end;
** substitute start dates in the previous round for first grade in loops;
if 0<NEWATT1<13 and r5bfat1~=. then do;
do i=1 to 14;
if (r5bfst(i)>r5bfed(i) and r5bfed(i)>0) or (r5bfed(i)>r5bfst(i+1) and
r5bfst(i+1)>0)
or (r5bfst(i+1)>r5bfed(i+1) and r5bfed(i+1)>0) then do;
newadat1=-3;
badpre=1;
end;
else if r5bfat(i)=NEWATT1 and r5bfat(i+1)=. and r5bfcp(i)=0 and badpre~=1 then
do;
newadat1=r5bfst(i);
replace=1;
end;
end;
end;
else if -4<NEWATT1<=0 then newadat1=-3;
***** CREATE THE FINAL VARIABLES;
** Measure the length that a respondent was in each completed grade and count
the number of grades
skipped and repeated;
array lengtha (9) 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;
*skipback=0;
do i=1 to 8;
if 0<NEWATT(i)<13 and NEWEDATE(i)>0 and NEWADATE(i)>0 then lengtha(i)=NEWEDATE(i)-NEWADATE(i);
if 0<NEWATT(i)<13 and NEWADATE(i)<=NEWEDATE(i)<=NEWADATE(i+1) and lengtha(i)>13
and NEWATT(i+1)-NEWATT(i)=1 and repeat~=-3 then do;
repeat=repeat+1;
if i=1 and NEWADATE(i)<r5bfint then oldstrt=1;
if NEWEDATE(i)<=270 then repeatj=repeatj+1;
end;
else if 0<NEWATT(i)<13 and NEWADATE(i)<=NEWEDATE(i) and NEWATT(i+1)=. and
lengtha(i)>13
and repeat~=-3 and (ISCOMP(i)=1 or s2857=NEWATT(i)) then do;
repeat=repeat+1;
if i=1 and NEWADATE(i)<r5bfint then oldstrt=1;
if NEWEDATE(i)<=270 then repeatj=repeatj+1;
end;
else if 0<NEWATT(i)<13 and NEWADATE(i)<=NEWEDATE(i) and NEWATT(i+1)=. and
lengtha(i)>13
and repeat~=-3 and (ISCOMP(i)=0 and s2857~=NEWATT(i)) then do;
if i=1 and NEWADATE(i)<r5bfint then oldstrt=1;
repeat=-3;
repeatj=-3;
reason=1;
end;
end;
do i=1 to 7;
if 0<NEWATT(i)<13 and NEWADATE(i)<NEWEDATE(i)<NEWADATE(i+1)<NEWEDATE(i+1) then
do;
if NEWADATE(i) in (212, 213, 224, 225, 236, 237, 248, 249, 260, 261, 272, 273)
and NEWADATE(i)~=r5bfint and NEWATT(i+1)-NEWATT(i)=1 and ISCOMP(i+1)=1
and NEWEDATE(i+1)-NEWADATE(i)<=12 and NEWADATE(i+2)-NEWEDATE(i+1)<=9 then do;
if (i=1 or (i~=1 and NEWADATE(i)-NEWEDATE(i-1)<=9)) and skipleng~=-3 then do;
skipleng=skipleng+1;
if NEWEDATE(i+1)<=270 and skipl_j~=-3 then skipl_j=skipl_j+1;
end;
end;
end;
end;
** Take care of connection between previous rounds and current round;
connect=0;
if 0<NEWATT1<13 and lphigh>0 and NEWATT1~=lphigh then do;
if NEWATT1-lphigh>1 then connect=1;
if lphighst in (212, 213, 224, 225, 236, 237, 248, 249, 260, 261, 272, 273) and
NEWEDAT1>=lphighst
and NEWEDAT1-lphighst<=12 then connect=2;
end;
else if 0<NEWATT1<13 and lphigh>0 and NEWATT1=lphigh and ISCOMP1=1 and lphighcp~=1
and r5bfst(lpnum-1)>0 then do;
if r5bfst(lpnum-1) in (212, 213, 224, 225, 236, 237, 248, 249, 260, 261, 270.
272)
and NEWEDAT1>=r5bfst(lpnum-1) and NEWEDAT1-r5bfst(lpnum-1)<=12 then connect=3;
end;
** Check for respondents who completely skip (do not attend) a grade;
skipgr=0;
skipgrj=0;
skipgt2=0;
do i=1 to 8;
if 0<NEWATT(i)<13 and NEWATT(i+1)-NEWATT(i)=2 and NEWEDATE(i)>0 and
NEWADATE(i+1)>0
and NEWADATE(i+1)-NEWEDATE(i)<=9 and skipgr~=-3 then do;
skipgr=skipgr+1;
if NEWEDATE(i+1)<=270 then skipgrj=skipgrj+1;
end;
else if 0<NEWATT(i)<13 and NEWATT(i+1)-NEWATT(i)=3 and NEWEDATE(i)>0 and
NEWADATE(i+1)>0
and NEWADATE(i+1)-NEWEDATE(i)<=9 then do;
skipgr=skipgr+2;
if NEWEDATE(i+1)<=270 then skipgrj=skipgrj+2;
end;
else if 0<NEWATT(i)<13 and NEWATT(i+1)-NEWATT(i)>3 and NEWEDATE(i)>0 and
NEWADATE(i+1)>0
and NEWADATE(i+1)-NEWEDATE(i)<=9 then do;
skipgt2=1;
end;
end;
** Set repeat and skip to -3 if allmess=1 or if backrep>0 or if jumprep=1 or if
zerograd=1 or negdate=1;
allmess=0;
do i=1 to 8;
if 0<NEWATT(i)<13 and (NEWADATE(i)>NEWEDATE(i) and NEWEDATE(i)>0)
or (NEWEDATE(i)>NEWADATE(i+1) and NEWADATE(i+1)>0)
or (NEWADATE(i+1)>NEWEDATE(i+1) and NEWEDATE(i+1)>0) then do;
allmess=1;
end;
end;
zerograd=0;
do i=1 to 9;
if NEWATT(i)=0 then zerogrd=1;
end;
negdate=0;
do i=1 to 9;
if 0<NEWATT(i)<13 and NEWEDATE(i) in (-1,-2,-3) or NEWADATE(i) in (-1,-2,-3)
then negdate=1;
end;
if allmess=1 or backrep>0 or zerograd=1 or jumprep1=1 or jumprep2=1 or negdate=1
then do;
repeat=-3;
repeatj=-3;
skip=-3;
skipj=-3;
end;
if allmess=1 then reason=2.1;
if backrep>0 then reason=2.2;
if zerograd=1 then reason=2.3;
if jumprep1=1 then reason=2.4;
if jumprep2=1 then reason=2.5;
if negdate=1 then reason=2.6;
** Flag respondents who reported skipping a grade and those who say they did not
skip grade;
array whyskip (9) S897711 S897712 S897721 S897731 S897741 S9793111 S9793112
S9793211 S9793212;
skipques=0;
do i=1 to 9;
if whyskip(i)=1 then skipques=1;
end;
notskip=0;
do i=1 to 9;
if whyskip(i) in (-1,-2,2,999) then notskip=1;
end;
double=0;
if skipgr>0 and skipleng>0 then double=1;
if skip~=-3 then do;
if (skipques=0 and skipleng=0 and skipgr=0) or (notskip>=1 and skipques=0) then
skip=0;
else if skipleng=-3 and (skipgr=0 or skipques=0) then do;
skip=-3;
reason=3;
end;
else if skipgr=-3 and skipleng=0 then do;
skip=-3;
reason=4;
end;
else if skipleng>=1 then skip=skipleng;
else if skipques>=1 and skipgr>=1 then skip=skipgr;
else if skipques>=1 and skipgr=0 then do;
skip=-3;
reason=5;
end;
else if skipques=0 and skipgr>=1 then do;
skip=-3;
reason=6;
end;
if skipques=-3 or skipgr=-3 or skipleng=-3 then do;
skip=-3;
reason=7;
end;
end;
if skipj~=-3 then do;
if (skipl_j=0 and skipgrj=0) or (notskip>=1 and skipques=0) then skipj=0;
else if skipl_j=-3 and (skipgrj=0 or skipques=0) then do;
skip=-3;
reason=8;
end;
else if skipgrj=-3 and skipl_j=0 then do;
skipj=-3;
reason=9;
end;
else if skipl_j>=1 then skipj=skipl_j;
else if skipques>=1 and skipgrj>=1 then skipj=skipgrj;
else if skipques>=1 and skipgrj=0 then do;
skipj=-3;
reason=10;
end;
else if skipques=0 and skipgrj>=1 then do;
skipj=-3;
reason=11;
end;
if skip=-3 then do;
skipj=-3;
reason=12;
end;
end;
** Take care of the cases whose "repeated grade" could be double counted;
if oldstrt=1 and repeat>0 and r5bfrpev>0 and r5bf2857~=-5 then do;
do i=1 to 8;
if 0<NEWATT1<13 and r5bfat(i)=NEWATT1 and r5bfat(i+1)=. and
(r5bfed(i)-r5bfst(i))>13 and
(r5bfcp(i)=1 or r5bf2857=r5bfat(i)) then do;
repeat=repeat-1;
if NEWEDAT1<=270 then repeatj=repeatj-1;
double_repeat=1;
end;
end;
end;
** Combine the previous and current information;
if r5bfrpev>=0 and repeat>=0 then numrep=r5bfrpev+repeat;
else if r5bfrpev<0 then numrep=r5bfrpev;
else if r5bfrpev>=0 and repeat<0 then numrep=repeat;
if r5bfrpev>=0 and repeatj>=0 then numrepj=r5bfrpev+repeatj;
else if r5bfrpev<0 then numrepj=r5bfrpev;
else if r5bfrpev>=0 and repeatj<0 then numrepj=repeatj;
if r5bfskev>=0 and skip>=0 then numskip=r5bfskev+skip;
else if r5bfskev<0 then numskip=r5bfskev;
else if r5bfskev>=0 and skip<0 then numskip=skip;
if r5bfskev>=0 and skip>=0 then numskipj=r5bfskev+skipj;
else if r5bfskev<0 then numskipj=r5bfskev;
else if r5bfskev>=0 and skipj<0 then numskipj=skipj;
if numrep in (-1,-2) then numrep=-3;
if numrepj in (-1,-2) then numrepj=-3;
if numskip in (-1,-2) then numskip=-3;
if numskipj in (-1,-2) then numskipj=-3;
if numrepr1=-4 then do;
numskip=-4;
numrep=-4;
numskipj=-4;
numrepj=-4;
end;
if s3104=-5 then do;
numskip=-5;
numrep=-5;
numskipj=-5;
numrepj=-5;
end;
endsas;
Variables Created:
CV_SCH_ATTEND_EVER (NUMS)
CV_SCH_ATTEND_YR (NUMJ)
Variables Used
|
Name in Program |
Question Name on CD |
| CURGDR1 | YSCH_3500_1997 |
| NUMR1 | CV_SCH_ATTEND_EVER_1997 |
| HGAR2 | YSCH_2857_1998 |
| pubid | PUBID |
| NUMR2 | CV_SCH_ATTEND_EVER_1998 |
| HGAR3 | YSCH_2857_1999 |
| NUMR3 | CV_SCH_ATTEND_EVER_1999 |
| HGAR4 | YSCH_2857_2000 |
| NUMR4 | CV_SCH_ATTEND_EVER_2000 |
| HGAR5 | YSCH_2857_2001 |
| HGAR6 | YSCH_2857_2002 |
| S826311 | YSCH_8263_01_01_2002 |
| S826312 | YSCH_8263_01_02_2002 |
| S826321 | YSCH_8263_02_01_2002 |
| S826322 | YSCH_8263_02_02_2002 |
| S826331 | YSCH_8263_03_01_2002 |
| S826332 | YSCH_8263_03_02_2002 |
| S826341 | YSCH_8263_04_01_2002 |
| S826351 | YSCH_8263_05_01_2002 |
| S841611 | YSCH_8416_01_01_2002 |
| S841612 | YSCH_8416_01_02_2002 |
| S841621 | YSCH_8416_02_01_2002 |
| S841622 | YSCH_8416_02_02_2002 |
| S841631 | YSCH_8416_03_01_2002 |
| S841641 | YSCH_8416_04_01_2002 |
| S841651 | YSCH_8416_05_01_2002 |
| S9589111 | YSCH_9589_01_01_01_2002 |
| S9589112 | YSCH_9589_01_01_02_2002 |
| S9589113 | YSCH_9589_01_01_03_2002 |
| S9589114 | YSCH_9589_01_01_04_2002 |
| S9589121 | YSCH_9589_01_02_01_2002 |
| S9589122 | YSCH_9589_01_02_02_2002 |
| S9589211 | YSCH_9589_02_01_01_2002 |
| S9589212 | YSCH_9589_02_01_02_2002 |
| S9589213 | YSCH_9589_02_01_03_2002 |
| S9589311 | YSCH_9589_03_01_01_2002 |
| S9589411 | YSCH_9589_04_01_01_2002 |
| S9589412 | YSCH_9589_04_01_02_2002 |
| START1M | NEWSCHOOL_START1_01_M_2002 |
| START1Y | NEWSCHOOL_START1_01_Y_2002 |
| START2M | NEWSCHOOL_START1_02_M_2002 |
| START2Y | NEWSCHOOL_START1_02_Y_2002 |
| START3M | NEWSCHOOL_START1_03_M_2002 |
| START3Y | NEWSCHOOL_START1_03_Y_2002 |
| START4M | NEWSCHOOL_START1_04_M_2002 |
| START4Y | NEWSCHOOL_START1_04_Y_2002 |
| ROUND1 | NEWSCHOOL_INTERVIEW_01_2002 |
| ROUND2 | NEWSCHOOL_INTERVIEW_02_2002 |
| ROUND3 | NEWSCHOOL_INTERVIEW_03_2002 |
| ROUND4 | NEWSCHOOL_INTERVIEW_04_2002 |
| SCHID1 | NEWSCHOOL_PUBID_01_2002 |
| SCHID2 | NEWSCHOOL_PUBID_02_2002 |
| SCHID3 | NEWSCHOOL_PUBID_03_2002 |
| SCHID4 | NEWSCHOOL_PUBID_04_2002 |
| SCHID5 | NEWSCHOOL_PUBID_05_2002 |
| SCHID6 | NEWSCHOOL_PUBID_06_2002 |
| symgrd | SYMBOL_CUR_FIRSTGRADE_01_01_2002 |
This program is used to count the number of regular schools that the
youth ever attended as
of the survey date and as of June 30, 2002.
The program first count the number of new regular schools that the youth
attended since DLI
to the date of survey (June 30, 2002) by the first enrollment date in each new
school, then
add this number to the created variable in round 5 or round 4 ( if the person is
not interviewed in round 5) and get the total number of regular schools
that the youth have ever attended to the required date.
When we count the new schools, since we only count the schools
from the youth's
7th grade
through his(her) 12th grade, so we need to check if they do go to these grade in
the new
school before we count it.
If a respondent did not have a parent interview in R1, we lack information on
the number of schools
attended prior to R1 (if they were enr in a grade>7 in R1). Those respondents
receive a -4 in R1
and a -3 in all subsequent rounds for the CVs.
The variables created are as following:
NUMS: Total number of regular schools that youth attended as of the survey date
of round 6.
NUMJ: Total number of regular schools that youth attended as of June 30, 2002.
NOTE: Unlike rounds 2-3, in round 4 no grade was read in from previous rounds (in prior numschool CV programs this variable is called "symgrd" and come from symbol!Cur!Firstgrade.01.01). IN the present round the first grade from the loop question (S841611) is properly used where "symgrd" was used in the past.
array
STARTM START1M START2M START3M START4M START5M START6M;
array
STARTY START1Y START2Y START3Y START4Y START5Y START6Y;
array
START START1-START6;
array
ROUND ROUND1-ROUND6;
array
SCHID SCHID1-SCHID6;
array
DUMGRD DUMGRD1-DUMGRD6;
array
AGAIN AGAIN1-AGAIN6;
/*First, create the dummy variable for each school to indicate if the youth attended grade 7
through grade 12 in that school.
NOTE: The order to give dummies is very important here, That is, we should give dummy=-3 first,
then give dummy=1, this way, we won't miss the school as long as one the grades the kids attend in
that school is between 7 and 12.
DUMGRD1-DUMGRD6= dummy to indicate whether R attended grades 7-12 in schools 1-6
AGAIN1-AGAIN6=dummy to indicate whether school 1-6 is the same school as one already recorded, to avoid
overcounts
STARTM/Y=start date for a given school*/
do I=1 to 6;
DUMGRD[I]=0;
START[I]=-4;
end;
/* R6 reads-in a grade from the prior round, but no special treatment is necessary */
IF (-3<=S841611<=-1 OR -3<=S9589111<=-1
OR -3<=S9589112<=-1 OR -3<=S9589113<=-1 OR -3<=S9589114<=-1 or -3<=S9589115<=-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<=S9589214<=-1 ) OR
-3<=S841622<=-1 THEN DUMGRD2=-3;
IF (-3<=S841631<=-1 OR -3<=S9589311<=-1 or -3<=S9589312<=-1 or -3<S9589313<=-1 )
THEN DUMGRD3=-3;
IF (-3<=S841641<=-1 OR -3<=S9589411<=-1 or -3<=S9589412<=-1 ) THEN DUMGRD4=-3;
IF (7<=S841611<=12 OR 7<=S9589111<=12 OR 7<=S9589112<=12 OR 7<=S9589113<=12 OR
7<=S9589114<=12 or 7<=S9589115<=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<=S9589214<=12 ) OR
7<=S841622<=12 THEN DUMGRD2=1;
IF (7<=S841631<=12 OR 7<=S9589311<=12 or 7<=S9589312<=12 or 7<=S9589313<=12)
THEN DUMGRD3=1;
IF (7<=S841641<=12 OR 7<=S9589411<=12 or 7<=S9589412<=12) THEN DUMGRD4=1;
/*create a flag (again 1-6) 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 6;
again(i)=0;
end;
do i=1 to 6;
if i=6 and schid(i)>0 and dumgrd(i)=1 and dumgrd(i-5)=1 and schid(i)=schid(i-5) then again(i)=1;
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-startdm6;
do i=1 to 6;
if starty[i]>0 or starty[i] in (-1,-2,-3) then startdm[i]=1;
else startdm[i]=0;
end;
/*Next, calculate NUMJR6 and NUMR6.*/
/* Calculate the accumulated month of the start date. */
do I=1 to 6;
if STARTY[I]>0 and STARTM[I]>0 then START[I]=12*(STARTY[I]-1990)+STARTM[I];
end;
NUMJR6=0;
NUMR6=0;
/**** count the new schools for all the cases.*****/
do I=1 to 6;
if ROUND[I]=6 and again(i)=0 then do;
if DUMGRD[I]=1 then NUMR6=NUMR6+1;
if DUMGRD[I]=1 and (0<START[I]<=150 OR 0<STARTY[I]<2002) then NUMJR6=NUMJR6+1;
end;
end;
if -3<=round1<=-1 or -3<=round2<=-1 or -3<=round3<=-1 or -3<=round4<=-1 or -3<=round5<=-1 or -3<=round6<=-1
then do;
numr6=-3;
numjr6=-3;
end;
/**** If the respondent is not interviewed in round 5 and has no number of schools info. in
previous rounds, or if number of school info. in round 5 is in (0,-4), then count all the schools.
That is, for these people, the above count will be overwritten.****/
flagprev=0;
flagprev=0;
if (numr5=-5 and numr4 in (0,-4,-5) and
numr3 in (0,-4,-5) and numr2 in (0,-4,-5) and numr1 in (0,-4)) or numr5 in (0,
-4) then do;
numr6=0;
numjr6=0;
flagprev=1;
do i=1 to 6;
if DUMGRD[I]=1 and again(i)=0 then NUMR6=NUMR6+1;
if DUMGRD[I]=1 and again(i)=0 and (0<START[I]<=150 OR 0<STARTY[I]<2002 or (round[i] in (1,2,3,4) and
again(i)=0)) then NUMJR6=NUMJR6+1;
end;
end;
if DUMGRD1=-3 OR DUMGRD2=-3 OR DUMGRD3=-3 OR DUMGRD4=-3 OR DUMGRD5=-3 OR DUMGRD6=-3 then do;
NUMR6=-3;
NUMJR6=-3;
end;
if (ROUND1=6 and AGAIN1 =0 and DUMGRD1=1 and ((START1Y=2002 and -4<START1M<0) OR -4<START1Y<0)) OR
(ROUND2=6 and AGAIN2 =0 and DUMGRD2=1 and ((START2Y=2002 and -4<START2M<0) OR -4<START2Y<0)) OR
(ROUND3=6 and AGAIN3 =0 and DUMGRD3=1 and ((START3Y=2002 and -4<START3M<0) OR -4<START3Y<0)) OR
(ROUND4=6 and AGAIN4 =0 and DUMGRD4=1 and ((START4Y=2002 and -4<START4M<0) OR -4<START4Y<0)) OR
(ROUND5=6 and AGAIN5 =0 and DUMGRD5=1 and ((START5Y=2002 and -4<START5M<0) OR -4<START5Y<0)) OR
(ROUND6=6 and AGAIN6 =0 and DUMGRD6=1 and ((START6Y=2002 and -4<START6M<0) OR -4<START6Y<0))
then NUMJR6=-3;
/*We then add the above two numbers to the corresponding variables from round 1 to round 5.*/
if NUMR5>=0 then do;
if NUMJR6>=0 then NUMJ=NUMJR6+NUMR5;
if NUMR6>=0 then NUMS=NUMR6+NUMR5;
end;
if NUMR5=-4 and HGAR5<7 then do;
if NUMJR6>=0 then NUMJ=NUMJR6;
if NUMR6>=0 then NUMS=NUMR6;
end;
IF NUMR5=-5 THEN DO;
IF NUMR4>=0 THEN DO;
IF NUMJR6>=0 THEN NUMJ=NUMJR6+NUMR4;
IF NUMR6>=0 THEN NUMS=NUMR6+NUMR4;
END;
ELSE IF NUMR4<0 and NUMR3>=0 THEN DO;
IF NUMJR6>=0 THEN NUMJ=NUMJR6+NUMR3;
IF NUMR6>=0 THEN NUMS=NUMR6+NUMR3;
END;
ELSE IF NUMR3<0 and NUMR2>=0 THEN DO;
IF NUMJR6>=0 THEN NUMJ=NUMJR6+NUMR2;
IF NUMR6>=0 THEN NUMS=NUMR6+NUMR2;
END;
ELSE IF NUMR1>=0 AND NUMR2<0 THEN DO;
IF NUMJR6>=0 THEN NUMJ=NUMJR6+NUMR1;
IF NUMR6>=0 THEN NUMS=NUMR6+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 6 >= 7, we use the number from round 6 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 6 are <7, we use -4 for the total number.*/
if NUMR1 in (0,-4) then do;
if CURGDR1<=7 then do;
NUMJ=NUMJR6;
NUMS=NUMR6;
end;
if CURGDR1>7 or NUMR1 in (-1,-2,-3) then do;
NUMJ=-3;
NUMS=-3;
end;
if CURGDR1<7 and HGAR6<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 NUMR4=-3 OR NUMJR5=-3 OR NUMJR6=-3 then NUMJ=-3;
if -3<=NUMR1<=-1 OR -3<=NUMR2<=-1 OR NUMR3=-3 OR NUMR4=-3 OR NUMR5=-3 OR NUMR6=-3 then NUMS=-3;
if HGAR6<7 then do;
numj=-4;
nums=-4;
end;
if S826311=-5 then do;
NUMJR6=-5;
NUMR6=-5;
NUMJ=-5;
NUMS=-5;
end;
endsas;
Variables Created:
CV_BA_CREDITS.01-.05
CV_ASSOC_CREDITS.01-.05
Variables Used
|
Name in Program |
Question Name on CD |
Name in Program |
Question Name on CD |
|
| r1231001 | YSCH_23100_01_1997 | r1_asct | CV_ASSOC_CREDITS_1997 | |
| r1232001 | YSCH_23200_01_1997 | r1_bact | CV_BA_CREDITS_1997 | |
| r1233001 | YSCH_23300_01_1997 | r1_int | CV_INTERVIEW_CMONTH_1997 | |
| r1234001 | YSCH_23400_01_1997 | r2pubid1 | NEWSCHOOL_PUBID_01_1998 | |
| r2231001 | YSCH_23100_01_1998 | r2pubid2 | NEWSCHOOL_PUBID_02_1998 | |
| r2231002 | YSCH_23100_02_1998 | r2pubid3 | NEWSCHOOL_PUBID_03_1998 | |
| r2231003 | YSCH_23100_03_1998 | r2pubid4 | NEWSCHOOL_PUBID_04_1998 | |
| r2231004 | YSCH_23100_04_1998 | r2pubid5 | NEWSCHOOL_PUBID_05_1998 | |
| r2232001 | YSCH_23200_01_1998 | r2pubid6 | NEWSCHOOL_PUBID_06_1998 | |
| r2232002 | YSCH_23200_02_1998 | r2_asct1 | CV_ASSOC_CREDITS_01_1998 | |
| r2232003 | YSCH_23200_03_1998 | r2_asct2 | CV_ASSOC_CREDITS_02_1998 | |
| r2232004 | YSCH_23200_04_1998 | r2_asct3 | CV_ASSOC_CREDITS_03_1998 | |
| r2232005 | YSCH_23200_05_1998 | r2_asct4 | CV_ASSOC_CREDITS_04_1998 | |
| r2233001 | YSCH_23300_01_1998 | r2_asct5 | CV_ASSOC_CREDITS_05_1998 | |
| r2233002 | YSCH_23300_02_1998 | r2_bact1 | CV_BA_CREDITS_01_1998 | |
| r2233003 | YSCH_23300_03_1998 | r2_bact2 | CV_BA_CREDITS_02_1998 | |
| r2234001 | YSCH_23400_01_1998 | r2_bact3 | CV_BA_CREDITS_03_1998 | |
| r2234002 | YSCH_23400_02_1998 | r2_bact4 | CV_BA_CREDITS_04_1998 | |
| r2234003 | YSCH_23400_03_1998 | r2_bact5 | CV_BA_CREDITS_05_1998 | |
| r2234004 | YSCH_23400_04_1998 | r2_int | CV_INTERVIEW_CMONTH_1998 | |
| r2234005 | YSCH_23400_05_1998 | r3pubid1 | NEWSCHOOL_PUBID_01_1999 | |
| r3231001 | YSCH_23100_01_1999 | r3pubid2 | NEWSCHOOL_PUBID_02_1999 | |
| r3231002 | YSCH_23100_02_1999 | r3pubid3 | NEWSCHOOL_PUBID_03_1999 | |
| r3231003 | YSCH_23100_03_1999 | r3pubid4 | NEWSCHOOL_PUBID_04_1999 | |
| r3232001 | YSCH_23200_01_1999 | r3pubid5 | NEWSCHOOL_PUBID_05_1999 | |
| r3232002 | YSCH_23200_02_1999 | r3pubid6 | NEWSCHOOL_PUBID_06_1999 | |
| r3232003 | YSCH_23200_03_1999 | r3pubid7 | NEWSCHOOL_PUBID_07_1999 | |
| r3232004 | YSCH_23200_04_1999 | r3_asct1 | CV_ASSOC_CREDITS_01_1999 | |
| r3233001 | YSCH_23300_01_1999 | r3_asct2 | CV_ASSOC_CREDITS_02_1999 | |
| r3233002 | YSCH_23300_02_1999 | r3_asct3 | CV_ASSOC_CREDITS_03_1999 | |
| r3233003 | YSCH_23300_03_1999 | r3_asct5 | CV_ASSOC_CREDITS_05_1999 | |
| r3234001 | YSCH_23400_01_1999 | r3_bact1 | CV_BA_CREDITS_01_1999 | |
| r3234002 | YSCH_23400_02_1999 | r3_bact2 | CV_BA_CREDITS_02_1999 | |
| r3234003 | YSCH_23400_03_1999 | r3_bact3 | CV_BA_CREDITS_03_1999 | |
| r3234004 | YSCH_23400_04_1999 | r3_bact4 | CV_BA_CREDITS_04_1999 | |
| r4231001 | YSCH_23100_01_2000 | r3_bact5 | CV_BA_CREDITS_05_1999 | |
| r4231002 | YSCH_23100_02_2000 | r3_int | CV_INTERVIEW_CMONTH_1999 | |
| r4231003 | YSCH_23100_03_2000 | r4pubid1 | NEWSCHOOL_PUBID_01_2000 | |
| r4231004 | YSCH_23100_04_2000 | r4pubid2 | NEWSCHOOL_PUBID_02_2000 | |
| r4232001 | YSCH_23200_01_2000 | r4pubid3 | NEWSCHOOL_PUBID_03_2000 | |
| r4232002 | YSCH_23200_02_2000 | r4pubid4 | NEWSCHOOL_PUBID_04_2000 | |
| r4232003 | YSCH_23200_03_2000 | r4pubid5 | NEWSCHOOL_PUBID_05_2000 | |
| r4232004 | YSCH_23200_04_2000 | r4_asct1 | CV_ASSOC_CREDITS_01_2000 | |
| r4233001 | YSCH_23300_01_2000 | r4_asct2 | CV_ASSOC_CREDITS_02_2000 | |
| r4233002 | YSCH_23300_02_2000 | r4_asct3 | CV_ASSOC_CREDITS_03_2000 | |
| r4233003 | YSCH_23300_03_2000 | r4_asct4 | CV_ASSOC_CREDITS_04_2000 | |
| r4233004 | YSCH_23300_04_2000 | r4_bact1 | CV_BA_CREDITS_01_2000 | |
| r4234001 | YSCH_23400_01_2000 | r4_bact2 | CV_BA_CREDITS_02_2000 | |
| r4234002 | YSCH_23400_02_2000 | r4_bact3 | CV_BA_CREDITS_03_2000 | |
| r4234003 | YSCH_23400_03_2000 | r4_bact4 | CV_BA_CREDITS_04_2000 | |
| r4234004 | YSCH_23400_04_2000 | r4_int | CV_INTERVIEW_CMONTH_2000 | |
| r5231001 | YSCH_23100_01_2001 | r5pubid1 | NEWSCHOOL_PUBID_01_2001 | |
| r5231002 | YSCH_23100_02_2001 | r5pubid2 | NEWSCHOOL_PUBID_02_2001 | |
| r5231003 | YSCH_23100_03_2001 | r5pubid3 | NEWSCHOOL_PUBID_03_2001 | |
| r5231004 | YSCH_23100_04_2001 | r5pubid4 | NEWSCHOOL_PUBID_04_2001 | |
| r5231005 | YSCH_23100_05_2001 | r5pubid5 | NEWSCHOOL_PUBID_05_2001 | |
| r5232001 | YSCH_23200_01_2001 | r5pubid6 | NEWSCHOOL_PUBID_06_2001 | |
| r5232002 | YSCH_23200_02_2001 | r5_asct1 | CV_ASSOC_CREDITS_01_2001 | |
| r5232003 | YSCH_23200_03_2001 | r5_asct2 | CV_ASSOC_CREDITS_02_2001 | |
| r5232004 | YSCH_23200_04_2001 | r5_asct3 | CV_ASSOC_CREDITS_03_2001 | |
| r5232005 | YSCH_23200_05_2001 | r5_asct4 | CV_ASSOC_CREDITS_04_2001 | |
| r5232006 | YSCH_23200_06_2001 | r5_asct5 | CV_ASSOC_CREDITS_05_2001 | |
| r5233001 | YSCH_23300_01_2001 | r5_asct6 | CV_ASSOC_CREDITS_06_2001 | |
| r5233002 | YSCH_23300_02_2001 | r5_bact1 | CV_BA_CREDITS_01_2001 | |
| r5233003 | YSCH_23300_03_2001 | r5_bact2 | CV_BA_CREDITS_02_2001 | |
| r5233004 | YSCH_23300_04_2001 | r5_bact3 | CV_BA_CREDITS_03_2001 | |
| r5233005 | YSCH_23300_05_2001 | r5_bact4 | CV_BA_CREDITS_04_2001 | |
| r5234001 | YSCH_23400_01_2001 | r5_bact5 | CV_BA_CREDITS_05_2001 | |
| r5234002 | YSCH_23400_02_2001 | r5_bact6 | CV_BA_CREDITS_06_2001 | |
| r5234003 | YSCH_23400_03_2001 | r5_int | CV_INTERVIEW_CMONTH_2001 | |
| r1229001 | YSCHH_22900_01_1997 | r268271 | YSCH_26827_01_2002 | |
| r2273371 | YSCH_27337_01_1998 | r268272 | YSCH_26827_02_2002 | |
| r2273372 | YSCH_27337_02_1998 | r268273 | YSCH_26827_03_2002 | |
| r2273373 | YSCH_27337_03_1998 | r268274 | YSCH_26827_04_2002 | |
| r2273374 | YSCH_27337_04_1998 | r268275 | YSCH_26827_05_2002 | |
| r2273375 | YSCH_27337_05_1998 | r6pubid1 | NEWSCHOOL_PUBID_01_2002 | |
| r2273881 | YSCH_27388_01_1998 | r6pubid2 | NEWSCHOOL_PUBID_02_2002 | |
| r2273882 | YSCH_27388_02_1998 | r6pubid3 | NEWSCHOOL_PUBID_03_2002 | |
| r2273883 | YSCH_27388_03_1998 | r6pubid4 | NEWSCHOOL_PUBID_04_2002 | |
| r2273884 | YSCH_27388_04_1998 | pubid | PUBID | |
| r2273885 | YSCH_27388_05_1998 | e273374 | YSCH_27337_04_2002 | |
| r2229001 | YSCH_22900_01_1998 | e273375 | YSCH_27337_05_2002 | |
| r2229002 | YSCH_22900_02_1998 | e16200 | YSCH_16200_01_2002 | |
| r2229003 | YSCH_22900_03_1998 | e172001 | YSCH_17200_01_2002 | |
| r2229004 | YSCH_22900_04_1998 | e265211 | YSCH_26521_01_2002 | |
| r2229005 | YSCH_22900_05_1998 | e265212 | YSCH_26521_02_2002 | |
| r2234501 | YSCH_23450_01_1998 | e265213 | YSCH_26521_03_2002 | |
| r2234502 | YSCH_23450_02_1998 | e265214 | YSCH_26521_04_2002 | |
| r2234503 | YSCH_23450_03_1998 | e265215 | YSCH_26521_05_2002 | |
| r2234504 | YSCH_23450_04_1998 | apcred1 | YSCH_26878_01_2002 | |
| r3273371 | YSCH_27337_01_1999 | apcred2 | YSCH_26878_02_2002 | |
| r3273372 | YSCH_27337_02_1999 | apcred3 | YSCH_26878_03_2002 | |
| r3273373 | YSCH_27337_03_1999 | apcred4 | YSCH_26878_04_2002 | |
| r3273374 | YSCH_27337_04_1999 | apcred5 | YSCH_26878_05_2002 | |
| r3273375 | YSCH_27337_05_1999 | hscred1 | YSCH_26929_01_2002 | |
| r3273881 | YSCH_27388_01_1999 | hscred2 | YSCH_26929_02_2002 | |
| r3273882 | YSCH_27388_02_1999 | hscred3 | YSCH_26929_03_2002 | |
| r3273883 | YSCH_27388_03_1999 | hscred4 | YSCH_26929_04_2002 | |
| r3273884 | YSCH_27388_04_1999 | hscred5 | YSCH_26929_05_2002 | |
| r3273885 | YSCH_27388_05_1999 | e273881 | YSCH_27388_01_2002 | |
| r3229001 | YSCH_22900_01_1999 | e273882 | YSCH_27388_02_2002 | |
| r3229002 | YSCH_22900_02_1999 | e273883 | YSCH_27388_03_2002 | |
| r3229003 | YSCH_22900_03_1999 | e273884 | YSCH_27388_04_2002 | |
| r3229004 | YSCH_22900_04_1999 | e273885 | YSCH_27388_05_2002 | |
| r3234501 | YSCH_23450_01_1999 | e2070011 | YSCH_20700_01_01_2002 | |
| r3234502 | YSCH_23450_02_1999 | e2070012 | YSCH_20700_01_02_2002 | |
| r3234503 | YSCH_23450_03_1999 | e2070013 | YSCH_20700_01_03_2002 | |
| r4273371 | YSCH_27337_01_2000 | e2070014 | YSCH_20700_01_04_2002 | |
| r4273372 | YSCH_27337_02_2000 | e2070015 | YSCH_20700_01_05_2002 | |
| r4273373 | YSCH_27337_03_2000 | e2070016 | YSCH_20700_01_06_2002 | |
| r4273374 | YSCH_27337_04_2000 | e2070017 | YSCH_20700_01_07_2002 | |
| r4273881 | YSCH_27388_01_2000 | e2070018 | YSCH_20700_01_08_2002 | |
| r4273882 | YSCH_27388_02_2000 | e2070019 | YSCH_20700_01_09_2002 | |
| r4273883 | YSCH_27388_03_2000 | e20700110 | YSCH_20700_01_10_2002 | |
| r4273884 | YSCH_27388_04_2000 | e20700111 | YSCH_20700_01_11_2002 | |
| r4273901 | YSCH_27390_01_2000 | e2070021 | YSCH_20700_02_01_2002 | |
| r4273902 | YSCH_27390_02_2000 | e2070022 | YSCH_20700_02_02_2002 | |
| r4273903 | YSCH_27390_03_2000 | e2070023 | YSCH_20700_02_03_2002 | |
| r4273904 | YSCH_27390_04_2000 | e2070024 | YSCH_20700_02_04_2002 | |
| r4229001 | YSCH_22900_01_2000 | e2070025 | YSCH_20700_02_05_2002 | |
| r4229002 | YSCH_22900_02_2000 | e2070026 | YSCH_20700_02_06_2002 | |
| r4229003 | YSCH_22900_03_2000 | e2070027 | YSCH_20700_02_07_2002 | |
| r4229004 | YSCH_22900_04_2000 | e2070028 | YSCH_20700_02_08_2002 | |
| r4234501 | YSCH_23450_01_2000 | e2070029 | YSCH_20700_02_09_2002 | |
| r4234502 | YSCH_23450_02_2000 | e20700210 | YSCH_20700_02_10_2002 | |
| r4234503 | YSCH_23450_03_2000 | e20700211 | YSCH_20700_02_11_2002 | |
| r5273371 | YSCH_27337_01_2001 | e2070031 | YSCH_20700_03_01_2002 | |
| r5273372 | YSCH_27337_02_2001 | e2070032 | YSCH_20700_03_02_2002 | |
| r5273373 | YSCH_27337_03_2001 | e2070033 | YSCH_20700_03_03_2002 | |
| r5273374 | YSCH_27337_04_2001 | e2070034 | YSCH_20700_03_04_2002 | |
| r5273375 | YSCH_27337_05_2001 | e2070041 | YSCH_20700_04_01_2002 | |
| r5273376 | YSCH_27337_06_2001 | e2070042 | YSCH_20700_04_02_2002 | |
| r5273881 | YSCH_27388_01_2001 | e2070051 | YSCH_20700_05_01_2002 | |
| r5273882 | YSCH_27388_02_2001 | e228001 | YSCH_22800_01_2002 | |
| r5273883 | YSCH_27388_03_2001 | e228002 | YSCH_22800_02_2002 | |
| r5273884 | YSCH_27388_04_2001 | e228003 | YSCH_22800_03_2002 | |
| r5273885 | YSCH_27388_05_2001 | e228004 | YSCH_22800_04_2002 | |
| r5273886 | YSCH_27388_06_2001 | e228005 | YSCH_22800_05_2002 | |
| r5229001 | YSCH_22900_01_2001 | e230001 | YSCH_23000_01_2002 | |
| r5229002 | YSCH_22900_02_2001 | e230002 | YSCH_23000_02_2002 | |
| r5229003 | YSCH_22900_03_2001 | e230003 | YSCH_23000_03_2002 | |
| r5229004 | YSCH_22900_04_2001 | e230004 | YSCH_23000_04_2002 | |
| r5229005 | YSCH_22900_05_2001 | e231001 | YSCH_23100_01_2002 | |
| r5229006 | YSCH_22900_06_2001 | e231002 | YSCH_23100_02_2002 | |
| r5234501 | YSCH_23450_01_2001 | e231003 | YSCH_23100_03_2002 | |
| r5234502 | YSCH_23450_02_2001 | e231004 | YSCH_23100_04_2002 | |
| r5234503 | YSCH_23450_03_2001 | e232001 | YSCH_23200_01_2002 | |
| r5234504 | YSCH_23450_04_2001 | e232002 | YSCH_23200_02_2002 | |
| r5234505 | YSCH_23450_05_2001 | e232003 | YSCH_23200_03_2002 | |
| r5234506 | YSCH_23450_06_2001 | e232004 | YSCH_23200_04_2002 | |
| r6229001 | YSCH_22900_01_2002 | e232005 | YSCH_23200_05_2002 | |
| r6229002 | YSCH_22900_02_2002 | e233001 | YSCH_23300_01_2002 | |
| r6229003 | YSCH_22900_03_2002 | e233002 | YSCH_23300_02_2002 | |
| r6229004 | YSCH_22900_04_2002 | e233003 | YSCH_23300_03_2002 | |
| r6229005 | YSCH_22900_05_2002 | e233004 | YSCH_23300_04_2002 | |
| r6234501 | YSCH_23450_01_2002 | e234001 | YSCH_23400_01_2002 | |
| r6234502 | YSCH_23450_02_2002 | e234002 | YSCH_23400_02_2002 | |
| r6234503 | YSCH_23450_03_2002 | e234003 | YSCH_23400_03_2002 | |
| r6234505 | YSCH_23450_05_2002 | e234004 | YSCH_23400_04_2002 |
This program calculates fraction of
credits earned toward a bachelor's degree
(CV_BA_CREDITS)
and fraction of credits earned toward a associate's degree (CV_ASSOC_CREDITS)
for round 6.
/* arrays for Rounds 1-5 */
array r2_asct (i) r2_asct1-r2_asct5 ;
/* fraction of credits earned for round2*/
array r2_bact (i) r2_bact1-r2_bact5 ; /* fraction of credits earned for round2*/
array r3_asct (i) r3_asct1-r3_asct5 ; /* fraction of credits earned for round3*/
array r3_bact (i) r3_bact1-r3_bact5 ; /* fraction of credits earned for round3*/
array r4_asct (i) r4_asct1-r4_asct4 ; /* fraction of credits earned for round4*/
array r4_bact (i) r4_bact1-r4_bact4 ; /* fraction of credits earned for round4*/
array r5_asct (i) r5_asct1-r5_asct6 ; /* fraction of credits earned for round5*/
array r5_bact (i) r5_bact1-r5_bact6 ; /* fraction of credits earned for round5*/
array r227388 (i) r2273881-r2273885 ; /* total credits needed for graduation */
array r327388 (i) r3273881-r3273885 ; /* total credits needed for graduation */
array r427388 (i) r4273881-r4273884 ; /* total credits needed for graduation */
array r527388 (i) r5273881-r5273886 ; /* total credits needed for graduation */
array r2tasct (i) r2tasct1-r2tasct5 ; /* total credits (not the fraction) earned
with DLI schools */
array r2tbact (i) r2tbact1-r2tbact5 ; /* total credits (not the fraction) earned
with DLI schools */
array r3tasct (i) r3tasct1-r3tasct5 ; /* total credits (not the fraction) earned
with DLI schools */
array r3tbact (i) r3tbact1-r3tbact5 ; /* total credits (not the fraction) earned
with DLI schools */
array r4tasct (i) r4tasct1-r4tasct4 ; /* total credits (not the fraction) earned
with DLI schools */
array r4tbact (i) r4tbact1-r4tbact4 ; /* total credits (not the fraction) earned
with DLI schools */
array r5tasct (i) r5tasct1-r5tasct6 ; /* total credits (not the fraction) earned
with DLI schools */
array r5tbact (i) r5tbact1-r5tbact6 ; /* total credits (not the fraction) earned
with DLI schools */
/* arrarys for Round 6 */
array e23000 (i) e230001-e230005 ; /*
refer to case 1 notes below*/
array e22800 (i) e228001-e228005 ; /* refer to case 1 notes below */
array e27337 (i) e273371-e273375 ; /* what type of diploma */
array e27388 (i) e273881-e273885 ; /* total credits required to earn the degree
*/
array e26521 (i) e265211-e265215 ; /* refer to case 2 notes below*/
array xcred (i) xcred1-xcred5 ; /* transfer credits */
array apcred (i) apcred1-apcred5 ; /* test credits */
array hscred (i) hscred1-hscred5 ; /* credits from highschool */
array tcred (i) tcred1-tcred5 ; /* total credits (not fraction) earned */
array r6tbac (i) r6tbac1-r6tbac5 ; /* total credits (not fraction) earned
towards BA degree */
array r6tasc (i) r6tasc1-r6tasc5 ; /* total credits (not fraction) earned
towards assoc degree */
array asfrac (i) asfrac1-asfrac5 ; /* Created variable fraction credits earned
for associate credits */
array bafrac (i) bafrac1-bafrac5 ; /* Created variable fraction credits earned
for bachelor credits */
array e23200 (i) e232001-e232005 ; /* respondent needs no more credits if 1,
more credits are needed if 0 */
array e23400 (i) e234001-e234004 ; /* how many credits still needed */
/* 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 Round 2
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).
Case 1: If the respondent completed any terms, we use YSCH-22800 or YSCH-23000.
Case 2: If the respondent has not completed any terms and reported a new school,
then we use the incoming credits (YSCH-26521).For school #1 use YSCH-16200.
Case 3: If the respondent has not completed any terms and reported a dli school,
then we use the total credit from the dli round
(through the PUBID match variable described below). */
array r6cred (i) r6cred1-r6cred5; /* credits earned with Case 1 */
do i=1 to 5;
if E22800>-4 then do;
TCRED=E22800;
r6cred=1;
end;
if E23000>-4 then do;
TCRED=E23000;
r6cred=1;
end;
end;
/* Check for people who attended college but were skipped out of
YSCH-22800 and YSCH-23000 (because of no completed terms). */
array noterm (i) noterm1-noterm6;
do i=1 to 5;
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 (that is CASE 2)
and the created variable from their DLI round (that is CASE 3).
These two pieces of data are exclusive. */
do i=1 to 6;
if noterm=1 and (r5_bact>0 or r5_asct>0) then do;
back5=1;
end;
end;
do i=1 to 4;
if noterm=1 and (r4_bact>0 or r4_asct>0) and r5_int=-5 then do;
back4=1;
end;
end;
do i=1 to 5;
if noterm=1 and (r3_bact>0 or r3_asct>0) and r5_int=-5 and r4_int=-5 then do;
back3=1;
end;
end;
do i=1 to 5;
if noterm=1 and (r2_bact>0 or r2_asct>0)and r5_int=-5 and r4_int=-5 and
r3_int=-5 then do;
back2=1;
end;
end;
array flag (i) flag1-flag5;
/*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,
and AP credits. When the sum of the three components doesn't equal the answer in
YSCH-26521, flag=1.*/
/* Regarding round 6,
17 at loop 1, 127 at loop 2, 19 at loop 3, 1 at loop 4 and 0 at loops 5 have
flag=1.
*/
do i=1 to 5;
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;
do i=1 to 5;
if flag=1 then do;
flagcheck=1;
end;
end;
/* Case 2: 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-incred6; /* credits earned with Case 2 */
do i=1 to 5;
if e26521>-4 and e22800=-4 and e23000=-4 then do;
tcred=e26521;
incred=1;
end;
end;
/* YSCH-16200 only applies to school #1. It is an incoming credits question,
and is only used when YSCH-22800 and YSCH-23000 are valid skipped. */
if e16200>-4 and e228001=-4 and e230001=-4 then do;
tcred1=e16200;
end;
/* Case 3: The last data source for credits are from previous rounds.
Begin by matching Round 6 colleges to dli colleges using the schools' pubid.
Note that this is only used when there are no completed terms in Round 6 (and
thus no answer to YSCH-22800)
and this school is a dli school (thus no answer to YSCH-26521). */
/* Define r55m13 as the dummy variable that equals one when the 1st college
on the Round5 school roster and 3rd college on the Round6 roster have the same
PUBID.
Define r45m14 as the dummy variable that equals one when the 1st college on the
Round5
school roster and the 4th college on the Round6 roster have the same PUBID.
The "35" match variables require that R missed the Round 6 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. */
array r55m1 (i) r55m11-r55m16;
array r55m2 (i) r55m21-r55m26;
array r55m3 (i) r55m31-r55m36;
array r55m4 (i) r55m41-r55m46;
array r55m5 (i) r55m51-r55m56;
array r55m6 (i) r55m61-r55m66;
array r45m1 (i) r45m11-r45m16;
array r45m2 (i) r45m21-r45m26;
array r45m3 (i) r45m31-r45m36;
array r45m4 (i) r45m41-r45m46;
array r45m5 (i) r45m51-r45m56;
array r35m1 (i) r35m11-r35m16;
array r35m2 (i) r35m21-r35m26;
array r35m3 (i) r35m31-r35m36;
array r35m4 (i) r35m41-r35m46;
array r35m5 (i) r35m51-r35m56;
array r35m6 (i) r35m61-r35m66;
array r25m1 (i) r25m11-r25m16;
array r25m2 (i) r25m21-r25m26;
array r25m3 (i) r25m31-r25m36;
array r25m4 (i) r25m41-r25m46;
array r25m5 (i) r25m51-r25m56;
array r25m6 (i) r25m61-r25m66;
array r2pub (i) r2pubid1-r2pubid6; /*school pubic id for round 2*/
array r3pub (i) r3pubid1-r3pubid6; /*school pubic id for round 3*/
array r4pub (i) r4pubid1-r4pubid5; /*school pubic id for round 4*/
array r5pub (i) r5pubid1-r5pubid6; /*school pubic id for round 5*/
array r6pub (i) r6pubid1-r6pubid6; /*school pubic id for round 6*/
do i=1 to 6;
r55m1=0; r55m2=0; r55m3=0; r55m4=0; r55m5=0; r55m6=0;
r45m1=0; r45m2=0; r45m3=0; r45m4=0; r45m5=0;
r35m1=0; r35m2=0; r35m3=0; r35m4=0; r35m5=0; r35m6=0;
r25m1=0; r25m2=0; r25m3=0; r25m4=0; r25m5=0; r25m6=0;
end;
/* If any PUBID from the 1st position in Round 2/3/4/5 matches with any PUBID in
Round 6 */
do over r6pub;
if r5pubid1>0 and r6pub>0 and r5_int>0 then do;
if r5pubid1=r6pub then do;
r55m1=1;
end;
end;
if r4pubid1>0 and r6pub>0 and r4_int>0 and r5_int=-5 then do;
if r4pubid1=r6pub then do;
r45m1=1;
end;
end;
if r3pubid1>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int>0 then do;
if r3pubid1=r6pub then do;
r35m1=1;
end;
end;
if r2pubid1>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int=-5 and r2_int>0
then do;
if r2pubid1=r6pub then do;
r25m1=1;
end;
end;
end;
/* If any PUBID from the 2nd position in Round 2/3/4 matches with any PUBID in
Round 6 */
do over r6pub;
if r5pubid2>0 and r6pub>0 and r5_int>0 then do;
if r5pubid2=r6pub then do;
r55m2=1;
end;
end;
if r4pubid2>0 and r6pub>0 and r5_int=-5 and r4_int>0 then do;
if r4pubid2=r6pub then do;
r45m2=1;
end;
end;
if r3pubid2>0 and r6pub>0 and r4_int=-5 and r5_int=-5 and r3_int>0 then do;
if r3pubid2=r6pub then do;
r35m2=1;
end;
end;
if r2pubid2>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int=-5 and r2_int>0
then do;
if r2pubid2=r6pub then do;
r25m2=1;
end;
end;
end;
/*If any PUBID from the 3rd position in Round 2/3/4/5 matches with any PUBID in
Round 6 */
do over r6pub;
if r5pubid3>0 and r6pub>0 and r5_int>0 then do;
if r5pubid3=r6pub then do;
r55m3=1;
end;
end;
if r4pubid3>0 and r5pub>0 and r5_int=-5 and r4_int>0 then do;
if r4pubid3=r6pub then do;
r45m3=1;
end;
end;
if r3pubid3>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int>0 then do;
if r3pubid3=r6pub then do;
r35m3=1;
end;
end;
if r2pubid3>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int=-5 and r2_int>0
then do;
if r2pubid3=r5pub then do;
r25m3=1;
end;
end;
end;
/* If any PUBID from the 4th position in Round 2/3/4 matches with any PUBID in
Round 5 */
do over r6pub;
if r5pubid4>0 and r6pub>0 and r5_int>0 then do;
if r5pubid4=r6pub then do;
r55m4=1;
end;
end;
if r4pubid4>0 and r6pub>0 and r5_int=-5 and r4_int>0 then do;
if r4pubid4=r6pub then do;
r45m4=1;
end;
end;
if r3pubid4>0 and r5pub>0 and r5_int=-5 and r4_int=-5 and r3_int>0 then do;
if r3pubid4=r6pub then do;
r35m4=1;
end;
end;
if r2pubid4>0 and r5pub>0 and r5_int=-5 and r4_int=-5 and r3_int=-5 and r2_int>0
then do;
if r2pubid4=r6pub then do;
r25m4=1;
end;
end;
end;
/* If any PUBID from the 5th position in Round 2/3/4/5 matches with any PUBID in
Round 6 */
do over r6pub;
if r5pubid5>0 and r6pub>0 and r5_int>0 then do;
if r5pubid5=r6pub then do;
r55m5=1;
end;
end;
if r4pubid5>0 and r6pub>0 and r5_int=-5 and r4_int>0 then do;
if r4pubid5=r6pub then do;
r45m5=1;
end;
end;
if r3pubid5>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int>0 then do;
if r3pubid5=r6pub then do;
r35m5=1;
end;
end;
if r2pubid5>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int=-5 and r2_int>0
then do;
if r2pubid5=r5pub then do;
r25m5=1;
end;
end;
end;
/* If any PUBID from the 6th position in Round 2/3/4/5 matches with any PUBID in
Round 6 */
do over r6pub;
if r5pubid6>0 and r6pub>0 and r5_int>0 then do;
if r5pubid6=r6pub then do;
r55m6=1;
end;
end;
if r4pubid6>0 and r6pub>0 and r4_int>0 then do;
if r4pubid6=r6pub then do;
r45m6=1;
end;
end;
if r3pubid6>0 and r6pub>0 and r5_int=-5 and r4_int=-5 and r3_int>0 then do;
if r3pubid6=r6pub then do;
r35m6=1;
end;
end;
if r2pubid6>0 and r5pub>0 and r5_int=-5 and r4_int=-5 and r3_int=-5 and r2_int>0
then do;
if r2pubid6=r5pub then do;
r25m6=1;
end;
end;
end;
/*Creating a dummy that equals one if any of the "match" variables
above equal one. This is just a shortcut, so I don't have to keep writing
"or match11=1 or match12=1..." anytime I want to look at people with
identical Round2 and Round3 colleges. */
same=0;
do i=1 to 6;
if r55m1=1 or r55m2=1 or r55m3=1 or r55m4=1 or r55m5=1 or r55m6=1 or
r45m1=1 or r45m2=1 or r45m3=1 or r45m4=1 or r45m5=1 or
r35m1=1 or r35m2=1 or r35m3=1 or r35m4=1 or r35m5=1 or r35m6=1 or
r25m1=1 or r25m2=1 or r25m3=1 or r25m4=1 or r25m5=1 or r25m6=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). */
/* Calculating the total credits have earned towards BA/Assoc degrees
for previous rounds, that is r2tasct r3tasct r4tasct r5tasct and r2tbact r3tbact
r4tbact r5tbact */
do i=1 to 5; /* for round 2 */
if r2_asct ge 0 then do;
r2tasct=round(r2_asct*r227388/100,1);
end;
if r2_asct lt 0 then do;
r2tasct=r2_asct;
end;
if r2_bact ge 0 then do;
r2tbact=round(r2_bact*r227388/100, 1);
end;
if r2_bact lt 0 then do;
r2tbact=r2_bact;
end;
end;
do i=1 to 5; /* for round 3 */
if r3_asct ge 0 then do;
r3tasct=round(r3_asct*r327388/100, 1);
end;
if r3_asct lt 0 then do;
r3tasct=r3_asct;
end;
if r3_bact ge 0 then do;
r3tbact=round(r3_bact*r327388/100, 1);
end;
if r3_bact lt 0 then do;
r3tbact=r3_bact;
end;
end;
do i=1 to 4; /* for round 4 */
if r4_asct ge 0 then do;
r4tasct=round(r4_asct*r427388/100, 1);
end;
if r4_asct lt 0 then do;
r4tasct=r4_asct;
end;
if r4_bact ge 0 then do;
r4tbact=round(r4_bact*r427388/100, 1);
end;
if r4_bact lt 0 then do;
r4tbact=r4_bact;
end;
end;
do i=1 to 6; /* for round 5 */
if r5_asct ge 0 then do;
r5tasct=round(r5_asct*r527388/100, 1);
end;
if r5_asct lt 0 then do;
r5tasct=r5_asct;
end;
if r5_bact ge 0 then do;
r5tbact=round(r5_bact*r527388/100, 1);
end;
if r5_bact lt 0 then do;
r5tbact=r5_bact;
end;
end;
/* Case 3: credits from DLI schools */
array dlicred (i) dlicred1-dlicred6;
do i=1 to 6;
if r2tasct1=>0 and r25m1=1 and e22800=-4 then do;
TCRED=r2tasct1;
dlicred=1;
end;
if r2tbact1=>0 and r25m1=1 and e22800=-4 then do;
TCRED=r2tbact1;
dlicred=1;
end;
if r2tasct2=>0 and r25m2=1 and e22800=-4 then do;
TCRED=r2tasct2;
dlicred=1;
end;
if r2tbact2=>0 and r25m2=1 and e22800=-4 then do;
TCRED=r2tbact2;
dlicred=1;
end;
if r2tasct3=>0 and r25m3=1 and e22800=-4 then do;
TCRED=r2tasct3;
dlicred=1;
end;
if r2tbact3=>0 and r25m3=1 and e22800=-4 then do;
TCRED=r2tbact3;
dlicred=1;
end;
if r2tasct4=>0 and r25m4=1 and e22800=-4 then do;
TCRED=r2tasct4;
dlicred=1;
end;
if r2tbact4=>0 and r25m4=1 and e22800=-4 then do;
TCRED=r2tbact4;
dlicred=1;
end;
if r2tasct5=>0 and r25m5=1 and e22800=-4 then do;
TCRED=r2tasct5;
dlicred=1;
end;
if r2tbact5=>0 and r25m5=1 and e22800=-4 then do;
TCRED=r2tbact5;
dlicred=1;
end;
if r2tasct6=>0 and r25m6=1 and e22800=-4 then do;
TCRED=r2tasct6;
dlicred=1;
end;
if r2tbact6=>0 and r25m6=1 and e22800=-4 then do;
TCRED=r2tbact6;
dlicred=1;
end;
end;
do i=1 to 6;
if r3tasct1=>0 and r35m1=1 and e22800=-4 then do;
TCRED=r3tasct1;
dlicred=1;
end;
if r3tbact1=>0 and r35m1=1 and e22800=-4 then do;
TCRED=r3tbact1;
dlicred=1;
end;
if r3tasct2=>0 and r35m2=1 and e22800=-4 then do;
TCRED=r3tasct2;
dlicred=1;
end;
if r3tbact2=>0 and r35m2=1 and e22800=-4 then do;
TCRED=r3tbact2;
dlicred=1;
end;
if r3tasct3=>0 and r35m3=1 and e22800=-4 then do;
TCRED=r3tasct3;
dlicred=1;
end;
if r3tbact3=>0 and r35m3=1 and e22800=-4 then do;
TCRED=r3tbact3;
dlicred=1;
end;
if r3tasct4=>0 and r35m4=1 and e22800=-4 then do;
TCRED=r3tasct4;
dlicred=1;
end;
if r3tbact4=>0 and r35m4=1 and e22800=-4 then do;
TCRED=r3tbact4;
dlicred=1;
end;
if r3tasct5=>0 and r35m5=1 and e22800=-4 then do;
TCRED=r3tasct5;
dlicred=1;
end;
if r3tbact5=>0 and r35m5=1 and e22800=-4 then do;
TCRED=r3tbact5;
dlicred=1;
end;
if r3tasct6=>0 and r35m6=1 and e22800=-4 then do;
TCRED=r3tasct6;
dlicred=1;
end;
if r3tbact6=>0 and r35m6=1 and e22800=-4 then do;
TCRED=r3tbact6;
dlicred=1;
end;
end;
do i=1 to 6;
if r4tasct1=>0 and r45m1=1 and e22800=-4 then do;
TCRED=r4tasct1;
dlicred=1;
end;
if r4tbact1=>0 and r45m1=1 and e22800=-4 then do;
TCRED=r4tbact1;
dlicred=1;
end;
if r4tasct2=>0 and r45m2=1 and e22800=-4 then do;
TCRED=r4tasct2;
dlicred=1;
end;
if r4tbact2=>0 and r45m2=1 and e22800=-4 then do;
TCRED=r4tbact2;
dlicred=1;
end;
if r4tasct3=>0 and r45m3=1 and e22800=-4 then do;
TCRED=r4tasct3;
dlicred=1;
end;
if r4tbact3=>0 and r45m3=1 and e22800=-4 then do;
TCRED=r4tbact3;
dlicred=1;
end;
if r4tasct4=>0 and r45m4=1 and e22800=-4 then do;
TCRED=r4tasct4;
dlicred=1;
end;
if r4tbact4=>0 and r45m4=1 and e22800=-4 then do;
TCRED=r4tbact4;
dlicred=1;
end;
if r4tasct5=>0 and r45m5=1 and e22800=-4 then do;
TCRED=r4tasct5;
dlicred=1;
end;
if r4tbact5=>0 and r45m5=1 and e22800=-4 then do;
TCRED=r4tbact5;
dlicred=1;
end;
end;
do i=1 to 6;
if r5tasct1=>0 and r55m1=1 and e22800=-4 then do;
TCRED=r5tasct1;
dlicred=1;
end;
if r5tbact1=>0 and r55m1=1 and e22800=-4 then do;
TCRED=r5tbact1;
dlicred=1;
end;
if r5tasct2=>0 and r55m2=1 and e22800=-4 then do;
TCRED=r5tasct2;
dlicred=1;
end;
if r5tbact2=>0 and r55m2=1 and e22800=-4 then do;
TCRED=r5tbact2;
dlicred=1;
end;
if r5tasct3=>0 and r55m3=1 and e22800=-4 then do;
TCRED=r5tasct3;
dlicred=1;
end;
if r5tbact3=>0 and r55m3=1 and e22800=-4 then do;
TCRED=r5tbact3;
dlicred=1;
end;
if r5tasct4=>0 and r55m4=1 and e22800=-4 then do;
TCRED=r5tasct4;
dlicred=1;
end;
if r5tbact4=>0 and r55m4=1 and e22800=-4 then do;
TCRED=r5tbact4;
dlicred=1;
end;
if r5tasct5=>0 and r55m5=1 and e22800=-4 then do;
TCRED=r5tasct5;
dlicred=1;
end;
if r5tbact5=>0 and r55m5=1 and e22800=-4 then do;
TCRED=r5tbact5;
dlicred=1;
end;
end;
array r6inerr (i) r6inerr1 - r6inerr6 ;
array r6dlierr (i) r6dlierr1 - r6dlierr6;
array indlierr (i) indlierr1 - indlierr6;
/* Check to make sure the 3 methods of collecting credits do not intersect. */
do i=1 to 5;
if r6cred=1 and incred =1 then r6inerr =1;
if r6cred=1 and dlicred=1 then r6dlierr=1;
if incred=1 and dlicred=1 then indlierr=1;
end;
/*proc freq;
tables r6inerr1 - r6inerr6 r6dlierr1 - r6dlierr6 indlierr1 - indlierr6;
endsas;*/
/* Initialize both created variables. */
do i=1 to 5;
asfrac=0;
bafrac=0;
end;
/* Associates Degree */
do i=1 to 5;
if E27337=1 and TCRED=>0 then do;
r6tasc=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 r6tasc=>0 and E27388>0 then do;
asfrac=(r6tasc/E27388)*100;
end;
asfrac=round(asfrac,1);
if e23200=1 and e27337=1 then asfrac=100; /* Respondents who say they have graduated */
end;
/* Bachelors Degree */
do i=1 to 5;
if E27337=3 and TCRED=>0 then do;
r6tbac=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 r6tbac=>0 and E27388>0 then do;
bafrac=(r6tbac/E27388)*100;
end;
bafrac=round(bafrac,1);
if e23200=1 and e27337=3 then bafrac=100; /* Respondents who say they have graduated */
end;
/* Non-interview cases */
do i=1 to 5;
if E16200=-5 then do;
bafrac=-5;
asfrac=-5;
end;
end;
/* invalid data cases */
do i=1 to 5;
if asfrac in (-2,-1) then do;
asfrac=-3;
end;
if bafrac in (-2,-1) then do;
bafrac=-3;
end;
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;
/* Checking for the cases that credit
fraction greater than 100 */
array as_over (i) as_over1 - as_over5 ;
array ba_over (i) ba_over1 - ba_over5 ;
do i=1 to 5;
as_over=0;
ba_over=0;
if asfrac>100 then as_over=1;
if bafrac>100 then ba_over=1;
if as_over=1 or ba_over=1 then over100=1;
end;
/* Checking for the cases that get 100 percent credits but say
they haven't graduated yet*/
array acheck1 (i) acheck11 - acheck16 ;
array bcheck1 (i) bcheck11 - bcheck16 ;
do i=1 to 5;
if asfrac ge 100 & e23200=0 then acheck1=1;
if bafrac ge 100 & e23200=0 then bcheck1=1;
end;
/* Checking missing asfrac and bafrac */
do i=1 to 5;
if e27337=1 and asfrac=. then acheck2=1;
if e27337=3 and bafrac=. then bcheck2=1;
end;
/* hand edit special cases */
/* Asfrac or bafrac ge 100, which means that they gained more credits than the credits required for the degree (e27388)
/* hand edit special cases */
/* need to go through some special
cases as below,
1. e27338=-2
2. e27388=0;
3. we have inconsistent information from
incoming credits for a new school (case 2) and DLI credits (case 3)
As observations with e27388=-2, we decided to leave their CV with -3.
there are two possible sources of information about the total credits required
for the degree.
(1)addu up e23400 (how many credits still needed) and the credits they have
earned
(2)for a DLI school, e27388 at round 4 .
compare these two sources, they give inconsistent results.
Thus we stick with the strategy to give a -3 if e27388 (at round 6) is -2. */
/*2*/
/*Hand edit for 273880=0 and they still not graduated and e22800>0 */
if pubid=118 then asfrac2 =-3;
if pubid=1186 then bafrac3 =-3;
/* For observations that
(a) we have both incoming credits (e26521) and DLI credits (the school is a DLI
school),
(b) credits from the two source are not consistent,
we would do as follows,
(1) if round 6 reports e26521>0 and e26521 is larger than DLI credits, we use
e26521.
(2) if round 6 reports e26521=0 and DLI credit is positive, we use DLI credits.
(3) if e26521 ne 0, and e26521 is smaller than DLI credit, we set CV to -3.*/
/* (1) */
if pubid=267 then bafrac2=round(100*e265212/e273882, 1);
if pubid=2802 then bafrac2=round(100*e265212/e273882, 1);
if pubid=4288 then bafrac2=round(100*e265212/e273882, 1);
if pubid=721 then bafrac3=round(100*e265213/e273883, 1);
/* (2) do not need to make changes, since the program uses the DLI credits to
overwrite the e26521 credits. */
/* (3) */
if pubid=267 then bafrac3=-3;
if pubid=1943 then bafrac2=-3;
if pubid=640 then asfrac3=-3;
if pubid= 2499 then asfrac3=-3;
if pubid= 7290 then bafrac3=-3;
endsas;
Variables Created:
CV_PIAT_STANDARD_SCORE
CV_PIAT_PERCENTILE_SCORE
Variables Used
|
Name in Program |
Question Name on CD |
| INT_D | DATE R INTERVIEWED |
| INT_M | DATE R INTERVIEWED |
| INT_Y | DATE R INTERVIEWED |
| pubid | PUBID |
| bdate_d | KEY!BDATE M/Y (SYMBOL) 1997 |
| bdate_m | KEY!BDATE M/Y (SYMBOL) 1997 |
| bdate_y | KEY!BDATE M/Y (SYMBOL) 1997 |
| piat_r02 | PIAT MATH ORIGINAL SCORE (PRIVATE) 2002 |
| piatR02 | PIAT_RAW_SCORE_REVISED 2002 |
| mathcei | PIAT-MATH-CEILING |
| mathbas | PIAT-MATH-BASAL |
| mathsco | PIAT-MATH-SCORE |
| math_disa | PIAT-MATH-DISPLACEMENT |
| math_las | PIAT-MATH-LASTPOSITION |
| math_grd | PIAT-MATH-GRADE |
| math_lst | PIAT-MATH-FIRST QUESTIONS |
| math_sat | PIAT-MATH-STAT POSITION |
| MAT_Axx | PIAT-MATH-ANSWER |
| MAT_lxx | PIAT-MATH-LOGIC |
| elsepres | PIAT-MATH-ANYONE ELSE PRESENT |
| mothpres | PIAT-MATH-MOTHER PRESENT |
| motheffe | PIAT-MATH-MOTHER EFFECT |
| fathpres | PIAT-MATH-FATHER PRESENT |
| fatheffe | PIAT-MATH-FATHER EFFECT |
| othpres | PIAT-MATH-OTHER ADULT PRESENT |
| otheffe | PIAT-MATH-OTHER ADULT EFFECT |
| chipres | PIAT-MATH-CHILDREN PRESENT |
| chieffe | PIAT-MATH-CHILDREN EFFECT |
| energy | PIAT-MATH-ENERGY-LEVEL |
| quit | PIAT-MATH-PREMATURE TERMINATION |
| norespon | PIAT-MATH-CHILD WOULD NOT RESPOND |
| interupt | PIAT-MATH-MAJOR INTERRUPTION CAUSED TERMINATION |
| understa | PIAT-MATH-CHILD DO NOT UNDERSTAND TASK |
| language | PIAT-MATH-CHILD LANGUAGE PROBLEM |
| emotion | PIAT-MATH-CHILD EMOTIONAL CONDITION |
| physical | PIAT-MATH-CHILD PHYSICAL CONDITION |
| tired | PIAT-MATH-CHILD TIRED |
| timein | PIAT-MATH-START TIME |
| timeout | PIAT-MATH-END-TIME |
| timeto | PIAT-MATH-TOTAL TIME |
*This program creates piat standard score and percentile rank variables
*Rules for computing created variables:
the respondent's age will be calculated utilizing the interview date
info and the respondent's dob info.
the youth's piat standard score and percentile rank will be calculated
utilizing the obtained piat raw score and the respondent's age.
note: the piat percentile rank score will be calculated using the
obtained piat standard score. scores falling below the 1st percentile
will be coded as a "0" and scores above the 99th percentile will be
coded as "100".
/*******interview date section: calculate the interview date in continuous months format*******/
if int_d ge 0 and int_m ge 0 then int_cmon=((int_y-1990)*12)+int_m;
else if int_y eq -5 then int_cmon=-5;
/****************respondent age section****************/
/**calculate the youth's age in continuous months**/
if int_cm ne . then do;
age_cmon=((int_y-bdate_y)*12)+(int_m-bdate_m);
if int_d-bdate_d<0 then age_cmon=age_cmon-1;
end;
if int_cmon=-5 then age_cmon=-5;
/********************piat standard score section************/
if PIATR02 lt 0 then piat_s02=PIATR02;
else if PIATR02 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_s02 lt 0 then piat_p02=piat_s02;
else if piat_s02 ge 0 then do;
/* At this point the program assigns percentile scores based on the standard scores. These are also shown in the table below. */
endsas;
|
Standard |
Percentile |
Raw Score by Age Range (Years-Months) |
|||||||||
|
16-9 |
17-0 |
17-3 to 17-5 |
17-6 to 17-8 |
17-9 to 17-11 |
18-0 to 18-2 |
18-3 to 18-5 |
18-6 to 18-9 |
18-10 to 18-12 |
19-0 to 19-11 |
||
|
55 |
0 |
<=28 |
<=28 |
<=29 | <=29 | <=29 | <=29 | <=29 | <=29 | <=29 | <=29 |
|
56 |
0 |
29 |
29 |
30 | 30 | 30 | 30 | 30 | |||
|
57 |
0 |
|
30 |
30 | 30 | 30 | 31 | 31 | 31 | 31 | 31 |
|
58 |
0 |
30 |
31 |
31 | 31 | 31, 32 | 32 | 32 | 32 | 32 | 32, 33 |
|
59 |
0 |
31 |
32 |
32 | 32 | 33 | 33 | 33 | 33 | 33 | 34, 35 |
|
60 |
0 |
32 |
33 |
33 | 33, 34 | 34, 35 | 34, 35 | 34, 35 | 34-36 | 34-36 | 36 |
|
61 |
0 |
33 |
34, 35 |
34, 35 | 35, 36 | 36 | 36 | 36 | 37 | 37 | 37 |
|
62 |
1 |
34, 35 |
36 |
36 | 37 | 37 | 37 | 37 | 38 | 38 | 38 |
|
63 |
1 |
36, 37 |
37 |
37 | 38 | 38 | 38 | 38, 39 | 39 | 39 | 39 |
|
64 |
1 |
38 |
38 |
38, 39 | 39 | 39 | 39 | 40 | 40 | 40 | 40 |
|
65 |
1 |
39 |
39 |
40 | 40 | 40 | 40, 41 | 41 | 41, 42 | 41, 42 | 41, 42 |
|
66 |
1 |
40 |
40 |
41, 42 | 41, 42 | 41, 42 | 42, 43 | 42, 43 | 43 | 43 | 43, 44 |
|
67 |
1 |
41, 42 |
41, 42 |
43 | 43 | 43 | 44 | 44 | 44 | 44, 45 | 45, 46 |
|
68 |
2 |
43 |
43 |
44 | 44 | 44 | 45, 46 | 45, 46 | 45, 46 | 46, 47 | 47, 48 |
|
69 |
2 |
44 |
44 |
45, 46 | 45, 46 | 45-47 | 47, 48 | 47, 48 | 47, 48 | 48, 49 | 49 |
|
70 |
2 |
45, 46 |
45-47 |
47, 48 | 47, 48 | 48, 49 | 49 | 49 | 49, 50 | 50, 51 | 50, 51 |
|
71 |
3 |
47, 48 |
48, 49 |
49 | 49 | 50, 51 | 50, 51 | 50, 51 | 51, 52 | 52 | 52, 53 |
|
72 |
3 |
49 |
50, 51 |
50, 51 | 50, 51 | 52 | 52 | 52 | 53 | 53, 54 | 54, 55 |
|
73 |
4 |
50, 51 |
52 |
52 | 52 | 53 | 53 | 53-55 | 54, 55 | 55, 56 | 56, 57 |
|
74 |
4 |
52 |
53 |
53 | 53-55 | 54, 55 | 54, 55 | 56, 57 | 56, 57 | 57 | 58 |
|
75 |
5 |
53 |
54, 55 |
54, 55 | 56, 57 | 56, 57 | 56, 57 | 58 | 58 | 58 | 59, 60 |
|
76 |
5 |
54, 55 |
56, 57 |
56, 57 | 58 | 58 | 58 | 59, 60 | 59, 60 | 59, 60 | 61 |
|
77 |
6 |
56, 57 |
58 |
58 | 59, 60 | 59, 60 | 59, 60 | 61 | 61 | 61, 62 | 62, 63 |
|
78 |
7 |
58, 59 |
59, 60 |
59, 60 | 61 | 61 | 61-63 | 62, 63 | 62, 63 | 63-65 | 64, 65 |
|
79 |
8 |
60, 61 |
61 |
61 | 62, 63 | 62, 63 | 64, 65 | 64, 65 | 64, 65 | 66, 67 | 66, 67 |
|
80 |
9 |
62, 63 |
62, 63 |
62, 63 | 64, 65 | 64, 65 | 66, 67 | 66, 67 | 66, 67 | 68 | 68 |
|
81 |
10 |
64, 65 |
64, 65 |
64-66 | 66, 67 | 66, 67 | 68 | 68 | 68, 69 | 69 | 69 |
|
82 |
12 |
66, 67 |
66, 67 |
67, 68 | 68 | 68 | 69 | 69 | 70 | 70 | 70 |
|
83 |
13 |
68 |
68 |
69 | 69 | 69 | 70 | 70 | 71 | 71 | 71 |
|
84 |
14 |
69 |
69 |
70 | 70 | 70 | 71 | 71 | 72, 73 | 72, 73 | 72, 73 |
|
85 |
16 |
70 |
70 |
71 | 71 | 71 | 72, 73 | 72, 73 | 74 | 74 | 74 |
|
86 |
18 |
71 |
71 |
72, 73 | 72, 73 | 72-74 | 74 | 74 | 75 | 75 | 75, 76 |
|
87 |
19 |
72, 73 |
72, 73 |
74 | 74 | 75 | 75 | 75 | 76 | 76 | 77 |
|
88 |
21 |
74 |
74 |
75 | 75 | 76 | 76 | 76 | 77 | 77 | 78 |
|
89 |
23 |
75 |
75 |
76 | 76 | 77 | 77 | 77 | 78 | 78 | 79, 80 |
|
90 |
25 |
76 |
76 |
77 | 77 | 78 | 78 | 78 | 79, 80 | 79, 80 | 81 |
|
91 |
27 |
77 |
77, 78 |
78 | 78 | 79, 80 | 79, 80 | 79, 80 | 81 | 81 | 82 |
|
92 |
30 |
78 |
79, 80 |
79, 80 | 79, 80 | 81 | 81 | 81 | 82 | 82 | 83 |
|
93 |
32 |
79, 80 |
81 |
81 | 81 | 82 | 82 | 82 | 83 | 83 | 84 |
|
94 |
34 |
81 |
82 |
82 | 82 | 83 | 83 | 83 | 84 | 84 | 85 |
|
95 |
37 |
82 |
83 |
83 | 83 | 84 | 84 | 84, 85 | 85 | 85 | 86 |
|
96 |
39 |
83 |
84 |
84 | 84 | 85 | 85 | 86 | 86 | 86 | 87 |
|
97 |
42 |
84 |
85 |
85 | 85 | 86 | 86 | 87 | 87 | 87 | 88 |
|
98 |
45 |
85 |
86 |
86 | 86 | 87 | 87 | 88 | 88 | 88 | |
|
99 |
47 |
86 |
87 |
87 | 87 | 88 | 88 | 89 | |||
|
100 |
50 |
87 |
88 |
88 | 88 | 89 | 89 | 89 | 90 | ||
|
101 |
53 |
88 |
|
89 | 89 | 90 | 90 | 90 | |||
|
102 |
55 |
|
89 |
89 | 89 | 90 | 90 | 91 | |||
|
103 |
58 |
89 |
90 |
90 | 91 | 91 | 91 | 92 | |||
|
104 |
61 |
|
|
91 | 91 | 91 | 92 | 92 | 92 | ||
|
105 |
63 |
91 |
91 |
91 | 92 | 92 | 92 | 93 | |||
|
106 |
66 |
92 |
92 |
92 | 93 | 93 | 93 | ||||
|
107 |
68 |
|
|
93 | 93 | 93 | |||||
|
108 |
70 |
93 |
93 |
93 | 94 | 94 | 94 | 94 | 94 | ||
|
109 |
73 |
|
|
94 | 94 | 94 | |||||
|
110 |
75 |
94 |
94 |
||||||||
|
111 |
77 |
|
|
95 | 95 | 95 | |||||
|
112 |
79 |
|
|
95 | 95 | 95 | 95 | 95 | |||
|
113 |
81 |
95 |
95 |
96 | 96 | 96 | |||||
|
114 |
82 |
|
|
96 | 96 | 96 | 96 | ||||
|
115 |
84 |
|
96 |
96 | |||||||
|
116 |
86 |
96 |
|
97 | 97 | 97 | 97 | ||||
|
117 |
87 |
|
|
97 | 97 | 97 | 97 | ||||
|
118 |
88 |
97 |
97 |
98 | |||||||
|
119 |
90 |
|
|
98 | 98 | 98 | 98 | 98 | |||
|
120 |
91 |
|
98 |
98 | 98 | ||||||
|
121 |
92 |
98 |
|
||||||||
|
122 |
93 |
|
|
||||||||
|
123 |
94 |
|
|
||||||||
|
124 |
95 |
|
|
||||||||
|
125 |
95 |
|
|
||||||||
|
126 |
96 |
|
|
||||||||
|
127 |
96 |
|
|
99 | |||||||
|
128 |
97 |
|
|
99 | 99 | ||||||
|
129 |
97 |
|
|
99 | 99 | ||||||
|
130 |
98 |
99 |
99 |
99 | 99 | 99 | |||||
|
131 |
98 |
|
|
||||||||
|
132 |
98 |
|
|
||||||||
|
133 |
99 |
|
|
||||||||
|
134 |
99 |
|
|
||||||||
|
135 |
99 |
|
|
||||||||
|
136 |
99 |
|
|
||||||||
|
137 |
99 |
|
|
100 | |||||||
|
138 |
99 |
|
|
100 | 100 | ||||||
|
139 |
100 |
|
|
100 | 100 | 100 | 100 | 100 | |||
|
140 |
100 |
100 |
100 |
||||||||
|
141 |
100 |
|
|
||||||||
|
142 |
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.
Variables Created:
CV_SCHOOL_SIZE
CV_STUDENT_TEACHER_RATIO
Variables Used
|
Name in Program |
Question Name on CD |
Question Description |
| e2857 | YSCH-2857 | "WHAT IS CURR HGA? 2002" |
| e3878 | YSCH-3878 | "R BEEN ENR SDLI? NOT AT DLI 2002" |
| e21625 | YSCH-21625 | "R CURR/MR PRG/COLL PREP/VOC? 2002" |
| pin1 | NEWSCHOOL_ID.01 | "NEWSCHOOL ID (ROS ITEM) L1 2002" |
| pin2 | NEWSCHOOL_ID.02 | "NEWSCHOOL ID (ROS ITEM) L2 2002" |
| pin3 | NEWSCHOOL_ID.03 | "NEWSCHOOL ID (ROS ITEM) L3 2002" |
| pin4 | NEWSCHOOL_ID.04 | "NEWSCHOOL ID (ROS ITEM) L4 2002" |
| code1 | NEWSCHOOL_SCHCODE.01 | "NEWSCHOOL SCHCODE (ROS ITEM) L1 2002" |
| code2 | NEWSCHOOL_SCHCODE.02 | "NEWSCHOOL SCHCODE (ROS ITEM) L2 2002" |
| code3 | NEWSCHOOL_SCHCODE.03 | "NEWSCHOOL SCHCODE (ROS ITEM) L3 2002" |
| code4 | NEWSCHOOL_SCHCODE.04 | "NEWSCHOOL SCHCODE (ROS ITEM) L4 2002" |
| strtm11 | NEWSCHOOL_START1.01~M | "NEWSCHOOL START1 (ROS ITEM) L1 2002" |
| strty11 | NEWSCHOOL_START1.01~Y | "NEWSCHOOL START1 (ROS ITEM) L1 2002" |
| strtm21 | NEWSCHOOL_START1.02~M | "NEWSCHOOL START1 (ROS ITEM) L2 2002" |
| strty21 | NEWSCHOOL_START1.02~Y | "NEWSCHOOL START1 (ROS ITEM) L2 2002" |
| strtm31 | NEWSCHOOL_START1.03~M | "NEWSCHOOL START1 (ROS ITEM) L3 2002" |
| strty31 | NEWSCHOOL_START1.03~Y | "NEWSCHOOL START1 (ROS ITEM) L3 2002" |
| strtm41 | NEWSCHOOL_START1.04~M | "NEWSCHOOL START1 (ROS ITEM) L4 2002" |
| strty41 | NEWSCHOOL_START1.04~Y | "NEWSCHOOL START1 (ROS ITEM) L4 2002" |
| strtm12 | NEWSCHOOL_START2.01~M | "NEWSCHOOL START2 (ROS ITEM) L1 2002" |
| strty12 | NEWSCHOOL_START2.01~Y | "NEWSCHOOL START2 (ROS ITEM) L1 2002" |
| strtm22 | NEWSCHOOL_START2.02~M | "NEWSCHOOL START2 (ROS ITEM) L2 2002" |
| strty22 | NEWSCHOOL_START2.02~Y | "NEWSCHOOL START2 (ROS ITEM) L2 2002" |
| strtm32 | NEWSCHOOL_START2.03~M | "NEWSCHOOL START2 (ROS ITEM) L3 2002" |
| strty32 | NEWSCHOOL_START2.03~Y | "NEWSCHOOL START2 (ROS ITEM) L3 2002" |
| stopm11 | NEWSCHOOL_STOP1.01~M | "NEWSCHOOL STOP1 (ROS ITEM) L1 2002" |
| stopy11 | NEWSCHOOL_STOP1.01~Y | "NEWSCHOOL STOP1 (ROS ITEM) L1 2002" |
| stopm21 | NEWSCHOOL_STOP1.02~M | "NEWSCHOOL STOP1 (ROS ITEM) L2 2002" |
| stopy21 | NEWSCHOOL_STOP1.02~Y | "NEWSCHOOL STOP1 (ROS ITEM) L2 2002" |
| stopm31 | NEWSCHOOL_STOP1.03~M | "NEWSCHOOL STOP1 (ROS ITEM) L3 2002" |
| stopy31 | NEWSCHOOL_STOP1.03~Y | "NEWSCHOOL STOP1 (ROS ITEM) L3 2002" |
| stopm41 | NEWSCHOOL_STOP1.04~M | "NEWSCHOOL STOP1 (ROS ITEM) L4 2002" |
| stopy41 | NEWSCHOOL_STOP1.04~Y | "NEWSCHOOL STOP1 (ROS ITEM) L4 2002" |
| stopm12 | NEWSCHOOL_STOP2.01~M | "NEWSCHOOL STOP2 (ROS ITEM) L1 2002" |
| stopy12 | NEWSCHOOL_STOP2.01~Y | "NEWSCHOOL STOP2 (ROS ITEM) L1 2002" |
| stopm22 | NEWSCHOOL_STOP2.02~M | "NEWSCHOOL STOP2 (ROS ITEM) L2 2002" |
| stopy22 | NEWSCHOOL_STOP2.02~Y | "NEWSCHOOL STOP2 (ROS ITEM) L2 2002" |
| stopm32 | NEWSCHOOL_STOP2.03~M | "NEWSCHOOL STOP2 (ROS ITEM) L3 2002" |
| stopy32 | NEWSCHOOL_STOP2.03~Y | "NEWSCHOOL STOP2 (ROS ITEM) L3 2002" |
| PUBID | PUBID | "PUBID (SYMBOL) 2002" |
| AGE | SYMBOL!KEY!AGE | "SYMBOL!KEY!AGE 2002" |
| int02_D | SYMBOL!CURDATE~D | "SYMBOL!CURDATE 2002" |
| int02_M | SYMBOL!CURDATE~M | "SYMBOL!CURDATE 2002" |
| int02_Y | SYMBOL!CURDATE~Y | "SYMBOL!CURDATE 2002" |
| RACE | SYMBOL!KEY!RACE | "SYMBOL!KEY!RACE 2002" |
| SEX | SYMBOL!KEY!SEX | "SYMBOL!KEY!SEX 2002" |
| CENREG | CV_CENSUS_REGION | "CV_CENSUS_REGION 2002" |
Codes for Created Variable
|
School Size |
Student-teacher ratio |
|
1
= <100 |
1
= <14 |
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. */
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='"10"';
if GRADSPAN='"B"' or GRADSPAN='"C"' or GRADSPAN='"D"' or GRADSPAN='"E"' or GRADSPAN='"*"' then do;
flag2=gradspan;
GRADSPAN='"0"';
end;
/* 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;
if GRADSPAN='"10"' then GRADSPN=10;
/* 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.). "HGAFLAG" denotes the cases with college attendance. */
if e2857>12 and pin>100 and CODESCH in (1,2,3) then do;
e2857=12;
hgaflag=1;
end;
** Here we are checking the
consistency of grades reported with the grade range of the school reported.
Create dummies for HGA (e2857) to correspond to the grade ranges as classified
in GRADSPAN and then
compare these dummies with GRADSPAN. "CORRECT" is 0 if there is any discrepancy
and 1 otherwise.;
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;
if GRADSPN ~=. then 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=10 and dummy10=1 then correct=1;
/* 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 then SCHSIZE=1;
if 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 then SCHSIZE=6;
if STUDRANG=7 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 or GRADSPN=. then SCHSIZE=-3;
if correct=0 or GRADSPN=. 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 or census, 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. */
COMPV=CENREG||CODESCH||e21625||SCHSIZE||STUDTEAC;
proc freq; tables CENREG*CODESCH*e21625*SCHSIZE*STUDTEAC/OUT=A;
proc freq data=A noprint; tables COUNT;
if COUNT<=5 then SCHSIZE=-3;
if COUNT<=5 then STUDTEAC=-3;
if e2857=-5 then do;
studteac=-5; schsize=-5;
end;
** If a respondent reports no schools in the Round 6 roster or the only schools
in the R6 roster are 2
or 4 year universities.;
if pin=-4 then do; schsize=-4; studteac=-4; end;
endsas;
Variables Created:
TRNCERT
TRNCMTH
TRNCYR
Variables Used
|
Name in Program |
Question Name on CD |
| t640m1-t640m2 | YTRN640.01-.02 |
| t640y1-t640y2 | YTRN640.01-.02 |
| t690001-t690005 | YTRN6900 |
| t700001-t700004 | YTRN7000 |
| t1500m1-t1500m5 | YTRN1500.00-.05 |
| t1500y1-t1500y5 | YTRN1500.00-.05 |
| TRNCYR | CV_TRN_CERT |
| TRNCMTH | CV_TRN_CERT_DATE~Y |
| TRNCERT | CV_TRN_CERT_DATE~M |
| trncmo97 | CV_TRN_CERT_DATE_M_1997 |
| trncy97 | CV_TRN_CERT_DATE_Y_1997 |
| trncrt97 | CV_TRN_CERT_1997 |
| trncmo98 | CV_TRN_CERT_DATE_M_1998 |
| trncy98 | CV_TRN_CERT_DATE_Y_1998 |
| trncrt98 | CV_TRN_CERT_1998 |
| trncmo99 | CV_TRN_CERT_DATE_M_1999 |
| trncy99 | CV_TRN_CERT_DATE_Y_1999 |
| trncrt99 | CV_TRN_CERT_1999 |
| trncmo2000 | CV_TRN_CERT_DATE_M_2000 |
| trncy2000 | CV_TRN_CERT_DATE_Y_2000 |
| trncrt2000 | CV_TRN_CERT_2000 |
| trncmo2001 | CV_TRN_CERT_DATE_M_2001 |
| trncy2001 | CV_TRN_CERT_DATE_Y_2001 |
| trncrt2001 | CV_TRN_CERT_2001 |
| t640m1 | YTRN_640_01_M_2002 |
| t640y1 | YTRN_640_01_Y_2002 |
| t640m2 | YTRN_640_02_M_2002 |
| t640y2 | YTRN_640_02_Y_2002 |
| t640m3 | YTRN_640_03_M_2002 |
| t640y3 | YTRN_640_03_Y_2002 |
| t1500m1 | YTRN_1500_01_M_2002 |
| t1500y1 | YTRN_1500_01_Y_2002 |
| t1500m2 | YTRN_1500_02_M_2002 |
| t1500y2 | YTRN_1500_02_Y_2002 |
| t1500m3 | YTRN_1500_03_M_2002 |
| t1500y3 | YTRN_1500_03_Y_2002 |
| t1500m4 | YTRN_1500_04_M_2002 |
| t1500y4 | YTRN_1500_04_Y_2002 |
| t1500m5 | YTRN_1500_05_M_2002 |
| t1500y5 | YTRN_1500_05_Y_2002 |
| t69001 | YTRN_6900_01_2002 |
| t69002 | YTRN_6900_02_2002 |
| t69003 | YTRN_6900_03_2002 |
| t69004 | YTRN_6900_04_2002 |
| t69005 | YTRN_6900_05_2002 |
| t70001 | YTRN_7000_01_2002 |
| t70002 | YTRN_7000_02_2002 |
| t70003 | YTRN_7000_03_2002 |
| t70004 | YTRN_7000_04_2002 |
| t70005 | YTRN_7000_05_2002 |
| PUBID | PUBID_1997 |
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. |
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.
/*Initialize variables*/
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 t640m{5} t640m1 - t640m5;
array t640y{5} t640y1 - t640y5;
array trncrt{5} trncrt97 - trncrt99 trncrt2000 trncrt2001;
array trncmo{5} trncmo97 - trncmo99 trncmo2000 trncmo2001;
array trncy{5} trncy97 - trncy99 trncy2000 trncy2001;
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=t640y{i};
TRNCMTH=t640m{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 t640y{i}=TRNCYR and
t640m{i}>TRNCMTH then do;
TRNCMTH=t640m{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 t640y{i}>TRNCYR then do;
TRNCYR=t640y{i};
TRNCMTH=t640m{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 5;
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 received training cert but there is no date, then date variables = invalid skip*/
if TRNCERT=0 then TRNCMTH=-4;
if TRNCERT=0 then TRNCYR=-4;
/*if R took training but did not receive training cert then the date variables= valid skip */
if TRNCERT=-3 then TRNCMTH=-3;
if TRNCERT=-3 then TRNCYR=-3;
if TRNCERT=-4 then TRNCMTH=-4;
if TRNCERT=-4 then TRNCYR=-4;
if TRNCERT=-5 then TRNCMTH=-5;
if TRNCERT=-5 then TRNCYR=-5;
endsas;