Exemplar 1 SAS output

To view code that produced this output click here  


Links in this page
Mean income with different design assumptions Subgroup lone parents Percentiles Raking with CALMAR < back to top uparrow
Mean income without weighting from PROC MEANS

The MEANS Procedure

Analysis Variable : HHINC Gross
household weekly income
Mean Std Error
470.8643237 6.0220476

 
Mean income with weighting from PROC MEANS

The MEANS Procedure

Analysis Variable : HHINC Gross
household weekly income
Mean Std Error
483.0912946 6.2472005

 
Survey means analysis with weighting from PROC SURVEYMEANS

The SURVEYMEANS Procedure

Data Summary
Number of Observations 4695
Sum of Weights 2236979
 
Statistics
Variable Label Mean Std Error of Mean
HHINC Gross household weekly income 483.091295 7.877496

 
Mean income with weighting and clustering from PROC SURVEYMEANS

The SURVEYMEANS Procedure

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2236979
 
Statistics
Variable Label Mean Std Error of Mean
HHINC Gross household weekly income 483.091295 10.639429

 
Survey means with post-strata wrongly defined as strata

The SURVEYMEANS Procedure

Data Summary
Number of Strata 9
Number of Clusters 1572
Number of Observations 4695
Sum of Weights 2236979
 
Statistics
Variable Label Mean Std Error of Mean
HHINC Gross household weekly income 483.091295 8.193814

  back to top uparrow
income for lone parents

The FREQ Procedure

lonep Frequency Percent Cumulative
Frequency
Cumulative
Percent
0 4361 92.89 4361 92.89
1 334 7.11 4695 100.00

 
income for lone parents

The SURVEYMEANS Procedure

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2236979
 
Statistics
Variable Label Mean Std Error of Mean
HHINC Gross household weekly income 483.091295 10.639429
 
Domain Analysis: lonep
lonep Variable Label Mean Std Error of Mean
0 HHINC Gross household weekly income 496.022089 11.040819
1 HHINC Gross household weekly income 276.555497 8.495400

 

Next code is output from macro to calculate percentiles

back to top uparrow

The SURVEYMEANS Procedure

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2236979
 
Class Level Information
Class Variable Levels Values
one 1 1
 
Statistics
Variable N Mean Std Error of Mean Sum Std Dev
one=1 4695 1.000000 0 2236979 33691

 
The SURVEYMEANS Procedure

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2236979
 
Statistics
Variable N Mean Std Error of Mean Lower 95%
CL for Mean
Upper 95%
CL for Mean
pct1
pct2
pct3
pct4
pct5
pct6
pct7
4695
4695
4695
4695
4695
4695
4695
0.950084
0.900050
0.750227
0.500167
0.250107
0.100062
0.050348
0.004541
0.005749
0.008572
0.010880
0.009824
0.006995
0.004911
0.941149
0.888738
0.733363
0.478762
0.230778
0.086301
0.040685
0.959019
0.911361
0.767092
0.521573
0.269436
0.113823
0.060010
 
Domain Analysis: one
one Variable N Mean Std Error of Mean Lower 95%
CL for Mean
Upper 95%
CL for Mean
1 pct1
pct2
pct3
pct4
pct5
pct6
pct7
4695
4695
4695
4695
4695
4695
4695
0.950084
0.900050
0.750227
0.500167
0.250107
0.100062
0.050348
0.004541
0.005749
0.008572
0.010880
0.009824
0.006995
0.004911
0.941149
0.888738
0.733363
0.478762
0.230778
0.086301
0.040685
0.959019
0.911361
0.767092
0.521573
0.269436
0.113823
0.060010

 
 

 
Obs ngp level low pct high se
1 1 0.05 98 102 105 3.5
2 1 0.10 127 131 134 3.5
3 1 0.25 198 202 207 4.5
4 1 0.50 345 355 364 9.5
5 1 0.75 605 625 635 15.0
6 1 0.90 953 986 1008 27.5
7 1 0.95 1233 1278 1309 38.0

 

The SURVEYMEANS Procedure

Now percentiles for lone parents and others

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2236979
 
Class Level Information
Class Variable Levels Values
lonep 2 not lone parent lone parent
 
Statistics
Variable N Mean Std Error of Mean Sum Std Dev
lonep=not lone parent
lonep=lone parent
4361
334
0.941081
0.058919
0.003720
0.003720
2105178
131801
34159
8211.226400

 
income for lone parents

The SURVEYMEANS Procedure

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2236979
 
Statistics
Variable N Mean Std Error of Mean Lower 95%
CL for Mean
Upper 95%
CL for Mean
pct1
pct2
pct3
pct4
pct5
pct6
pct7
4695
4695
4695
4695
4695
4695
4695
0.950274
0.900186
0.750070
0.500177
0.250170
0.100204
0.050149
0.004509
0.005763
0.008522
0.010462
0.009650
0.006731
0.004927
0.941402
0.888848
0.733304
0.479594
0.231184
0.086962
0.040456
0.959145
0.911524
0.766837
0.520760
0.269155
0.113447
0.059842
 
Domain Analysis: lonep
lonep Variable N Mean Std Error of Mean Lower 95%
CL for Mean
Upper 95%
CL for Mean
not lone parent pct1
pct2
pct3
pct4
pct5
pct6
pct7
4361
4361
4361
4361
4361
4361
4361
0.950089
0.900061
0.750063
0.500117
0.250095
0.100130
0.050020
0.004752
0.006040
0.008980
0.011024
0.009961
0.006943
0.005104
0.940740
0.888177
0.732397
0.478429
0.230496
0.086471
0.039978
0.959439
0.911945
0.767730
0.521806
0.269693
0.113789
0.060062
lone parent pct1
pct2
pct3
pct4
pct5
pct6
pct7
334
334
334
334
334
334
334
0.953217
0.902178
0.750176
0.501127
0.251364
0.101388
0.052215
0.012072
0.017108
0.024587
0.029976
0.026775
0.016986
0.012635
0.929466
0.868519
0.701803
0.442151
0.198686
0.067970
0.027356
0.976969
0.935837
0.798550
0.560103
0.304041
0.134806
0.077074

 
income for lone parents

Obs ngp level low pct high se
1 1 0.05 97 101 103 3.0
2 1 0.10 125 129 132 3.5
3 1 0.25 199 204 209 5.0
4 1 0.50 361 371 380 9.5
5 1 0.75 629 642 656 13.5
6 1 0.90 984 1006 1032 24.0
7 1 0.95 1254 1290 1341 43.5
8 2 0.05 120 131 144 12.0
9 2 0.10 155 158 159 2.0
10 2 0.25 177 185 191 7.0
11 2 0.50 233 238 244 5.5
12 2 0.75 308 334 346 19.0
13 2 0.90 403 425 439 18.0
14 2 0.95 486 501 539 26.5
back to top uparrow
RAKING WITH CALMAR



                           **********************************
                           ***   Paramètres de la macro   ***
                           **********************************


 Table en entrée                     DATA      =  ex1.ex1
  Pondération initiale               POIDS     =  GROSS2
  Pondération Qk                     PONDQK    =  __UN
  Identifiant                        IDENT     =  SERNUM

 Table des marges                    DATAMAR   =  margins
  Marges en pourcentages             PCT       =  oui
  Effectif de la population          EFFPOP    =  2242012

 Méthode utilisée                    M         =  2
  Borne inférieure                   LO        =
  Borne supérieure                   UP        =
  Seuil d'arrêt                      SEUIL     =  0.0001
  Nombre maximum d'itérations        MAXITER   =  15

 Table contenant la pond. finale     DATAPOI   =  newdata
  Mise à jour de la table DATAPOI    MISAJOUR  =   OUI
  Pondération finale                 POIDSFIN  =   newweight
  Label de la pondération finale     LABELPOI  =  'new weight'
  Contenu de la table DATAPOI        CONTPOI   =  OUI

 Edition des poids                   EDITPOI   =  oui
  Statistiques sur les poids         STAT      =  OUI

 Contrôles                           CONT      =  OUI
 Table contenant les obs. éliminées  OBSELI    =  oui
 Notes SAS                           NOTES     =  NON

 
RAKING WITH CALMAR
Comparaison entre les marges tirées de l'échantillon (avec la pondération initiale)
et les marges dans la population (marges du calage)

Variable Modalité
ou variable
Marge
échantillon
Marge
population
Pourcentage
échantillon
Pourcentage
population
CTBAND 1 515672 556691.58 23.05 24.83
  2 547548 551983.35 24.48 24.62
  3 351599 346390.85 15.72 15.45
  4 291425 267023.63 13.03 11.91
  5 266257 268144.64 11.90 11.96
  6 147851 133399.71 6.61 5.95
  7 87767 88335.27 3.92 3.94
  8 9190 10089.05 0.41 0.45
  9 19670 19953.91 0.88 0.89
tenure 1 1459205 1404172.12 65.23 62.63
  2 493237 484050.39 22.05 21.59
  3 128189 125104.27 5.73 5.58
  4 156348 228685.22 6.99 10.20

 
RAKING WITH CALMAR
Méthode : raking ratio
Premier tableau récapitulatif de l'algorithme :
la valeur du critère d'arrêt et le nombre de poids négatifs après chaque itération

Itération Critère
d'arrêt
Poids
négatifs
1 0.76613 0
2 0.15166 0
3 0.00654 0
4 0.00001 0

 
RAKING WITH CALMAR
Méthode : raking ratio
Deuxième tableau récapitulatif de l'algorithme :
les coefficients du vecteur lambda de multiplicateurs de Lagrange après chaque itération

Variable Modalité lambda1 lambda2 lambda3 lambda4
CTBAND 1 0.56879 0.47901 0.47495 0.47494
CTBAND 2 0.50036 0.41392 0.40990 0.40989
CTBAND 3 0.45898 0.37280 0.36878 0.36877
CTBAND 4 0.40342 0.31382 0.30976 0.30976
CTBAND 5 0.49883 0.41304 0.40902 0.40901
CTBAND 6 0.39398 0.30316 0.29909 0.29908
CTBAND 7 0.51226 0.42669 0.42266 0.42265
CTBAND 8 0.61191 0.52209 0.51805 0.51804
CTBAND 9 0.15442 0.11456 0.11297 0.11297
tenure 1 -0.51408 -0.42874 -0.42471 -0.42470
tenure 2 -0.54190 -0.45563 -0.45161 -0.45160
tenure 3 -0.53395 -0.44849 -0.44448 -0.44447
tenure 4 . . . .

 
RAKING WITH CALMAR
Méthode : raking ratio
Comparaison entre les marges finales dans l'échantillon (avec la pondération finale)
et les marges dans la population (marges du calage)

Variable Modalité
ou variable
Marge
échantillon
Marge
population
Pourcentage
échantillon
Pourcentage
population
CTBAND 1 556691.58 556691.58 24.83 24.83
  2 551983.35 551983.35 24.62 24.62
  3 346390.85 346390.85 15.45 15.45
  4 267023.63 267023.63 11.91 11.91
  5 268144.64 268144.64 11.96 11.96
  6 133399.71 133399.71 5.95 5.95
  7 88335.27 88335.27 3.94 3.94
  8 10089.05 10089.05 0.45 0.45
  9 19953.91 19953.91 0.89 0.89
tenure 1 1404172.12 1404172.12 62.63 62.63
  2 484050.39 484050.39 21.59 21.59
  3 125104.27 125104.27 5.58 5.58
  4 228685.22 228685.22 10.20 10.20

 
RAKING WITH CALMAR
Méthode : raking ratio
Rapports de poids (pondérations finales / pondérations initiales)
pour chaque combinaison de valeurs des variables

Obs council
tax band
tenure Effectif
combinaison
Rapport
de poids
1 1 1 310 1.05152
2 1 2 535 1.02361
3 1 3 108 1.03093
4 1 4 70 1.60792
5 2 1 625 0.98529
6 2 2 362 0.95915
7 2 3 95 0.96601
8 2 4 57 1.50665
9 3 1 545 0.94560
10 3 2 143 0.92051
11 3 3 53 0.92709
12 3 4 60 1.44596
13 4 1 567 0.89141
14 4 2 50 0.86775
15 4 3 22 0.87396
16 4 4 40 1.36309
17 5 1 494 0.98443
18 5 2 5 0.95830
19 5 3 4 0.96516
20 5 4 25 1.50533
21 6 1 274 0.88195
22 6 2 2 0.85854
23 6 4 12 1.34862
24 7 1 175 0.99795
25 7 4 4 1.52600
26 8 1 18 1.09783
27 9 2 8 0.71274
28 9 3 2 0.71784
29 9 4 30 1.11960

 
RAKING WITH CALMAR
Méthode : raking ratio
Statistiques sur les rapports de poids (= pondérations finales / pondérations initiales)
et sur les pondérations finales

The UNIVARIATE Procedure
Variable: _f_ (Rapport de poids)

Moments
N 4695 Sum Weights 4695
Mean 0.99616499 Sum Observations 4676.99464
Std Deviation 0.13439411 Variance 0.01806178
Skewness 2.98518629 Kurtosis 9.58943088
Uncorrected SS 4743.8403 Corrected SS 84.7819795
Coeff Variation 13.4911496 Std Error Mean 0.00196138
 
Basic Statistical Measures
Location Variability
Mean 0.996165 Std Deviation 0.13439
Median 0.984431 Variance 0.01806
Mode 0.985295 Range 0.89517
    Interquartile Range 0.07801
 
Tests for Location: Mu0=0
Test Statistic p Value
Student's t t 507.889 Pr > |t| <.0001
Sign M 2347.5 Pr >= |M| <.0001
Signed Rank S 5511930 Pr >= |S| <.0001
 
Tests for Normality
Test Statistic p Value
Kolmogorov-Smirnov D 0.272914 Pr > D <0.0100
Cramer-von Mises W-Sq 90.95574 Pr > W-Sq <0.0050
Anderson-Darling A-Sq 525.459 Pr > A-Sq <0.0050
 
Quantiles (Definition 5)
Quantile Estimate
100% Max 1.607916
99% 1.607916
95% 1.363091
90% 1.051517
75% Q3 1.023610
50% Median 0.984431
25% Q1 0.945604
10% 0.891411
5% 0.881946
1% 0.867753
0% Min 0.712742
 
Extreme Observations
Lowest Highest
Value SERNUM Obs Value SERNUM Obs
0.712742 3928 3928 1.60792 4517 4517
0.712742 2891 2891 1.60792 4544 4544
0.712742 2889 2889 1.60792 4641 4641
0.712742 2887 2887 1.60792 4661 4661
0.712742 2490 2490 1.60792 4663 4663

 
RAKING WITH CALMAR
Méthode : raking ratio
Statistiques sur les rapports de poids (= pondérations finales / pondérations initiales)
et sur les pondérations finales

The UNIVARIATE Procedure
Variable: _f_ (Rapport de poids)

                                                Histogram                          #             Boxplot
                        1.625+**                                                  70                *
                             .
                             .***                                                 86                *
                             .
                             .**                                                  60                *
                             .**                                                  40                *
                             .*                                                   12                *
                             .
                             .
                        1.175+
                             .*                                                   30                |
                             .*********                                          328                |
                             .******************                                 643             +-----+
                             .************************************************  1760             *--+--*
                             .*********************                              741             +-----+
                             .*************************                          915                |
                             .
                             .
                        0.725+*                                                   10                0
                              ----+----+----+----+----+----+----+----+----+---
                              * may represent up to 37 counts



 
RAKING WITH CALMAR
Méthode : raking ratio
Statistiques sur les rapports de poids (= pondérations finales / pondérations initiales)
et sur les pondérations finales

The UNIVARIATE Procedure
Variable: _f_ (Rapport de poids)

                                                        Normal Probability Plot
                                    1.625+                                               ****
                                         |
                                         |                                           *****
                                         |
                                         |                                          **
                                         |                                         **
                                         |                                         *      +++
                                         |                                            ++++
                                         |                                         +++
                                    1.175+                                     ++++
                                         |                                 ++++   **
                                         |                              +++   *****
                                         |                          ++++ ******
                                         |                     ***********
                                         |                ******
                                         |*****************+
                                         |           ++++
                                         |       ++++
                                    0.725+*  ++++
                                          +----+----+----+----+----+----+----+----+----+----+
                                              -2        -1         0        +1        +2



 
RAKING WITH CALMAR
Méthode : raking ratio
Statistiques sur les rapports de poids (= pondérations finales / pondérations initiales)
et sur les pondérations finales

The UNIVARIATE Procedure
Variable: __wfin (Pondération finale)

Moments
N 4695 Sum Weights 4695
Mean 477.531842 Sum Observations 2242012
Std Deviation 285.403929 Variance 81455.4025
Skewness 16.8529039 Kurtosis 399.776296
Uncorrected SS 1452983780 Corrected SS 382351659
Coeff Variation 59.7664707 Std Error Mean 4.16526032
 
Basic Statistical Measures
Location Variability
Mean 477.5318 Std Deviation 285.40393
Median 439.4656 Variance 81455
Mode 406.6096 Range 8310
    Interquartile Range 152.58147
 
Tests for Location: Mu0=0
Test Statistic p Value
Student's t t 114.6463 Pr > |t| <.0001
Sign M 2347.5 Pr >= |M| <.0001
Signed Rank S 5511930 Pr >= |S| <.0001
 
Tests for Normality
Test Statistic p Value
Kolmogorov-Smirnov D 0.21023 Pr > D <0.0100
Cramer-von Mises W-Sq 91.43645 Pr > W-Sq <0.0050
Anderson-Darling A-Sq 511.3535 Pr > A-Sq <0.0050
 
Quantiles (Definition 5)
Quantile Estimate
100% Max 8500.535
99% 1072.480
95% 744.474
90% 648.947
75% Q3 523.717
50% Median 439.466
25% Q1 371.136
10% 320.924
5% 292.322
1% 246.500
0% Min 190.066
 
Extreme Observations
Lowest Highest
Value SERNUM Obs Value SERNUM Obs
190.066 4151 4151 6174.79 2027 2027
199.583 4042 4042 6946.20 1040 1040
199.676 4163 4163 7573.94 606 606
201.885 3446 3446 7678.18 4305 4305
202.359 4279 4279 8500.53 608 608

 
RAKING WITH CALMAR
Méthode : raking ratio
Statistiques sur les rapports de poids (= pondérations finales / pondérations initiales)
et sur les pondérations finales

The UNIVARIATE Procedure
Variable: __wfin (Pondération finale)

                                                Histogram                          #             Boxplot
                         8750+*                                                    1                *
                             .
                             .*                                                    2                *
                             .
                             .*                                                    1                *
                             .*                                                    1                *
                             .
                             .
                             .
                             .*                                                    1                *
                             .
                             .*                                                    1                *
                             .*                                                    2                *
                             .
                             .*                                                    4                *
                             .*                                                   46                *
                             .*********************                             1384             +--0--+
                          250+************************************************  3252             *--+--*
                              ----+----+----+----+----+----+----+----+----+---
                              * may represent up to 68 counts



 
RAKING WITH CALMAR
Méthode : raking ratio
Statistiques sur les rapports de poids (= pondérations finales / pondérations initiales)
et sur les pondérations finales

The UNIVARIATE Procedure
Variable: __wfin (Pondération finale)

                                                        Normal Probability Plot
                                     8750+                                                  *
                                         |
                                         |                                                  *
                                         |
                                         |                                                  *
                                         |                                                  *
                                         |
                                         |
                                         |
                                         |                                                  *
                                         |
                                         |                                                  *
                                         |                                                  *
                                         |
                                         |                                                  *
                                         |                                            +++****
                                         |                          ++++******************
                                      250+*******************************
                                          +----+----+----+----+----+----+----+----+----+----+
                                              -2        -1         0        +1        +2



 
RAKING WITH CALMAR
Méthode : raking ratio
Contenu de la table newdata contenant la nouvelle pondération newweight

The CONTENTS Procedure

Data Set Name: WORK.NEWDATA Observations: 4695
Member Type: DATA Variables: 2
Engine: V8 Indexes: 0
Created: 15:04 Monday, August 22, 2005 Observation Length: 16
Last Modified: 15:04 Monday, August 22, 2005 Deleted Observations: 0
Protection:   Compressed: NO
Data Set Type:   Sorted: NO
Label:      
 
-----Engine/Host Dependent Information-----
Data Set Page Size: 4096
Number of Data Set Pages: 19
First Data Page: 1
Max Obs per Page: 252
Obs in First Data Page: 176
Number of Data Set Repairs: 0
File Name: C:\DOCUME~1\GILLIA~1\LOCALS~1\Temp\SAS Temporary Files\_TD240\newdata.sas7bdat
Release Created: 8.0202M0
Host Created: WIN_PRO
 
-----Alphabetic List of Variables and Attributes-----
# Variable Type Len Pos Format Label
1 SERNUM Num 8 0 BEST12. sernum
2 newweight Num 8 8   'new weight'

 
RAKING WITH CALMAR



                   *********************
                   ***     BILAN     ***
                   *********************
 *
 *   Date : 21 AOUT 2004               Heure : 20:41
 *
 *   Table en entrée : ex1.ex1
 *
 *   Nombre d'observations dans la table en entrée  : 4695
 *   Nombre d'observations éliminées                : 0
 *   Nombre d'observations conservées               : 4695
 *
 *   Variable de pondération : GROSS2
 *
 *   Nombre de variables catégorielles : 2
 *   Liste des variables catégorielles et de leurs nombres de modalités :
       CTBAND (9  ) tenure (4  )
 *   Taille de l'échantillon (pondéré) : 2236979
 *   Taille de la population           : 2242012
 *
 *   Méthode utilisée : raking ratio
 *   Le calage a été réalisé en 4 itérations
 *   Les poids ont été stockés dans la variable NEWWEIGHT de la table newdata
RAKING WITH CALMAR

The SURVEYMEANS Procedure

Data Summary
Number of Clusters 320
Number of Observations 4695
Sum of Weights 2242012
 
Statistics
Variable Label Mean Std Error of Mean
HHINC Gross household weekly income 475.953932 10.548961