On Feb 4, 2011, at 7:06 PM, Gong-Yi Liao wrote:

Dear list:

  I have tried MASS's mca function and SAS's PROC corresp on the
  farms data (included in MASS, also used as mca's example), the
  results are different:

  R: mca(farms)$rs:
             1             2
1   0.059296637  0.0455871427
2   0.043077902 -0.0354728795
3   0.059834286  0.0730485572
4   0.059834286  0.0730485572
5   0.012900181 -0.0503121890
6   0.038846577 -0.0340961617
7   0.005886752 -0.0438516465
8  -0.015108789 -0.0247221783
9   0.007505626 -0.0646608108
10  0.006631230 -0.0362117073
11  0.013309217 -0.0680733730
12  0.056549933  0.0010773359
13  0.015681958  0.0334320046
14 -0.065598990  0.0151619769
15 -0.046868229  0.0357782553
16 -0.003048803  0.0128157261
17 -0.051281437  0.0278941743
18 -0.051819085  0.0004327598
19 -0.072814626  0.0195622280
20 -0.072814626  0.0195622280

     And in SAS's corresp output:

                               Row Coordinates

                                       Dim1       Dim2

                         1           1.0607    -0.8155
                         2           0.7706     0.6346
                         3           1.0703    -1.3067
                         4           1.0703    -1.3067
                         5           0.2308     0.9000
                         6           0.6949     0.6099
                         7           0.1053     0.7844
                         8          -0.2703     0.4422
                         9           0.1343     1.1567
                        10           0.1186     0.6478
                        11           0.2381     1.2177
                        12           1.0116    -0.0193
                        13           0.2805    -0.5980
                        14          -1.1735    -0.2712
                        15          -0.8384    -0.6400
                        16          -0.0545    -0.2293
                        17          -0.9174    -0.4990
                        18          -0.9270    -0.0077
                        19          -1.3025    -0.3499
                        20          -1.3025    -0.3499


       Is MASS's mca developed with different definition to SAS's
       corresp ?

No, it's just that the values can only be defined up to a scaling factor (the same situation as with eigenvector decompostion). Take a look at the two dimensions, when each is put on the same scale:

> cbind(scale(rmca$D1),scale(smca$Dim1) )
            [,1]        [,2]
 [1,]  1.2824421  1.28242560
 [2,]  0.9316703  0.93168561
 [3,]  1.2940701  1.29403231
 [4,]  1.2940701  1.29403231
 [5,]  0.2789996  0.27905048
 [6,]  0.8401570  0.84016193
 [7,]  0.1273161  0.12731705
 [8,] -0.3267664 -0.32679513
 [9,]  0.1623284  0.16237896
[10,]  0.1434174  0.14339716
[11,]  0.2878460  0.28787641
[12,]  1.2230376  1.22306216
[13,]  0.3391626  0.33913934
[14,] -1.4187467 -1.41879225
[15,] -1.0136458 -1.01364584
[16,] -0.0659382 -0.06588616
[17,] -1.1090928 -1.10915932
[18,] -1.1207208 -1.12076602
[19,] -1.5748033 -1.57475730
[20,] -1.5748033 -1.57475730

> cbind(scale(rmca$D2),scale(smca$Dim2) )
             [,1]        [,2]
 [1,]  1.06673426 -1.06677626
 [2,] -0.83006158  0.83012474
 [3,]  1.70932841 -1.70932351
 [4,]  1.70932841 -1.70932351
 [5,] -1.17729983  1.17729909
 [6,] -0.79784653  0.79781424
 [7,] -1.02612383  1.02608072
 [8,] -0.57849632  0.57844296
 [9,] -1.51305605  1.51309282
[10,] -0.84735007  0.84739189
[11,] -1.59290964  1.59288798
[12,]  0.02520954 -0.02525321
[13,]  0.78230533 -0.78226073
[14,]  0.35478864 -0.35476797
[15,]  0.83720734 -0.83720166
[16,]  0.29988662 -0.29995785
[17,]  0.65272069 -0.65275711
[18,]  0.01012653 -0.01007904
[19,]  0.45775404 -0.45771681
[20,]  0.45775404 -0.45771681

--
David.

       Thank you for any comments!
--
Gong-Yi Liao

Department of Statistics
University of Connecticut

--

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to