Computes a Burt table from a data frame composed of categorical variables.

burt(data)

Arguments

data

data frame with n rows (individuals) and p columns (categorical variables)

Details

A Burt table is a symmetric table that is used in correspondence analysis. It shows the frequencies for all combinations of categories of pairs of variables.

Value

Returns a square matrix. Its dimension is equal to the total number of categories in the data frame.

References

Le Roux B. and Rouanet H., Multiple Correspondence Analysis, SAGE, Series: Quantitative Applications in the Social Sciences, Volume 163, CA:Thousand Oaks (2010).

Le Roux B. and Rouanet H., Geometric Data Analysis: From Correspondence Analysis to Stuctured Data Analysis, Kluwer Academic Publishers, Dordrecht (June 2004).

Author

Nicolas Robette

See also

Examples

## Burt table of variables in columns 1 to 5
## in the Music example data set
data(Music)
burt(Music[,1:5])
#>               FrenchPop.No FrenchPop.Yes FrenchPop.NA Rap.No Rap.Yes Rap.NA
#> FrenchPop.No           194             0            0    159      33      2
#> FrenchPop.Yes            0           301            0    255      43      3
#> FrenchPop.NA             0             0            5      3       1      1
#> Rap.No                 159           255            3    417       0      0
#> Rap.Yes                 33            43            1      0      77      0
#> Rap.NA                   2             3            1      0       0      6
#> Rock.No                146           211            3    304      52      4
#> Rock.Yes                47            86            2    108      25      2
#> Rock.NA                  1             4            0      5       0      0
#> Jazz.No                150           242            3    327      63      5
#> Jazz.Yes                37            56            2     82      12      1
#> Jazz.NA                  7             3            0      8       2      0
#> Classical.No           139           208            4    283      64      4
#> Classical.Yes           52            89            1    129      11      2
#> Classical.NA             3             4            0      5       2      0
#>               Rock.No Rock.Yes Rock.NA Jazz.No Jazz.Yes Jazz.NA Classical.No
#> FrenchPop.No      146       47       1     150       37       7          139
#> FrenchPop.Yes     211       86       4     242       56       3          208
#> FrenchPop.NA        3        2       0       3        2       0            4
#> Rap.No            304      108       5     327       82       8          283
#> Rap.Yes            52       25       0      63       12       2           64
#> Rap.NA              4        2       0       5        1       0            4
#> Rock.No           360        0       0     300       52       8          255
#> Rock.Yes            0      135       0      91       42       2           93
#> Rock.NA             0        0       5       4        1       0            3
#> Jazz.No           300       91       4     395        0       0          304
#> Jazz.Yes           52       42       1       0       95       0           41
#> Jazz.NA             8        2       0       0        0      10            6
#> Classical.No      255       93       3     304       41       6          351
#> Classical.Yes      99       41       2      84       54       4            0
#> Classical.NA        6        1       0       7        0       0            0
#>               Classical.Yes Classical.NA
#> FrenchPop.No             52            3
#> FrenchPop.Yes            89            4
#> FrenchPop.NA              1            0
#> Rap.No                  129            5
#> Rap.Yes                  11            2
#> Rap.NA                    2            0
#> Rock.No                  99            6
#> Rock.Yes                 41            1
#> Rock.NA                   2            0
#> Jazz.No                  84            7
#> Jazz.Yes                 54            0
#> Jazz.NA                   4            0
#> Classical.No              0            0
#> Classical.Yes           142            0
#> Classical.NA              0            7