The CORRESP Procedure

Example 36.2 Simple Correspondence Analysis of U.S. Population

(View the complete code for this example.)

In this example, PROC CORRESP reads an existing contingency table with supplementary observations and performs a simple correspondence analysis. The data are populations of the 50 U.S. states, grouped into regions, for each of the census years from 1920 to 1970 (US Bureau of the Census 1979). Alaska and Hawaii are treated as supplementary regions, because they were not states during this entire period and are not physically connected to the other 48 states. Consequently, it is reasonable to expect that population changes in these two states operate differently from population changes in the other states. The correspondence analysis is performed giving the supplementary points negative weight, and then the coordinates for the supplementary points are computed in the solution defined by the other points.

The initial DATA step reads the table, provides labels for the years, flags the supplementary rows with negative weights, and specifies absolute weights of 1000 for all observations because the data were originally reported in units of 1000 people.

In the PROC CORRESP statement, PRINT=PERCENT and the display options display the table of cell percentages (OBSERVED), cell contributions to the total chi-square scaled to sum to 100 (CELLCHI2), row profile rows that sum to 100 (RP), and column profile columns that sum to 100 (CP). The SHORT option specifies that the correspondence analysis summary statistics, contributions to inertia, and squared cosines should not be displayed. Because the data are already in table form, a VAR statement is used to read the table. Row labels are specified with the ID statement, and column labels come from the variable labels. The WEIGHT statement flags the supplementary observations and restores the table values to populations.

The following statements produce Output 36.2.1:

title 'United States Population, 1920-1970';

data USPop;

   * Regions:
   * New England     - ME, NH, VT, MA, RI, CT.
   * Great Lakes     - OH, IN, IL, MI, WI.
   * South Atlantic  - DE, MD, DC, VA, WV, NC, SC, GA, FL.
   * Mountain        - MT, ID, WY, CO, NM, AZ, UT, NV.
   * Pacific         - WA, OR, CA.
   *
   * Note: Multiply data values by 1000 to get populations.;

   input Region $14. y1920 y1930 y1940 y1950 y1960 y1970;

   label y1920 = '1920'    y1930 = '1930'    y1940 = '1940'
         y1950 = '1950'    y1960 = '1960'    y1970 = '1970';

   if region = 'Hawaii' or region = 'Alaska'
      then w = -1000;       /* Flag Supplementary Observations */
      else w =  1000;

   datalines;
New England        7401  8166  8437  9314 10509 11842
NY, NJ, PA        22261 26261 27539 30146 34168 37199
Great Lakes       21476 25297 26626 30399 36225 40252
Midwest           12544 13297 13517 14061 15394 16319
South Atlantic    13990 15794 17823 21182 25972 30671
KY, TN, AL, MS     8893  9887 10778 11447 12050 12803
AR, LA, OK, TX    10242 12177 13065 14538 16951 19321
Mountain           3336  3702  4150  5075  6855  8282
Pacific            5567  8195  9733 14486 20339 25454
Alaska               55    59    73   129   226   300
Hawaii              256   368   423   500   633   769
;
ods graphics on;

* Perform Simple Correspondence Analysis;
proc corresp data=uspop print=percent observed cellchi2 rp cp chi2p
     short plot(flip);
   var y1920 -- y1970;
   id Region;
   weight w;
run;

The contingency table shows that the population of all regions increased over this time period. The row profiles show that population increased at a different rate for the different regions. There was a small increase in population in the Midwest, for example, but the population more than quadrupled in the Pacific region over the same period. The column profiles show that in 1920, the U.S. population was concentrated in the NY, NJ, PA, Great Lakes, Midwest, and South Atlantic regions. With time, the population shifted more to the South Atlantic, Mountain, and Pacific regions. This is also clear from the correspondence analysis. The inertia and chi-square decomposition table shows that there are five nontrivial dimensions in the table, but the association between the rows and columns is almost entirely one-dimensional.

Output 36.2.1: United States Population, 1920–1970

United States Population, 1920-1970

The CORRESP Procedure

Contingency Table
Percents192019301940195019601970Sum
New England0.8300.9160.9461.0451.1791.3286.245
NY, NJ, PA2.4972.9463.0893.3823.8334.17319.921
Great Lakes2.4092.8382.9873.4104.0644.51620.224
Midwest1.4071.4921.5161.5771.7271.8319.550
South Atlantic1.5691.7721.9992.3762.9143.44114.071
KY, TN, AL, MS0.9981.1091.2091.2841.3521.4367.388
AR, LA, OK, TX1.1491.3661.4661.6311.9022.1679.681
Mountain0.3740.4150.4660.5690.7690.9293.523
Pacific0.6250.9191.0921.6252.2822.8559.398
Sum11.85913.77314.77116.90020.02022.677100.000

Supplementary Rows
Percents192019301940195019601970
Alaska0.0061700.0066190.0081890.0144710.0253530.033655
Hawaii0.0287190.0412830.0474530.0560910.0710110.086268

Contributions to the Total Chi-Square Statistic
Percents192019301940195019601970Sum
New England0.9370.3140.0540.0090.3520.4692.135
NY, NJ, PA0.6651.2870.6330.0060.5212.2655.378
Great Lakes0.0040.0850.0000.0010.0050.0940.189
Midwest5.7492.0390.6840.0721.5464.47214.563
South Atlantic0.5091.2310.2590.0000.2851.6883.973
KY, TN, AL, MS1.4540.7111.0980.0870.9462.9457.242
AR, LA, OK, TX0.0000.0690.0770.0010.0590.0300.238
Mountain0.3910.8680.4970.0980.4981.8344.187
Pacific18.5919.3805.4580.0747.34621.24862.096
Sum28.30215.9868.7610.34911.55835.046100.000

Row Profiles
Percents192019301940195019601970
New England13.294714.668815.155716.731018.877721.2722
NY, NJ, PA12.536214.788815.508516.976619.241620.9484
Great Lakes11.912914.032514.769716.862620.094322.3281
Midwest14.734815.619315.877716.516718.082519.1691
South Atlantic11.153512.591714.209316.887220.706024.4523
KY, TN, AL, MS13.503315.012616.365517.381318.296919.4403
AR, LA, OK, TX11.868714.111115.140116.847119.643322.3897
Mountain10.624211.789813.216616.162421.831226.3758
Pacific6.64539.782311.618217.291824.278430.3841

Supplementary Row Profiles
Percents192019301940195019601970
Alaska6.53217.00718.669815.320726.840935.6295
Hawaii8.680912.478814.343816.954921.464926.0766

Column Profiles
Percents192019301940195019601970
New England7.00126.65116.40786.18265.88865.8582
NY, NJ, PA21.058621.389420.915520.010919.145718.4023
Great Lakes20.316020.604220.222120.178820.298319.9126
Midwest11.866410.830310.26609.33378.62598.0730
South Atlantic13.234312.864113.536314.060614.553215.1729
KY, TN, AL, MS8.41268.05298.18577.59856.75216.3336
AR, LA, OK, TX9.68889.91819.92279.65039.49839.5581
Mountain3.15583.01523.15193.36883.84114.0971
Pacific5.26636.67487.39219.615811.396812.5921


crse2aa

Row Coordinates
 Dim1Dim2
New England0.06110.0132
NY, NJ, PA0.0546-0.0117
Great Lakes0.0074-0.0028
Midwest0.13150.0186
South Atlantic-0.05530.0105
KY, TN, AL, MS0.1044-0.0144
AR, LA, OK, TX0.0131-0.0067
Mountain-0.11210.0338
Pacific-0.2766-0.0070

Supplementary Row Coordinates
 Dim1Dim2
Alaska-0.41520.0912
Hawaii-0.1198-0.0321

Column Coordinates
 Dim1Dim2
19200.16420.0263
19300.1149-0.0089
19400.0816-0.0108
1950-0.0046-0.0125
1960-0.0815-0.0007
1970-0.13350.0086

crse2d

ODS Graphics is used to plot the results. The results are essentially one-dimensional. For results such as these, it is better to plot the first dimension vertically, as opposed to the default, which is horizontally. The vertical orientation has fewer opportunities for label collisions. Specifying PLOTS(FLIP) on the PROC CORRESP statement switches the vertical and horizontal axes to improve the graphical display.

The plot shows that the first dimension correctly orders the years. There is nothing in the correspondence analysis that forces this to happen; the analysis has no information about the inherent ordering of the column categories. The ordering of the regions and the ordering of the years reflect the shift over time of the U.S. population from the Northeast quadrant of the country to the South and to the West. The results show that the West and Southeast grew faster than the rest of the contiguous 48 states during this period.

The plot also shows that the growth pattern for Hawaii was similar to the growth pattern for the mountain states and that Alaska’s growth was even more extreme than the Pacific states’ growth. The row profiles confirm this interpretation.

The Pacific region is farther from the origin than all other active points. The Midwest is the extreme region in the other direction. The table of contributions to the total chi-square shows that 62% of the total chi-square statistic is contributed by the Pacific region, which is followed by the Midwest at over 14%. Similarly the two extreme years, 1920 and 1970, together contribute over 63% to the total chi-square, whereas the years nearer the origin of the plot contribute less.

Last updated: February 13, 2019