1                                     The SAS System     12:53 Saturday, November 20, 2004

 

NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA.

NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0)

      Licensed to AGENCY FOR HEALTHCARE RESEARCH & QUALITY, Site 0040776001.

NOTE: This session is executing on the WIN_PRO  platform.

 

 

 

NOTE: This installation is running Base SAS hot fix bundle 82BX08.

 

 

NOTE: AUTOEXEC processing beginning; file is C:\PROGRA~1\SASINS~1\SAS\V8\autoexec.sas.

 

1          ** C:\PROGRAM FILES\SAS INSTITUTE\SAS\V8\AUTOEXEC.SAS ;

2         

3          OPTIONS LS= 132 PS= 70 MERGENOBY=ERROR MSGLEVEL=i;

 

NOTE: AUTOEXEC processing completed.

 

1          /****************************************************************\

2         

3          PROGRAM:       C:\MEPS\PROG\EXAMPLE_E1.SAS

4         

5          DESCRIPTION:      THIS EXAMPLE SHOWS HOW TO COMPUTE PERSON-LEVEL

6                         ESTIMATES FOR PERSON-LEVEL HEALTHCARE EXPENDITURES.

7                         ESTIMATES INCLUDE: MEANS, PROPORTIONS, TOTALS.

8         

9          INPUT FILE:       C:\MEPS\DATA\H60.SAS7BDAT (2001 FULL-YEAR DATA FILE)

10                              -- PERSON-LEVEL FILE

11        

12         \****************************************************************/

13        

14         LIBNAME CMEPS V8 'C:\MEPS\DATA' ;

NOTE: Libref CMEPS was successfully assigned as follows:

      Engine:        V8

      Physical Name: C:\MEPS\DATA

15        

16         FOOTNOTE 'PROGRAM: C:\MEPS\PROG\EXAMPLE_E1.SAS';

17        

18         TITLE1 'AHRQ MEPS DATA USERS WORKSHOP (ESTIMATION) -- NOV/DEC 2004';

19         TITLE2 'HEALTHCARE EXPENDITURES, 2001';

20         TITLE3 ' ';

21        

22         /***** THIS DATA STEP READS IN THE REQUIRED VARIABLES FROM THE *****/

23         /***** FULL-YEAR FILE (HC-060).                                *****/

24        

25         /***** VARIABLE AGE IS CREATED BY TAKING THE VALUE OF AGE01X,  *****/

26         /***** OR, IF AGE01X HAS A MISSING VALUE, USING THE VALUE OF   *****/

27         /***** EITHER AGE42X OR AGE31X.                                *****/

28        

29         /***** VARIABLE ANY_EXP IS CREATED AS DICHOTOMOUS VARIABLE     *****/

30         /***** INDICATING IF A PERSON HAD EITHER ZERO OR SOME HEALTH-  *****/

31         /***** CARE EXPENSES IN 2001. A VALUE OF '100' RATHER THAN '1' *****/

32         /***** IS USED TO ALLOW THE OUTPUT TO BE READ AS A PERCENTAGE. *****/

33        

34         DATA H60;

35            SET CMEPS.H60 (KEEP= TOTEXP01 SEX AGE01X AGE42X AGE31X

36                                PERWT01F VARPSU01 VARSTR01);

37            IF AGE01X >= 0

38               THEN AGE = AGE01X;

39            ELSE IF AGE42X >= 0

40               THEN AGE = AGE42X;

41            ELSE IF AGE31X >= 0

42               THEN AGE = AGE31X;

43            ELSE AGE = AGE01X;

44            IF TOTEXP01 = 0

45               THEN ANY_EXP = 0;

46            ELSE ANY_EXP = 100;

47            LABEL TOTEXP01 = '2001 EXPENSES'


 

2                                                          The SAS System                          12:53 Saturday, November 20, 2004

 

48                  ANY_EXP  = 'SOME EXPENSES IN 2001';

49         RUN;

 

NOTE: There were 33556 observations read from the data set CMEPS.H60.

NOTE: The data set WORK.H60 has 33556 observations and 10 variables.

 

50        

51         /***** FORMATS FOR AGE AND SEX ARE USED TO CREATE CATEGORIES *****/

52         /***** FOR THE ANALYSIS PROCEDURES.                          *****/

53        

54         PROC FORMAT;

55            VALUE AGEF

56            0-64 = '0-64'

57            65-90 = '65-90';

NOTE: Format AGEF has been output.

58            VALUE SEXF

59            1 = 'MALE'

60            2 = 'FEMALE';

NOTE: Format SEXF has been output.

61         RUN;

 

 

62         

63         /********** MEANS **********/

64        

65         TITLE4 'WEIGHTED MEAN FOR PERSON-LEVEL TOTAL EXPENDITURES';

66         TITLE5 'AND SUBGROUP ANALYSES FOR AGE AND SEX';

67        

68         PROC SURVEYMEANS DATA= H60 NOBS SUMWGT MEAN STDERR CV CLM;

69            VAR TOTEXP01 ;

70            DOMAIN AGE SEX;

71            STRATA VARSTR01;

72            CLUSTER VARPSU01;

73            WEIGHT PERWT01F;

74            FORMAT AGE AGEF. SEX SEXF. ;

75         RUN;

 

NOTE: Due to nonpositive weights, 1434 observation(s) were deleted.

NOTE: Only one cluster in a stratum in domain AGE for variable(s) TOTEXP01. The variance of TOTEXP01 in that stratum is estimated

      by zero.

NOTE: There were 33556 observations read from the data set WORK.H60.

NOTE: The PROCEDURE SURVEYMEANS printed page 1.

 

76        

77         TITLE4 'COMPARING MEAN EXPENDITURE DIFFERENCES';

78         TITLE5 ' ';

79         TITLE6 'MALE [1] VERSUS FEMALE [0]';

80        

81         /***** RECODE VARIABLE *SEX* SO THAT FEMALE= 0 AND *****/

82         /***** MALE = 1.                                   *****/

83        

84         /***** USE PROC SURVEYREG                          *****/

85        

86         DATA H60V2;

87            SET H60;

88            IF SEX = 2

89               THEN SEX = 0;

90         RUN;

 

NOTE: There were 33556 observations read from the data set WORK.H60.

NOTE: The data set WORK.H60V2 has 33556 observations and 10 variables.

 

91        

92         PROC SURVEYREG DATA= H60V2;

93            MODEL TOTEXP01 = SEX;

94            STRATA VARSTR01;

95            CLUSTER VARPSU01;

96            WEIGHT PERWT01F;


 

3                                                          The SAS System                          12:53 Saturday, November 20, 2004

 

97         RUN;

 

NOTE: In data set H60V2, total 33556 observations read, 1434 observations with missing values or non-positive weights are omitted.

NOTE: The PROCEDURE SURVEYREG printed page 2.

 

98        

99         /********** PROPORTIONS **********/

100       

101        /***** TWO METHODS TO GENERATE PROPORTIONS:      *****/

102        /***** (1) FREQUENCY TABLES                      *****/

103        /***** (2) MEANS OF DICHOTOMOUS VARIABLES        *****/

104       

105        /***** IN SAS V8 PROC FREQ CAN BE USED TO        *****/

106        /***** GENERATE POINT ESTIMATES BUT NOT SEs      *****/

107        /***** OR CONFIDENCE LIMITS.  IN SAS V9 THE      *****/

108        /***** SURVEYFREQ PROCEDURE CAN BE USED TO       *****/

109        /***** GENERATE FREQUENCIES WITH SEs AND         *****/

110        /***** CONFIDENCE LIMITS FOR COMPLEX SURVEYS.    *****/

111       

112        /***** HERE THE DICHOTOMOUS VARIABLE ANY_EXP     *****/

113        /***** IS USED TO USE PROPORTION OF PEOPLE       *****/

114        /***** WITH SOME HELATHCARE EXPENSES IN 2001.    *****/

115       

116        TITLE4 'MEAN OF THE DICHOTOMOUS VARIABLE ANY_EXP';

117       

118        PROC SURVEYMEANS DATA= H60 NOBS SUMWGT MEAN STDERR CLM;

119           VAR ANY_EXP;

120           DOMAIN AGE SEX;

121           STRATA VARSTR01;

122           CLUSTER VARPSU01;

123           WEIGHT PERWT01F;

124           FORMAT AGE AGEF. SEX SEXF. ;

125        RUN;

 

NOTE: Due to nonpositive weights, 1434 observation(s) were deleted.

NOTE: Only one cluster in a stratum in domain AGE for variable(s) ANY_EXP. The variance of ANY_EXP in that stratum is estimated by

      zero.

NOTE: There were 33556 observations read from the data set WORK.H60.

NOTE: The PROCEDURE SURVEYMEANS printed page 3.

 

126       

127        /********** TOTALS **********/

128       

129        /***** THE KEYWORD 'SUM' REQUESTS THE TOTAL FOR   *****/

130        /***** THE VARIABLE TOTEXP01.                     *****/

131       

132        /***** THE KEYWORD 'SUMWGT' REQUESTS THE SUM OF   *****/

133        /***** THE WEIGHTS, i.e. THE POPULATION ESTIMATE. *****/

134       

135        TITLE 'OVERALL TOTAL HEALTHCARE EXPENDITURES';

136       

137        PROC SURVEYMEANS DATA= H60 NOBS SUMWGT SUM STD CLSUM;

138           VAR TOTEXP01;

139           STRATA VARSTR01;

140           CLUSTER VARPSU01;

141           WEIGHT PERWT01F;

142        RUN;

 

NOTE: Due to nonpositive weights, 1434 observation(s) were deleted.

NOTE: There were 33556 observations read from the data set WORK.H60.

NOTE: The PROCEDURE SURVEYMEANS printed page 4.

 

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414


 

                                     AHRQ MEPS DATA USERS WORKSHOP (ESTIMATION) -- NOV/DEC 2004                                    1

                                                   HEALTHCARE EXPENDITURES, 2001                   12:53 Saturday, November 20, 2004

                                                                 

                                         WEIGHTED MEAN FOR PERSON-LEVEL TOTAL EXPENDITURES

                                               AND SUBGROUP ANALYSES FOR AGE AND SEX

 

                                                     The SURVEYMEANS Procedure

 

                                                            Data Summary

 

                                        Number of Strata                                 145

                                        Number of Clusters                               557

                                        Number of Observations                         33556

                                        Number of Observations Used                    32122

                                        Number of Obs with Nonpositive Weights          1434

                                        Sum of Weights                             284247327

 

 

                                                            Statistics

 

                                                 Sum of                     Std Error      Lower 95%      Upper 95%       Coeff of

 Variable   Label                      N        Weights           Mean        of Mean    CL for Mean    CL for Mean      Variation

 ---------------------------------------------------------------------------------------------------------------------------------

 TOTEXP01   2001 EXPENSES          32122      284247327    2555.359713      54.631583    2447.968301    2662.751124       0.021379

 ---------------------------------------------------------------------------------------------------------------------------------

 

 

                                                        Domain Analysis: AGE

 

                                                      Sum of                   Std Error     Lower 95%     Upper 95%      Coeff of

  AGE    Variable  Label                     N       Weights          Mean       of Mean   CL for Mean   CL for Mean     Variation

  --------------------------------------------------------------------------------------------------------------------------------

  0-64   TOTEXP01  2001 EXPENSES         28295     248412067   1944.345562     44.883157   1856.117008   2032.574117      0.023084

  65-90  TOTEXP01  2001 EXPENSES          3827      35835260   6790.944722    239.389968   6320.363250   7261.526194      0.035251

  --------------------------------------------------------------------------------------------------------------------------------

 

 

                                                       Domain Analysis: SEX

 

                                                      Sum of                   Std Error     Lower 95%     Upper 95%      Coeff of

 SEX     Variable  Label                     N       Weights          Mean       of Mean   CL for Mean   CL for Mean     Variation

 ---------------------------------------------------------------------------------------------------------------------------------

 MALE    TOTEXP01  2001 EXPENSES         15369     138630937   2280.601782     81.814411   2119.776037   2441.427527      0.035874

 FEMALE  TOTEXP01  2001 EXPENSES         16753     145616389   2816.937064     62.743712   2693.599328   2940.274800      0.022274

 ---------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

                                                PROGRAM: C:\MEPS\PROG\EXAMPLE_E1.SAS

                                     AHRQ MEPS DATA USERS WORKSHOP (ESTIMATION) -- NOV/DEC 2004                                    2

                                                   HEALTHCARE EXPENDITURES, 2001                   12:53 Saturday, November 20, 2004

                                                                 

                                               COMPARING MEAN EXPENDITURE DIFFERENCES

                                                                  

                                                     MALE [1] VERSUS FEMALE [0]

 

                                                      The SURVEYREG Procedure

 

                                        Regression Analysis for Dependent Variable TOTEXP01

 

                                                           Data Summary

 

                                              Number of Observations            32122

                                              Sum of Weights                284247327

                                              Weighted Mean of TOTEXP01        2555.4

                                              Weighted Sum of TOTEXP01     7.26354E11

 

 

                                                           Design Summary

 

                                                  Number of Strata             145

                                                  Number of Clusters           557

 

 

                                                           Fit Statistics

 

                                                     R-square          0.001278

                                                     Root MSE           7495.07

                                                     Denominator DF         412

 

 

                                               ANOVA for Dependent Variable TOTEXP01

 

                                                               Sum of        Mean

                              Source                   DF     Squares      Square    F Value    Pr > F

 

                              Model                     1    2.043E13    2.043E13      41.10    <.0001

                              Error                 32120    1.597E16    4.971E11                    

                              Corrected Total       32121    1.599E16                                

 

 

                                                       Tests of Model Effects

 

                                              Effect       Num DF    F Value    Pr > F

 

                                              Model             1      31.19    <.0001

                                              Intercept         1    2015.58    <.0001

                                              SEX               1      31.19    <.0001

 

                                  NOTE: The denominator degrees of freedom for the F tests is 412.

 

 

                                                 Estimated Regression Coefficients

 

                                                                 Standard

                                    Parameter      Estimate         Error    t Value    Pr > |t|

 

                                    Intercept    2816.93706    62.7446887      44.90      <.0001

                                    SEX          -536.33528    96.0366671      -5.58      <.0001

 

                                  NOTE: The denominator degrees of freedom for the t tests is 412.

 

 

 

 

 

 

 

                                                PROGRAM: C:\MEPS\PROG\EXAMPLE_E1.SAS

                                     AHRQ MEPS DATA USERS WORKSHOP (ESTIMATION) -- NOV/DEC 2004                                    3

                                                   HEALTHCARE EXPENDITURES, 2001                   12:53 Saturday, November 20, 2004

                                                                  

                                              MEAN OF THE DICHOTOMOUS VARIABLE ANY_EXP

 

                                                     The SURVEYMEANS Procedure

 

                                                            Data Summary

 

                                        Number of Strata                                 145

                                        Number of Clusters                               557

                                        Number of Observations                         33556

                                        Number of Observations Used                    32122

                                        Number of Obs with Nonpositive Weights          1434

                                        Sum of Weights                             284247327

 

 

                                                            Statistics

 

                                                            Sum of                       Std Error       Lower 95%       Upper 95%

 Variable    Label                               N         Weights            Mean         of Mean     CL for Mean     CL for Mean

 ---------------------------------------------------------------------------------------------------------------------------------

 ANY_EXP     SOME EXPENSES IN 2001           32122       284247327       85.353435        0.320337       84.723736       85.983135

 ---------------------------------------------------------------------------------------------------------------------------------

 

 

                                                        Domain Analysis: AGE

 

                                                                 Sum of                     Std Error      Lower 95%      Upper 95%

 AGE     Variable   Label                              N        Weights           Mean        of Mean    CL for Mean    CL for Mean

 ----------------------------------------------------------------------------------------------------------------------------------

 0-64    ANY_EXP    SOME EXPENSES IN 2001          28295      248412067      83.780423       0.359005      83.074714      84.486133

 65-90   ANY_EXP    SOME EXPENSES IN 2001           3827       35835260      96.257645       0.354136      95.561500      96.953790

 ----------------------------------------------------------------------------------------------------------------------------------

 

 

                                                       Domain Analysis: SEX

 

                                                                 Sum of                     Std Error      Lower 95%      Upper 95%

SEX      Variable   Label                              N        Weights           Mean        of Mean    CL for Mean    CL for Mean

-----------------------------------------------------------------------------------------------------------------------------------

MALE     ANY_EXP    SOME EXPENSES IN 2001          15369      138630937      80.416420       0.436449      79.558475      81.274364

FEMALE   ANY_EXP    SOME EXPENSES IN 2001          16753      145616389      90.053615       0.305437      89.453206      90.654024

-----------------------------------------------------------------------------------------------------------------------------------

 

 

 

 

                                                PROGRAM: C:\MEPS\PROG\EXAMPLE_E1.SAS

                                               OVERALL TOTAL HEALTHCARE EXPENDITURES           12:53 Saturday, November 20, 2004   4

 

                                                     The SURVEYMEANS Procedure

 

                                                            Data Summary

 

                                        Number of Strata                                 145

                                        Number of Clusters                               557

                                        Number of Observations                         33556

                                        Number of Observations Used                    32122

                                        Number of Obs with Nonpositive Weights          1434

                                        Sum of Weights                             284247327

 

 

                                                            Statistics

 

                                                        Sum of                                       Lower 95%       Upper 95%

     Variable    Label                       N         Weights             Sum         Std Dev      CL for Sum      CL for Sum

     -------------------------------------------------------------------------------------------------------------------------

     TOTEXP01    2001 EXPENSES           32122       284247327    726354166775     20005091265    687029386898    765678946651

     -------------------------------------------------------------------------------------------------------------------------

 

 

 

 

 

 

 

 

 

 

                                                PROGRAM: C:\MEPS\PROG\EXAMPLE_E1.SAS