**FILENAME: creat99f-tec.sps Last updated: 8-9-01 *Creates 99 cohort file and gathers 99 and 00a discharges to compute *median LOS of the FY99 first-time entry cohort ("f-tec"). May replace "EZ" with State abbrev. *Uses 99c entry file to identify 99 f-tec (children entering care for the 1st time during 1st six months). *Creates 99 f-tec cohort file and 99 f-tec count file which is used later to help compute median. get file 'c:\cfsr\EZdata\EZentry99c.sav'. FILTER OFF. USE ALL. SELECT IF(yrmoda(latremyr,latremmo,latremda) <= yrmoda(1999,03,31)). do if (totalrem=1). compute Records=(1). else. compute Records=(2). end if. formats Records (f1.0). value labels Records 1'1st Removal Ever' 2'2nd Removal or More'. exe. TABLES /FORMAT BLANK MISSING('.') /GBASE=CASES /FTOTAL= $t000003 "Total" /TABLE=records + $t000003 BY state /STATISTICS count( state( F5.0 )) cpct( state( PCT5.2 ) 'Col %':state ) /TITLE '1st Time Entry Cohort as %'+ ' of 6-Mo Entry FY99'. recode casegoal (sysmis=9) (0=9). value labels casegoal 1 'Reunification' 2 'Live with Relatives' 3 'Adoption' 4 'Long-Term Foster Care' 5 'Emancipation' 6 'Guardianship' 7 'Not Yet Established' 9 'Missing Goal Info'. exe. compute settime = yrmoda(cursetyr,cursetmo,cursetda). formats settime (f6.0). do if (settime<=yrmoda(1999,09,30)). compute set=1. else if (settime>=yrmoda(1999,10,01)). compute set=2. formats set (f1.0). end if. exe. compute newplace=(numplep). formats newplace (f2.0). if (set=2 and (newplace>=2)) newplace = (newplace-1). exe. recode newplace (sysmis=9) (0=9) (1=1) (2=2) (3=3) (4=4) (5=5) (6 thru highest=6) into NewP. formats NewP (f1.0). variable labels NewP 'Total Number of Placements'. value labels NewP 1 '1 Placement' 2 '2 Placements' 3 '3 Placements' 4 '4 Placements' 5 '5 Placements' 6 '6 Placements or More' 9 'Missing'. exe. recode curplset (sysmis=9) (0=9). if (set=2) curplset=9.5. value labels curplset 1 'Pre-Adoptive Homes' 2 'FFH-Relative' 3 'FFH-NonRelative' 4 'Group Home' 5 'Institution' 6 'Supervised IL' 7 'Runaway' 8 'Trial Home Visit' 9 'Missing' 9.5 'Not Applicable'. select if (records=1). frequencies variables curplset casegoal NewP. save outfile='c:\cfsr\EZdata\EZcohort99.sav'. compute num=($casenum). formats num (f5.0). save outfile'c:\cfsr\EZdata\EZcount99.sav'/keep num. EXECUTE. **Uses cohort99.sav file to obtain cohort discharges and disreasons in FY99 get file 'c:\cfsr\EZdata\EZcohort99.sav'. do if (missing(dodfcyr) or yrmoda(dodfcyr,dodfcmo,dodfcda)>=yrmoda(1999,10,01)). compute dod= (2). else if ((yrmoda(dodfcyr,dodfcmo,dodfcda)<=yrmoda(1999,09,30)) and (yrmoda(dodfcyr,dodfcmo,dodfcda)>=yrmoda(1998,10,01))). compute dod=(1). end if. formats dod (f1.0). recode disreasn (sysmis=9) (0=9) (1=1) (2=1) (3=3) (5=5)(else=8) into Newdis1. formats Newdis1 (f1.0). value labels Newdis1 1'Reunification' 3'Adoption' 5'Guardianship' 8'Other' 9 'Missing'. select if (dod=1). frequencies variables Newdis1. exe. save outfile='c:\cfsr\EZdata\EZ99FTEC-99dis.sav'. EXECUTE . *Uses 00a file to pick up FY00 discharges of 99 F-TEC. get file 'c:\cfsr\EZdata\EZ0300f.sav'. FILTER OFF. USE ALL. SELECT IF (totalrem=1). SELECT IF ((yrmoda(latremyr,latremmo,latremda) <= yrmoda(1999,03,31)) and (yrmoda(latremyr,latremmo,latremda) >= yrmoda(1998,10,01))). SELECT IF ((yrmoda(dodfcyr,dodfcmo,dodfcda)<=yrmoda(2000,03,31)) and (yrmoda(dodfcyr,dodfcmo,dodfcda)>=yrmoda(1999,10,01))). compute Records=(1). formats Records (f1.0). TABLES /format blank missing('.') /gbase=cases /ftotal=$t000001 "Total" /table=state + $t000001 BY records /statistics count( records( comma6.0 )'N')/Title '00A Discharges from FY99 F-TEC'. exe. save outfile='c:\cfsr\EZdata\EZ99ftec-00dis.sav'. exe. *Merges discharge 99 and 00a files and apply case numbers from FTEC get file='c:\cfsr\EZdata\EZ99ftec-99dis.sav' /keep state to fcmntpay. ADD FILES /FILE=* /FILE='c:\cfsr\EZdata\EZ99ftec-00dis.sav' /keep state to fcmntpay. save outfile='c:\cfsr\EZdata\EZ99ftec-alldis.sav'. exe. MATCH FILES /FILE=* /FILE='c:\cfsr\EZdata\EZcount99.sav'. save outfile='c:\cfsr\EZdata\EZ99ftec-alldis.sav'. EXECUTE. *Using all-discharges file, compute LOS, sort LOS ascending, run median LOS of 99 FTEC *NOTE: If Median Case has not exited from care by the end of 00a, then Mdn LOS will be * computed as 250 or more months, in which case median LOS is "Not yet reached." get file'c:\cfsr\EZdata\EZ99ftec-alldis.sav'. compute LOS1 = (yrmoda(dodfcyr,dodfcmo,dodfcda)-yrmoda(latremyr,latremmo,latremda))/30.4375. DO IF (missing(LOS1)). RECODE LOS1 (sysmis=500). ELSE IF (LOS1<0). RECODE LOS1 (Lowest thru 0=SYSMIS). END IF. exe. SORT CASES BY los1 (A) . exe. variable label LOS1 LOS with "same day" kids (500=Not yet reached). FREQUENCIES Variables=LOS1 /FORMAT=NOTABLE /STATISTICS=MEDIAN /ORDER ANALYSIS. exe. IF (los1 > .01) LOSnosam = los1 . EXECUTE . variable label LOSnosam LOS without "same day" kids (for FTEC footnote). FREQUENCIES Variables=LOSnosam /FORMAT=NOTABLE /STATISTICS=MEDIAN /ORDER ANALYSIS. exe. save outfile='c:\cfsr\EZdata\99ftec-alldis.sav'. EXECUTE.