データの種類
定性的データ:カテゴリカルデータ・質的データ
①名義尺度:単に分類するために整理番号として数値を割り当てたもの。
→ 度数・最頻値
②順序尺度:離散的な数値を用いる。順序には意味があるが、数値間の間隔には意味がない
→ 度数・最頻値・中央値
定量的データ:量的データ
①間隔尺度:目盛りが等間隔になっているもの。間隔の和や差には意味があるが、比率には意味がない。
②比例尺度:原点が決まっていて、間隔にも比率にも意味があるもの。和差積商が計算できる。
mtcarsデータの変数について考えてみます。
>?mtcars
A data frame with 32 observations on 11 variables.
[, 1] mpg Miles/(US) gallon →比例尺度
[, 2] cyl Number of cylinders →比例尺度
[, 3] disp Displacement (cu.in.) →比例尺度
[, 4] hp Gross horsepower →比例尺度
[, 5] drat Rear axle ratio →比例尺度
[, 6] wt Weight (lb/1000) →比例尺度
[, 7] qsec 1/4 mile time →比例尺度
[, 8] vs V/S →名義尺度
[, 9] am Transmission (0 = automatic, 1 = manual) →名義尺度
[,10] gear Number of forward gears →比例尺度
[,11] carb Number of carburetors →比例尺度
比例尺度と名義尺度の混ざったデータとなりました。