************************************************************************************************************************** *The syntax below (PART 1) uses 1998 AFCARS data files created using the 9899PointInTime syntax.**** ************************************************************************************************************************** *Syntax using 1999 AFCARS data files found under PART 2* ********************************************************************** *FOSTER CARE CONTEXT* ******************************** *PART 1* *********** *Children in Care as of October 1, 1997 get file 'c:\nctest\ncinc1st98C.sav'. compute LOS1 = (yrmoda(97,10,01)-yrmoda(latremyr,latremmo,latremda))/30.4375. RECODE LOS1 (252 thru Highest=SYSMIS). DO IF (LOS1 <= 0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF . EXECUTE . do if (missing(los1)). compute service=2. else. Compute service=1. end if. formats service (f1.0). value labels service 1 'Records' 2 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= los1 /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY los1 + service /STATISTICS median( los1( F5.1 )) count( service( COMMA6.0 ) 'N')/Title 'Children in Care as of October 1, 1997'. compute age1=(yrmoda(97,10,01)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 <= 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). Recode Race (sysmis=9) into racethnc. END IF. recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of October 1, 1997'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of October 1, 1997'. *Children Exiting Care During 1998 get file 'c:\nctest\ncexits98c.sav'. compute LOS1 = (yrmoda(dodfcyr,dodfcmo,dodfcda)-yrmoda(latremyr,latremmo,latremda))/30.4375. RECODE LOS1 (252 thru Highest=SYSMIS). DO IF (LOS1 <= 0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF . EXECUTE . do if (missing(los1)). compute service=2. else. Compute service=1. end if. formats service (f1.0). value labels service 1 'Records' 2 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= los1 /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY los1 + service /STATISTICS median( los1( F5.1 )) count( service( COMMA6.0 ) 'N')/Title 'Children Exiting Care During 1998'. compute age1=(yrmoda(dodfcyr,dodfcmo,dodfcda)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 <= 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). Recode Race (sysmis=9) into racethnc. END IF. recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Exiting Care During 1998'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Exiting Care During 1998'. *Children Entering Care During 1998 get file 'c:\nctest\ncentry98c.sav'. Compute Records = (1). formats Records (f1.0). * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY records /STATISTICS count( records( COMMA6.0 ) 'N')/Title 'Children Entering Care During 1998'. compute age1=(yrmoda(latremyr,latremmo,latremda)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 < 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). Recode Race (sysmis=9) into racethnc. END IF. recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Entering Care During 1998'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Entering Care During 1998'. *Children in Care as of September 30, 1998 get file 'c:\nctest\ncinc98c.sav'. compute LOS1 = (yrmoda(98,09,30)-yrmoda(latremyr,latremmo,latremda))/30.4375. RECODE LOS1 (252 thru Highest=SYSMIS). DO IF (LOS1 <= 0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF . EXECUTE . do if (missing(los1)). compute service=2. else. Compute service=1. end if. formats service (f1.0). value labels service 1 'Records' 2 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= los1 /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY los1 + service /STATISTICS median( los1( F5.1 )) count( service( COMMA6.0 ) 'N')/Title 'Children in Care as of September 30, 1998'. compute age1=(yrmoda(98,09,30)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 <= 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). Recode Race (sysmis=9) into racethnc. END IF. recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of September 30, 1998'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of September 30, 1998'. ************************************** *PART 2 (Uses 1999 Data Files)* ************************************** *Children in Care as of October 1, 1998 get file 'c:\nctest\ncinc1st99C.sav'. compute LOS1 = (yrmoda(98,10,01)-yrmoda(latremyr,latremmo,latremda))/30.4375. RECODE LOS1 (252 thru Highest=SYSMIS). DO IF (LOS1 <= 0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF . EXECUTE . do if (missing(los1)). compute service=2. else. Compute service=1. end if. formats service (f1.0). value labels service 1 'Records' 2 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= los1 /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY los1 + service /STATISTICS median( los1( F5.1 )) count( service( COMMA6.0 ) 'N')/Title 'Children in Care as of October 1, 1998'. compute age1=(yrmoda(98,10,01)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 <= 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1 | race = 7 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) (7=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2 | race = 7 & hisorgin=2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3 | race = 7 & hisorgin=3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin) | race = 7 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). END IF. recode racethnc (sysmis=9). recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6) (7=7). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 7 'Not Applicable' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of October 1, 1998'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of October 1, 1998'. *Children Exiting Care During 1999 get file 'c:\nctest\ncexits99C.sav'. compute LOS1 = (yrmoda(dodfcyr,dodfcmo,dodfcda)-yrmoda(latremyr,latremmo,latremda))/30.4375. RECODE LOS1 (252 thru Highest=SYSMIS). DO IF (LOS1 <= 0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF . EXECUTE . do if (missing(los1)). compute service=2. else. Compute service=1. end if. formats service (f1.0). value labels service 1 'Records' 2 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= los1 /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY los1 + service /STATISTICS median( los1( F5.1 )) count( service( COMMA6.0 ) 'N')/Title 'Children Exiting Care During 1999'. compute age1=(yrmoda(dodfcyr,dodfcmo,dodfcda)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 <= 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1 | race = 7 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) (7=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2 | race = 7 & hisorgin=2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3 | race = 7 & hisorgin=3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin) | race = 7 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). END IF. recode racethnc (sysmis=9). recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6) (7=7). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 7 'Not Applicable' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Exiting Care During 1999'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Exiting Care During 1999'. *Children Entering Care During 1999 get file 'c:\nctest\ncentry99C.sav'. Compute Records = (1). formats Records (f1.0). * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY records /STATISTICS count( records( COMMA6.0 ) 'N')/Title 'Children Entering Care During 1999'. compute age1=(yrmoda(latremyr,latremmo,latremda)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 < 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1 | race = 7 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) (7=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2 | race = 7 & hisorgin=2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3 | race = 7 & hisorgin=3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin) | race = 7 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). END IF. recode racethnc (sysmis=9). recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6) (7=7). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 7 'Not Applicable' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Entering Care During 1999'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children Entering Care During 1999'. *Children in Care as of September 30, 1999 get file 'c:\nctest\ncinc99C.sav'. compute LOS1 = (yrmoda(99,09,30)-yrmoda(latremyr,latremmo,latremda))/30.4375. RECODE LOS1 (252 thru Highest=SYSMIS). DO IF (LOS1 <= 0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF . EXECUTE . do if (missing(los1)). compute service=2. else. Compute service=1. end if. formats service (f1.0). value labels service 1 'Records' 2 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /OBSERVATION= los1 /GBASE=CASES /FTOTAL= $t000001 "Total" /TABLE=state + $t000001 BY los1 + service /STATISTICS median( los1( F5.1 )) count( service( COMMA6.0 ) 'N')/Title 'Children in Care as of September 30, 1999'. compute age1=(yrmoda(99,09,30)- yrmoda(dobyr,dobmo,dobda))/30.4375. execute. RECODE age1 (252 thru Highest=SYSMIS). DO IF (age1 <= 0). RECODE age1 (Lowest thru 0=SYSMIS). END IF . compute age2=(age1/12). execute. RECODE age2 (sysmis=9) (19 thru Highest=6) (16 thru 19=5) (11 thru 16=4) (6 thru 11=3) (1 thru 6=2) (Lowest thru 1=1) INTO AGE. FORMATS AGE (F2.0). Value labels age 1 'Under 1 Yr' 2 '1 thru 5 Yrs' 3 '6 thru 10 Yrs' 4 '11 thru 15 Yrs' 5 '16 thru 18 Yrs' 6 '19 + Yrs' 9 'Missing'. EXECUTE . DO IF (race = 1 & hisorgin = 1 | race = 2 & hisorgin = 1 | race = 3 & hisorgin = 1 | race = 4 & hisorgin = 1 | race = 5 & hisorgin=1 | race = 7 & hisorgin=1) . RECODE race (1=5) (2=5) (3=5) (4=5) (5=5) (7=5) INTO racethnc. END IF . DO IF (race = 1 & hisorgin =2 | race = 2 & hisorgin = 2 | race = 3 & hisorgin = 2 | race = 4 & hisorgin = 2 | race = 5 & hisorgin = 2 | race = 7 & hisorgin=2) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & hisorgin = 3 | race = 2 & hisorgin = 3 | race = 3 & hisorgin = 3 | race = 4 & hisorgin = 3 | race = 5 & hisorgin = 3 | race = 7 & hisorgin=3) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (race = 1 & missing(hisorgin) | race = 2 & missing(hisorgin) | race = 3 & missing(hisorgin) | race = 4 & missing(hisorgin) | race = 5 & missing(hisorgin) | race = 7 & missing(hisorgin)) . RECODE race (1=1) (2=2) (3=3) (4=4) (5=6) (7=7) into racethnc. end if. DO IF (MISSING(RACE)& HISORGIN = 1). RECODE RACE (SYSMIS=5) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 2). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE)& HISORGIN = 3). RECODE RACE (SYSMIS=6) INTO racethnc. END IF. DO IF (MISSING(RACE) & MISSING(HISORGIN)). END IF. recode racethnc (sysmis=9). recode racethnc (1=5) (2=3) (3=1) (4=2) (5=4) (6=6) (7=7). FORMATS RACETHNC (F1.0). value labels racethnc 1 'AI/AN Non-Hispanic' 2 'Asian/PI Non-Hispanic' 3 'Black Non-Hispanic' 4 'Hispanic' 5 'White Non-Hispanic' 6 'UnKnown/Unable to Determine' 7 'Not Applicable' 9 'Missing'. exe. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY age + $t000002 /STATISTICS count( age( COMMA6.0 ) 'N') cpct( age( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of September 30, 1999'. * General Tables. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000001 "Total" $t000002 "Total" /TABLE=state + $t000001 BY racethnc + $t000002 /STATISTICS count( racethnc( COMMA6.0 ) 'N') cpct( racethnc( PCT5.0 ) 'Row %':state ) cpct( $t000002( PCT5.0 ) 'Total%':state ) count( $t000002( COMMA6.0 ) 'N')/Title 'Children in Care as of September 30, 1999'.