Skip to main content
U.S. flag
Health and Human Services Logo

An official website of the Department of Health & Human Services

menu-iconMore mobile-close-icon
mobile-back-btn-icon Back
  • menu-iconMenu
  • mobile-search-icon
AHRQ: Agency for Healthcare Research and Quality
  • Search All AHRQ Sites
  • Careers
  • Contact Us
  • Español
  • FAQs
  • Email Updates
MEPS Home Medical Expenditure Panel Survey
Font Size:
Contact MEPS FAQ Site Map  
S
M
L
XL

MEPS HC-091: Appendix 1
| << previous page




1                                             The SAS System               12:10 Wednesday, March 14, 2007
NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) 9.1 (TS1M3)
     
1          /* APP05.sas */
2          
3                    OPTIONS LS=132 PS=79;
4          
5                  /*****************************************************************************/
6                  /*   Program Name:  SAMPLE.SAS                                               */
7                  /*                                                                           */
8                  /*   Description:   This job provides an example of how to get job info      */
9                  /*                  from Round 1 or Round 2 in the FY2004 JOBS file when     */
10                 /*                  a Round 3 current main job in the FY2005 JOBS file       */
11                 /*                  is a continuation job.                                   */
12                 /*                                                                           */
13                 /*                  This example creates a dataset of Round 3 continuation   */
14                 /*                  JOBS records with a SICKPAYX variable copied from the    */
15                 /*                         Round 1 or Round 2 newly reported job.            */
16                 /*****************************************************************************/
17         
18                  libname  jobs04   "c:\mydata\jobs04";
NOTE: Libref JOBS04 was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: c:\mydata\jobs04
19                  libname  jobs05   "c:\mydata\jobs05";
NOTE: Libref JOBS05 was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: c:\mydata\jobs05
20         
21                 /*  Select continuing Panel 9, Round 3 Current Main JOBS           */
22                 /*  (SUBTYPE=1, STILLAT=1) from the FY 2005 JOBS file and          */
23                 /*  print selected variables from the first 20 observations        */
24         
25                  data j05r3;
26                  	set jobs05.jobs05;
27         		 	if 	panel=9
28         		 	and	rn=3
29         		 	and	subtype=1
30         		 	and	stillat=1
31         			and	sickpay=-1;
32                  run;
NOTE: There were 56865 observations read from the data set JOBS05.JOBS05.
NOTE: The data set WORK.J05R3 has 5958 observations and 87 variables.
NOTE: DATA statement used (Total process time):
      real time           6.60 seconds
      cpu time            0.28 seconds
      
33         
34                  proc print data=j05r3 (obs=20);
35                  	title 'Print Sample of Continuation Round 3 Records';
36                         var dupersid panel rn jobsn subtype stillat sickpay;
37                  run;
NOTE: There were 20 observations read from the data set WORK.J05R3.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.37 seconds 

 
2                                                          The SAS System                            12:10 Wednesday, March 14, 2007
      cpu time            0.06 seconds
      
38         
39         
40                  /*  Select newly reported Panel 9 Current Main JOBS records from  */
41                  /*  the FY 2004 JOBS file and print selected variables from the   */
42                  /*  first 20 observations.                                        */
43         
44                  data j0412;
45                       set jobs04.jobs04;
46                       if      subtype=1
47                       and     stillat=-1
48                       and     panel=9
49                       and     rn in (1,2);
50                  run;
NOTE: There were 57228 observations read from the data set JOBS04.JOBS04.
NOTE: The data set WORK.J0412 has 8421 observations and 87 variables.
NOTE: DATA statement used (Total process time):
      real time           7.04 seconds
      cpu time            0.23 seconds
      
51         		
52                  proc print data=j0412 (obs=20);
53                       title 'Print Sample of Newly Reported Round 1 and Round 2 Records';
54                       var dupersid panel rn jobsn subtype stillat sickpay;
55                  run;
NOTE: There were 20 observations read from the data set WORK.J0412.
NOTE: The PROCEDURE PRINT printed page 2.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
56         		
57                  proc freq data=j0412;
58                       tables sickpay/list missing;
59                       title 'Sickpay Value of FY2004 Round 1 and Round 2 Newly Reported CMJs';
60                  run;
NOTE: There were 8421 observations read from the data set WORK.J0412.
NOTE: The PROCEDURE FREQ printed page 3.
NOTE: PROCEDURE FREQ used (Total process time):
      real time           0.12 seconds
      cpu time            0.03 seconds
      
61         		
62         		
63                  /*  Prepare FY04 and FY05 data for merge                               */
64         		
65                  proc sort data=j05r3;
66                       by dupersid jobsn;
67                  run;
NOTE: There were 5958 observations read from the data set WORK.J05R3.
NOTE: The data set WORK.J05R3 has 5958 observations and 87 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.17 seconds
      cpu time            0.10 seconds
      
68         		
69                  proc sort data=j0412;
70                       by dupersid jobsn;
71                  run;
NOTE: There were 8421 observations read from the data set WORK.J0412.
NOTE: The data set WORK.J0412 has 8421 observations and 87 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.13 seconds
      cpu time            0.12 seconds

 
3                                                          The SAS System                            12:10 Wednesday, March 14, 2007
72         		
73         				
74                   /*  Create a dataset (J05R3F) that includes all variables             */
75                   /*  for the continuation Round 3 Current Main JOBS and create         */
76                   /*  the new variable SICKPAYX by copying SICKPAY from the             */
77                   /*  corresponding Round 1 or Round 2 newly reported job record.       */
78         		
79                   data j05r3f;
80                        merge j05r3 (in=a) j0412 (in=b  keep = dupersid jobsn sickpay
81         						rename=(sickpay=SICKPAYX));
82                        by dupersid jobsn;
83                        if a and b;
84                   run;
NOTE: There were 5958 observations read from the data set WORK.J05R3.
NOTE: There were 8421 observations read from the data set WORK.J0412.
NOTE: The data set WORK.J05R3F has 5954 observations and 88 variables.
NOTE: DATA statement used (Total process time):
      real time           0.14 seconds
      cpu time            0.12 seconds
      
85         		
86                   proc freq data=j05r3f;
87                        tables sickpay*sickpayx/list missing;
88                        title1  'Diagnostic Post-Merge - Sickpay * Sickpayx';
89                        title2  'Round 3 Continuation Current Main Jobs Only';
90                   run;
NOTE: There were 5954 observations read from the data set WORK.J05R3F.
NOTE: The PROCEDURE FREQ printed page 4.
NOTE: PROCEDURE FREQ used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
      
91         		
92                   OPTIONS LS=132 PS=79;
93             	
94                   /*********************************************************************/
95

 
                                            Print Sample of Continuation Round 3 Records         12:10 Wednesday, March 14, 2007   1
                              Obs    DUPERSID    PANEL    RN    JOBSN    SUBTYPE    STILLAT    SICKPAY
                                1    50001013       9      3      1          1          1         -1  
                                2    50001020       9      3      1          1          1         -1  
                                3    50003018       9      3      1          1          1         -1  
                                4    50003025       9      3      1          1          1         -1  
                                5    50005018       9      3      1          1          1         -1  
                                6    50005025       9      3      1          1          1         -1  
                                7    50006011       9      3      1          1          1         -1  
                                8    50006028       9      3      1          1          1         -1  
                                9    50008013       9      3      1          1          1         -1  
                               10    50010026       9      3      1          1          1         -1  
                               11    50010040       9      3      1          1          1         -1  
                               12    50014015       9      3      1          1          1         -1  
                               13    50014022       9      3      1          1          1         -1  
                               14    50015016       9      3      2          1          1         -1  
                               15    50017013       9      3      1          1          1         -1  
                               16    50017020       9      3      1          1          1         -1  
                               17    50024023       9      3      1          1          1         -1  
                               18    50024030       9      3      3          1          1         -1  
                               19    50025010       9      3      1          1          1         -1  
                               20    50025027       9      3      1          1          1         -1  

 
                                     Print Sample of Newly Reported Round 1 and Round 2 Records                                    2
                                                                                                     12:10 Wednesday, March 14, 2007
                              Obs    DUPERSID    PANEL    RN    JOBSN    SUBTYPE    STILLAT    SICKPAY
                                1    50001013      9       1      1          1         -1          1  
                                2    50001020      9       2      1          1         -1          2  
                                3    50002015      9       1      1          1         -1          1  
                                4    50002022      9       1      1          1         -1          2  
                                5    50002022      9       2      2          1         -1          1  
                                6    50003018      9       1      1          1         -1          1  
                                7    50003025      9       1      1          1         -1          1  
                                8    50005018      9       1      1          1         -1          1  
                                9    50005025      9       1      1          1         -1          1  
                               10    50006011      9       2      1          1         -1          2  
                               11    50006028      9       1      1          1         -1          2  
                               12    50007013      9       1      1          1         -1          2  
                               13    50008013      9       1      1          1         -1          2  
                               14    50008020      9       1      1          1         -1          2  
                               15    50010019      9       1      1          1         -1          2  
                               16    50010026      9       1      1          1         -1          1  
                               17    50010033      9       1      1          1         -1         -1  
                               18    50010040      9       1      1          1         -1          2  
                               19    50010056      9       1      1          1         -1          2  
                               20    50011020      9       1      1          1         -1          1  

 
                                  Sickpay Value of FY2004 Round 1 and Round 2 Newly Reported CMJs                                  3
                                                                                                     12:10 Wednesday, March 14, 2007
                                                         The FREQ Procedure
                                                  DOES PERSON HAVE PAID SICK LEAVE
 
                                                                        Cumulative    Cumulative
                                    SICKPAY    Frequency     Percent     Frequency      Percent
                                    ------------------------------------------------------------
                                         -9          21        0.25            21         0.25  
                                         -8         222        2.64           243         2.89  
                                         -7          11        0.13           254         3.02  
                                         -1        1011       12.01          1265        15.02  
                                          1        3774       44.82          5039        59.84  
                                          2        3382       40.16          8421       100.00  

 
                                             Diagnostic Post-Merge - Sickpay * Sickpayx          12:10 Wednesday, March 14, 2007   4
                                            Round 3 Continuation Current Main Jobs Only
                                                         The FREQ Procedure
                                                                              Cumulative    Cumulative
                              SICKPAY    SICKPAYX    Frequency     Percent     Frequency      Percent
                              ------------------------------------------------------------------------
                                   -1          -9           8        0.13             8         0.13  
                                   -1          -8         132        2.22           140         2.35  
                                   -1          -7           5        0.08           145         2.44  
                                   -1          -1         800       13.44           945        15.87  
                                   -1           1        3007       50.50          3952        66.38  
                                   -1           2        2002       33.62          5954       100.00  


<< previous page