www.crosshyou.info

政府統計の総合窓口のデータや、OECDやUCIやのデータを使って、Rの練習をしています。ときどき、読書記録も載せています。

HistDataパッケージのFingerprints

f:id:cross_hyou:20220320102832j:plain

Photo by Luis Quintero on Unsplash

HistDataパッケージのFingerprintsデータは、Waiteという人が調べた指紋のデータです。

Waite (1915) was interested in analyzing the association of patterns in fingerprints, and produced a table of counts for 2000 right hands, classified by the number of fingers describable as a "whorl", a "small loop" (or neither). Because each hand contributes five fingers, the number of Whorls + Loops cannot exceed 5, so the contingency table is necessarily triangular.
Karl Pearson (1904) introduced the test for independence in contingency tables, and by 1913 had developed methods for "restricted contingency tables," such as the triangular table analyzed by Waite. The general formulation of such tests for association in restricted tables is now referred to as models for quasi-independence. 

早速データを見てみましょう。

f:id:cross_hyou:20220320103259p:plain

36行のデータフレームで3つの変数です。Whorlsというタイプの指紋の指の数、Loopsというタイプの指の数、その組み合わせの人数ですね。

1行目は、Whorls, Loopsともに0という組わせの人が78人います、ということですね。

このデータセットのヘルプのコマンドは1行だけでした。xtabsでクロス表を作成するものです。

f:id:cross_hyou:20220320103645p:plain