Changeset 17788 in main


Ignore:
Timestamp:
01/18/19 18:21:25 (4 years ago)
Author:
Paul Leo
Message:

Changes to back end files mostly for birth counts, but some work on Crude Rate, although it is not ready for testing

Location:
adopters/hi/branches/2.3/src/main/backend_qModules/birth
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • adopters/hi/branches/2.3/src/main/backend_qModules/birth/HI_Count_data_frame.def

    r16247 r17788  
    6060        data tmp;
    6161                set new;
    62                 drop _TYPE_ _FREQ_;
     62                *drop _TYPE_ _FREQ_;
    6363                run;           
    6464                       
    6565        proc print data=tmp noobs;
    66                 title2 '2. TMP AGAIN';
     66                title2 '2. TMP AGAIN after merge and dropped vars';
    6767                run;
    6868       
     69 ******* 3. Grab Total rows and merge to calc percentage*********;
     70 *  Create Total data set by reading only total row from tmp     ;
     71 *  Create a new variable called Total from count from total row ;
     72 *  Drop all vars but Total, Add Total to each row using SQL     ;
     73 *  Create new variable called percent                           ;
     74 ****************************************************************;
     75
     76  data Total;
     77        set tmp;
     78        if %cross1% = .
     79        ?cross2? and %cross2% = .
     80         ;
     81         Total = count;
     82         Drop count _TYPE_ _FREQ_ %cross1%
     83            ?cross2? %cross2%
     84        ;
     85   run;
     86   
     87
     88   proc print data=Total noobs;
     89                title2 '3a. Total';
     90   run;
     91   
     92
     93  proc SQL;
     94        Title2 '3b  tmp3 Add total to every record SQL combine two tables';
     95        create table tmp3 as
     96        select * from tmp, total
     97        ;
     98  quit;
     99
     100  proc print; title2 '3c tmp3: Added Total field to every record';
     101run;
     102   
     103
     104        data tmp;
     105                set tmp3;
     106         Percent = count/Total * 100;
     107         run;
     108
     109 proc print data=tmp noobs;
     110                title2 '3d. Create Percent variable';
     111   run;
     112
    69113 
    70   **************** 3. Hawaii Small Numbers Rule ******************;
     114  **************** 4. Hawaii Small Numbers Rule ******************;
    71115  * Suppress cells if the numerator in (1 2 3 4 5)                ;
    72116  * ZW’s program uses ".A" to identify cells for suppression.     ;
     
    91135# definition for output file
    92136f out_variable n
    93 f xml_out_map_file XMLCount.map
     137f xml_out_map_file XMLPercentCount.map
    94138--------BoNdArY--------
    95139f out_detail lbl_not_used__see_xml_out_map_file
     140  percent 15.2
    96141  n 15.0
    97142--------BoNdArY--------
    98143 
    99  ****************** 4. SUPPRESSED VARIABLES *************************;
     144 ****************** 5. SUPPRESSED VARIABLES *************************;
    100145 * ZW's CGI program must be told how many variables it will need to  ;
    101146 * suppress and which ones they are. NOTE: If the SAS code, above, is;
     
    106151 ********************************************************************;
    107152--------BoNdArY--------
    108 1 suppressed_variables 1
     1531 suppressed_variables 2
     154percent
    109155n
    110156--------BoNdArY--------
  • adopters/hi/branches/2.3/src/main/backend_qModules/birth/HI_RateCrude1K_data_frame.def

    r16247 r17788  
    1 #NM_RateCrude1K_data_frame.def
     1#HI_RateCrude1K_data_frame.def
    22#Calculates crude rates for records that have been filtered by IBIS-Q (data=tmp)
    33#Uses the IBIS-Q data_frame for cross1 and cross2
    4 #NM_ = New Mexico cell suppression version
    5 #Applies NM cell suppression rules
     4#HI_ = New Mexico cell suppression version
     5#Applies HI cell suppression rules
    66#Outputs redflag var based on RSE
    77#
    88f type special
    9 f data_where nmres=1
    109#########################################
    1110--------BoNdArY--------
     
    8887
    8988        %macro popcross;
    90 
     89        proc contents data=poptmp;
     90        run;
    9191        %if &flag=0 %then %do;
    9292                proc summary data=poptmp;
     
    155155        %mend;
    156156        %popcross;
    157         proc print data=rate noobs;  title2 '6. RATE - tmp merged with pop dataset';
     157        proc print data=pop noobs;  title2 '6a. pop dataset';
     158        proc print data=rate noobs;  title2 '6b. RATE - tmp merged with pop dataset';
    158159
    159160 ********************** 4. tmp, again ****************************;
     
    187188                if count>0 then do;
    188189                        rse=(stderr/rateper);
    189                         redflag=put('-', $14.);
     190                        redflag=put('Stable', $14.);
     191/* Hawaii not using
    190192                        if rse>.3 then redflag=put('Unstable', $14.);
    191193                        if rse>.5 then redflag=put('Very Unstable', $14.);
     194*/                     
    192195                        if stderr=. then redflag=put('Unstable', $14.);
    193196                end;
    194197                if count<=0 then redflag=put('Unstable', $14.);  *no variance, n=0, rse=div by zero;
     198
     199                proc print data=tmp; title2 'tmp again post rate C.I. stable/unstable label, maybe rounding';
    195200        run;
    196201
    197  ************* 6. New Mexico Small Numbers Rule ********************;
    198  * Suppress cells if the numerator in (1 2 3) AND the denominator   ;
    199  * is less than 20. For Counts, must run the crude rate code to     ;
    200  * capture the denominator, but only output the N. ZW’s program     ;
    201  * uses ".A" to identify cells for suppression. I have co-opted     ;
    202  * his method so I can use the NM logic for cell suppression instead;
    203  * of the standard IBIS logic. And I need to use ZW's program       ;
    204  * because it will suppress the table marginals that can be used to ;
    205  * calculate the suppressed cells. If this code is used, the .def   ;
    206  * file should have the "NM_" prefix. Needs suppressed_variabes     ;
    207  * code at the end of this file to work.                            ;
    208  *******************************************************************;
     202 ************* 6. Hawaii Small Numbers Rule ******************************;
     203 * Suppress cells if the numerator (n) is less than 50 or rse > .3        ;
     204 * capture the denominator, but only output the N. ZW’s program           ;
     205 * uses ".A" to identify cells for suppression. I have co-opted           ;
     206 * his method so I can use the HI logic for cell suppression instead      ;
     207 * of the standard IBIS logic. Am not sure if  I should use ZW's program  ;
     208 * to suppress the table marginals that can be used to                    ;
     209 * calculate the suppressed cells, because I may suppress totals          ;
     210 * If this code is not used, the .cfg file nees to have the               ;
     211 * d suppress_rule skip                                                   ;
     212 *Needs suppressed_variabes  code at the end of this file to work         ;
     213 *************************************************************************;
    209214        data tmp;
    210215                set tmp;
    211                 if ((0<n<4) and (popcount<5000)) then do;
     216                if ((0<n<50) or (rse > .3)) then do;
    212217                        rateper = .A;
    213218                        n = .A;
  • adopters/hi/branches/2.3/src/main/backend_qModules/birth/_Birth15.cfg

    r16247 r17788  
    1515d saspop C:\ibisq\sasData\final\
    1616d sasdata ibis_birth_extract
    17 #d saspopdata ibis_birth_extract
     17d saspopdata ibis_census_pop_est
    1818d sas_bin "C:\Program&Files\SASHome\SASFoundation\9.4\sas.exe"
    1919#r sas_bin sas&-memsize&0
     
    66661 null YearProxy year Year num 10 8
    67671 null GeoProxy null Geography num 10 8
     681 null MomAgeGrpProxy null MothersAgeGrp num 10 8
     691 null DadAgeGrpProxy null FathersAgeGrp num 10 8
    68701 null PrenatalCareProxy null PrenatalCare num 10 8
    6971#### YEAR VARS ####################################     
     
    7274#### MOTHER CHARACTERISTICS ###################
    73754 Mo_State_N StateOverall Mo_State_N MomResidentState num 0 8
    74 4 Mo_County_N GeoCnty Mo_County_N MomResidentCounty num 0 8
     764 Mo_County_N GeoCnty County_N MomResidentCounty num 0 8
    75774 Mo_Island_N GeoMomBirthIsland Mo_Island_N MomResidentCounty num 0 8
    76 4 Mo_Agegrp_N MomAgeGrp Mo_Agegrp_N MothersAge num 0 8
    77 4 Mo_Cenrace_N MomCenRace Mo_Cenrace_N MomCenRaceEth num 0 8
    78 4 Mo_Dohraceeth_N MomDOHRace Mo_Dohraceeth_N MomDOHRaceEth num 0 8
    79 4 Mo_Prgrace_N MomPrgRace Mo_Prgrace_N MomPrgEth num 0 8
     784 Mo_Agegrp_N MomAgeGrp null MothersAge num 0 8
     794 Mo_AgeGrp_PRAMS_N MomAgeGrpPRAMS null MothersAge num 0 8
     804 Mo_Cenrace_N MomCenRace null MomCenRaceEth num 0 8
     814 Mo_Dohraceeth_N MomDOHRace null MomDOHRaceEth num 0 8
     824 Mo_Prgrace_N MomPrgRace null MomPrgEth num 0 8
    80834 Mo_Educ_N MomEdu null MomEdu&Pre&2014 num 0 8
    8184#### don't think next row is done yet ###
     
    83864 Married_N MomMar null MomMaritalStatus num 0 8
    8487#### FATHER CHARACTERISTICS ########################
    85 5 Fa_Agegrp_N DadAgeGrp Fa_Agegrp_N FathersAge num 0 8
    86 5 Fa_Cenrace_N DadCenRace Fa_Cenrace_N DadCenRaceEth num 0 8
    87 5 Fa_Dohraceeth_N DadDOHRace Fa_Dohraceeth_N DadDOHRaceEth num 0 8
    88 5 Fa_Prgrace_N DadPrgRace Fa_Prgrace_N DadPrgRaceEth num 0 8
     885 Fa_Agegrp_N DadAgeGrp null FathersAge num 0 8
     895 Fa_AgeGrp_PRAMS_N DadAgeGrpPRAMS null FathersAge num 0 8
     905 Fa_Cenrace_N DadCenRace null DadCenRaceEth num 0 8
     915 Fa_Dohraceeth_N DadDOHRace null DadDOHRaceEth num 0 8
     925 Fa_Prgrace_N DadPrgRace null DadPrgRaceEth num 0 8
    89935 Fa_Educ_N DadEdu null DadEdu&Pre&2014 num 0 8
    9094#### don't think next row is done yet ###
     
    94986 Birth_County_N GeoInfBirthCnty Birth_County_N InfResidentCounty num 0 8
    95996 Birth_Island_N GeoInfBirthIsland Birth_Island_N InfResidentCounty num 0 8
    96 6 Inf_Gender_N InfSex null InfantSex num 0 8
    97 6 Inf_Cenrace_N InfCenRace Inf_Cenrace_N InfCenRaceEth num 0 8
    98 6 Inf_Dohraceeth_N InfDOHRace Inf_Dohraceeth_N InfDOHRaceEth num 0 8
    99 6 Inf_Prgrace_N InfPrgRace Inf_Prgrace_N InfPrgRaceEth num 0 8
     1006 Inf_Gender_N InfSex null null num 0 8
     1016 Inf_Cenrace_N InfCenRace null InfCenRaceEth num 0 8
     1026 Inf_Dohraceeth_N InfDOHRace null InfDOHRaceEth num 0 8
     1036 Inf_Prgrace_N InfPrgRace null InfPrgRaceEth num 0 8
    1001046 Birth_Order_N InfBirthOrder null BirthOrder num 0 8
    1011056 Multi_Birth_N InfMultBirth null Single/MultipleBirth num 0 8
Note: See TracChangeset for help on using the changeset viewer.