*Version 2-1-08. ***Adequacy of Prenatal Care Utilization (Kotelchuck) Index. ***Based on Milton Kotelchuck's SAS program version 3. *Suggestions, comments, enhancements, corrections, questions, etc to David dot Laflamme@unh dot edu. *See MCHepi dot com. *Read through the original SAS program before using this SPSS program. *Hint: A Google search for "Kotelchuck SAS program" turned up the original program at the time of this writing. *Many of the user-friendly comments in the original program were left out in this version, so reading the original may be helpful to new users. ***Be sure to read the comments throughout the program BEFORE using it. *Use at your own risk - no guarantees. *Using a single dataset, the results of this program have been successfully verified against the original SAS program. ***Number of Prenatal Care (PNC) Visits. RECODE NBR_PRNTL_VISITS (MISSING=SYSMIS) (Lowest thru -1=SYSMIS) (91 thru Highest=SYSMIS) (ELSE=Copy) INTO npcvbc . VARIABLE LABELS npcvbc 'Number of prenatal care visits'. EXECUTE . ***Month Prenatal Care Began. RECODE premonth (MISSING=SYSMIS) (Lowest thru -1=SYSMIS) (11 thru Highest=SYSMIS) (ELSE=Copy) INTO mpcbbc . VARIABLE LABELS mpcbbc 'Month Prenatal Care Began'. EXECUTE . ***Gestational Age (Calculated). RECODE calc_cln (MISSING=SYSMIS) (Lowest thru 17=SYSMIS) (51 thru Highest=SYSMIS) (ELSE=Copy) INTO gagebc . VARIABLE LABELS gagebc 'Gestational Age (Calculated)'. EXECUTE . ***Sex of Infant. RECODE sexchild (MISSING=SYSMIS) (2 thru Highest=2) (Lowest thru 0=2) (ELSE=Copy) INTO sexbc . VARIABLE LABELS sexbc 'Sex of Infant'. VALUE LABELS sexbc 1 'Male' 2 'Female'. EXECUTE . ***Birth weight in grams. RECODE bweight (MISSING=SYSMIS) (Lowest thru 399=SYSMIS) (6001 thru Highest=SYSMIS) (ELSE=Copy) INTO bwgrams . VARIABLE LABELS bwgrams 'Birth weight in grams'. EXECUTE . ***Omits inconsistent values of mpcbbc or gagebc. DO IF (mpcbbc > (gagebc / 4)) . RECODE mpcbbc (ELSE=SYSMIS) . END IF . EXECUTE . ***IMPORTANT: See original SAS program "Part 3b: No Prenatal Care Codes". ***This program will need to be altered if the answer to any of the questions in Part 3b is YES. *This SPSS program only works correctly if the answer to all of the questions is NO. ***Recodes for No PNC codes (different than above comment). *For invalid combinations of number of PNC visits and month PNC began, vars are recoded to missing. DO IF ((npcvbc = 0 & mpcbbc >= 1) OR (mpcbbc = 0 & npcvbc >= 1)) . RECODE npcvbc mpcbbc (ELSE=SYSMIS) . END IF . EXECUTE . *If number of visits = 0 and month PNC began is missing, month PNC began is recoded to 0. DO IF (npcvbc = 0 & MISSING(mpcbbc)) . RECODE mpcbbc (ELSE=0) . END IF . EXECUTE . *If month PNC began = 0 and number of visits is missing, number of visits is recoded to 0. DO IF (mpcbbc = 0 & MISSING(npcvbc)) . RECODE npcvbc (ELSE=0) . END IF . EXECUTE . ***Gestational Age Imputation. *Create new var to use to indicate whether or not gestational age was imputed. NUMERIC gestimp (F1.0). VARIABLE LABEL gestimp 'Gestation imputed - Yes/No'. VALUE LABELS gestimp 1 'Not imputed' 2 'Imputed'. EXECUTE. **Set values of GESTIMP indicator var to 1=Imputed, 2=Not Imputed. *Set Imputed. DO IF (gagebc >= 18 & gagebc <= 50) . RECODE gestimp (ELSE=1) . END IF . EXECUTE . *Set Not Imputed. DO IF (MISSING(gestimp)) . RECODE gestimp (ELSE=2) . END IF . EXECUTE . ***Imputation formula. *This graph will compare to later graphs to look at the impact of the imputation. FREQUENCIES VARIABLES=gagebc /FORMAT=NOTABLE /BARCHART FREQ /ORDER= ANALYSIS . *First impute birth weight for MALES. DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 530 & bwgrams <= 608) . RECODE gagebc (SYSMIS=22) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 609 & bwgrams <= 698) . RECODE gagebc (SYSMIS=23) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 699 & bwgrams <= 799) . RECODE gagebc (SYSMIS=24) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 800 & bwgrams <= 912) . RECODE gagebc (SYSMIS=25) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 913 & bwgrams <= 1040) . RECODE gagebc (SYSMIS=26) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 1041 & bwgrams <= 1183) . RECODE gagebc (SYSMIS=27) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 1184 & bwgrams <= 1342) . RECODE gagebc (SYSMIS=28) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 1343 & bwgrams <= 1536) . RECODE gagebc (SYSMIS=29) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 1537 & bwgrams <= 1751) . RECODE gagebc (SYSMIS=30) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 1752 & bwgrams <= 1978) . RECODE gagebc (SYSMIS=31) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 1979 & bwgrams <= 2219) . RECODE gagebc (SYSMIS=32) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 2220 & bwgrams <= 2458) . RECODE gagebc (SYSMIS=33) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 2459 & bwgrams <= 2693) . RECODE gagebc (SYSMIS=34) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 2694 & bwgrams <= 2909) . RECODE gagebc (SYSMIS=35) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 2910 & bwgrams <= 3111) . RECODE gagebc (SYSMIS=36) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 3112 & bwgrams <= 3291) . RECODE gagebc (SYSMIS=37) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 3292 & bwgrams <= 3433) . RECODE gagebc (SYSMIS=38) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 3434 & bwgrams <= 3533) . RECODE gagebc (SYSMIS=39) . END IF . DO IF (MISSING(gagebc) & sexbc = 1 & bwgrams >= 3534 & bwgrams <= 6000) . RECODE gagebc (SYSMIS=40) . END IF . *Next impute birth weight for FEMALES. DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 496 & bwgrams <= 568) . RECODE gagebc (SYSMIS=22) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 569 & bwgrams <= 650) . RECODE gagebc (SYSMIS=23) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 651 & bwgrams <= 744) . RECODE gagebc (SYSMIS=24) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 745 & bwgrams <= 849) . RECODE gagebc (SYSMIS=25) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 850 & bwgrams <= 968) . RECODE gagebc (SYSMIS=26) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 969 & bwgrams <= 1101) . RECODE gagebc (SYSMIS=27) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 1102 & bwgrams <= 1251) . RECODE gagebc (SYSMIS=28) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 1252 & bwgrams <= 1429) . RECODE gagebc (SYSMIS=29) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 1430 & bwgrams <= 1636) . RECODE gagebc (SYSMIS=30) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 1637 & bwgrams <= 1860) . RECODE gagebc (SYSMIS=31) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 1861 & bwgrams <= 2089) . RECODE gagebc (SYSMIS=32) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 2090 & bwgrams <= 2328) . RECODE gagebc (SYSMIS=33) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 2329 & bwgrams <= 2561) . RECODE gagebc (SYSMIS=34) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 2562 & bwgrams <= 2787) . RECODE gagebc (SYSMIS=35) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 2788 & bwgrams <= 2991) . RECODE gagebc (SYSMIS=36) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 2992 & bwgrams <= 3160) . RECODE gagebc (SYSMIS=37) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 3161 & bwgrams <= 3293) . RECODE gagebc (SYSMIS=38) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 3294 & bwgrams <= 3388) . RECODE gagebc (SYSMIS=39) . END IF . DO IF (MISSING(gagebc) & sexbc = 2 & bwgrams >= 3389 & bwgrams <= 6000) . RECODE gagebc (SYSMIS=40) . END IF . EXECUTE. *Check impact of imputed gestational age. FREQUENCIES VARIABLES=gagebc /FORMAT=NOTABLE /BARCHART FREQ /ORDER= ANALYSIS . USE ALL. COMPUTE filter_$=(gestimp = 2). VARIABLE LABEL filter_$ 'gestimp = 2 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE . FREQUENCIES VARIABLES=gagebc /FORMAT=NOTABLE /BARCHART FREQ /ORDER= ANALYSIS . FILTER OFF. USE ALL. EXECUTE . *Set gestational imputation indicator variable to missing if gestational age is missing. DO IF (MISSING(gagebc)) . RECODE gestimp (ELSE=SYSMIS) . END IF . EXECUTE . ***Calculation of Adequacy of Initiation of Prenatal Care Index. *Recode variable into new var. DO IF (npcvbc >= 0) . RECODE mpcbbc (SYSMIS=0) (1 thru 2=4) (3 thru 4=3) (5 thru 6=2) (ELSE=1) INTO moindex4 . END IF . VARIABLE LABEL moindex4 'Adequacy of Initiation of Prenatal Care Index'. VALUE LABELS moindex4 0 'Missing Information' 1 'Inadequate' 2 'Intermediate' 3 'Adequate' 4 'Adequate Plus'. EXECUTE. DO IF (MISSING(npcvbc)). RECODE moindex4 (ELSE=0). END IF. EXECUTE. *Unadjusted expected visits. *1st step adjusts solely for length of gestation (based on ACOG recommendations). numeric expvis uexpvis (f3.0). VARIABLE LABELS uexpvis 'Unadjusted Expected Visits' expvis 'Expected visits (based on ACOG)'. do if gagebc >= 35. compute uexpvis = ((gagebc-35) + 9). else if gagebc = 34. compute uexpvis = 9. else if gagebc >= 32. compute uexpvis = 8. else if gagebc >= 30. compute uexpvis = 7. else if gagebc >= 26. compute uexpvis = 6. else if gagebc >= 22. compute uexpvis = 5. else if gagebc >= 18. compute uexpvis = 4. else if gagebc >= 14. compute uexpvis = 3. else if gagebc >= 10. compute uexpvis = 2. else if gagebc >= 6. compute uexpvis = 1. else if gagebc >= 0. compute uexpvis = 0. end if. execute. *2nd step adjusts for month of prenatal care initiation. DO IF MISSING(mpcbbc). COMPUTE expvis=uexpvis. ELSE IF mpcbbc=0. COMPUTE expvis=uexpvis. ELSE IF mpcbbc=10. COMPUTE expvis=(uexpvis-17). ELSE IF mpcbbc=9. COMPUTE expvis=(uexpvis-13). ELSE IF mpcbbc=8. COMPUTE expvis=(uexpvis-9). ELSE IF mpcbbc=7. COMPUTE expvis=(uexpvis-7). ELSE IF mpcbbc=6. COMPUTE expvis=(uexpvis-6). ELSE IF mpcbbc=5. COMPUTE expvis=(uexpvis-5). ELSE IF mpcbbc=4. COMPUTE expvis=(uexpvis-3). ELSE IF mpcbbc=3. COMPUTE expvis=(uexpvis-2). ELSE IF mpcbbc=2. COMPUTE expvis=(uexpvis-1). ELSE IF mpcbbc=1. COMPUTE expvis=uexpvis. END IF. if expvis <= 0 expvis = 1. if missing(expvis) expvis = 1. EXECUTE. *NOTE: The SAS code 'IF EXPVIS <=0 THEN EXPVIS=1' will change missing to 1, but SPSS requires an additional statement (above). ***Calculation of observed/expected ratio (expected visits ratio). COMPUTE evratio=((npcvbc/expvis)*100). VARIABLE LABELS evratio 'Observed/expected visits ratio'. EXECUTE. ***Calculation of adequacy of received service (expected visits) index. DO IF MISSING(evratio). RECODE evratio (ELSE=0) INTO evindex . VARIABLE LABELS evindex 'Adequacy of received service (expected visits)'+ ' index'. VALUE LABELS evindex 0 'Missing information' 1 'Inadequate' 2 'Intermediate' 3 'Adequate' 4 'Adequate plus'. END IF. EXECUTE . DO IF MISSING(mpcbbc). RECODE evindex (ELSE=0). END IF. EXECUTE. DO IF (evratio>109.99). RECODE evindex (ELSE=4). ELSE IF (evratio<=109.99 AND evratio>79.99). RECODE evindex (ELSE=3). ELSE IF (evratio<=79.99 AND evratio>49.99). RECODE evindex (ELSE=2). ELSE IF (evratio<=49.99). RECODE evindex (ELSE=1). END IF. EXECUTE. FREQUENCIES VARIABLES=evindex moindex4 /BARCHART FREQ /ORDER= ANALYSIS . ***Calculation of summative two factor adequacy of prenatal care utilization index. *If evindex or moindex4 are missing, set indexsum to missing. DO IF (evindex=0 OR moindex4=0). COMPUTE indexsum=0. *If evindex is Inadequate or moindex4 is Inadequate or Intermediate, set indexsum to Inadequate. ELSE IF (evindex=1 OR moindex4>=1 AND moindex4<=2). RECODE indexsum (ELSE=1). *If evindex is Adequate or moindex4 is Adequate or Adequate Plus, set indexsum to Adequate. ELSE IF (evindex=3 AND moindex4>=3 AND moindex4<=4). RECODE indexsum (ELSE=3). *If evindex is Adequate Plus or moindex4 is Adequate or Adequate Plus, set indexsum to Adequate Plus. ELSE IF (evindex=4 AND moindex4>=3 AND moindex4<=4). RECODE indexsum (ELSE=4). *For everything not coded above, set indexsum to Intermediate. ELSE. RECODE indexsum (ELSE=2). END IF. VARIABLE LABELS indexsum 'APNCU - Kotelchuck Index'. VALUE LABELS indexsum 0 'Missing information' 1 'Inadequate' 2 'Intermediate' 3 'Adequate' 4 'Intensive Use'. MISSING VALUES indexsum (0). EXECUTE. ***Don't move these 2 lines up higher because they would mess up the APNCU calculation. *Here, they just (optionally) pretty up the tables later on by excluding missing values. MISSING VALUES moindex4 (0). MISSING VALUES evindex (0). FREQUENCIES VARIABLES=indexsum /BARCHART FREQ /ORDER= ANALYSIS . *Create dichotomous variables for the two components and one summary measure. RECODE evindex moindex4 indexsum (MISSING=Copy) (1 thru 2=1) (3 thru 4=2) INTO ev2 mo2 sum2. VARIABLE LABELS ev2 'Adequacy of Received Service - dichotomous' /mo2 'Adequacy of Initiation - dichotomous' /sum2 'APNCU - dichotomous'. VALUE LABELS ev2 mo2 sum2 1 'Inadequate/Intermediate' 2 'Adequate/Intensive' 0 'Missing'. MISSING VALUES ev2 mo2 sum2 (0). EXECUTE . FREQUENCIES VARIABLES=evindex sum2 /ORDER= ANALYSIS . ***Additional Stats. *Create var to flag obs with no PNC. numeric nopnc (f2.0). do if (((npcvbc=0) and ((mpcbbc=0) or (missing(mpcbbc)))) OR ((mpcbbc=0) and ((npcvbc=0) or (missing(npcvbc))))). compute nopnc=1. else if (missing(npcvbc) OR missing(mpcbbc)). compute nopnc=99. else. compute nopnc=2. end if. missing values nopnc (99). variable labels nopnc 'No Prenatal Care Received'. execute.