第 3 章 Figures

3.1 資料的統計性質

dat=read.csv("data/CPS1985.csv")
head(dat)
##    wage education experience age ethnicity region gender occupation
## 1  5.10         8         21  35  hispanic  other female     worker
## 2  6.67        12          1  19      cauc  other   male     worker
## 3  4.00        12          4  22      cauc  other   male     worker
## 4  7.50        12         17  35      cauc  other   male     worker
## 5 13.07        13          9  28      cauc  other   male     worker
## 6  4.45        10         27  43      cauc  south   male     worker
##          sector union married
## 1 manufacturing    no     yes
## 2 manufacturing    no      no
## 3         other    no      no
## 4         other    no     yes
## 5         other   yes      no
## 6         other    no      no
summary(dat[,"wage"])
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   5.250   7.780   9.032  11.250  44.500

3.2 Base R 的繪圖函數 plot()

3.2.1 兩個文字變數

3.2.2 成對的散佈矩陣圖pairs()

3.2.3 比較兩筆資料的qqplot()函數

3.3 三維立體繪圖

3.4 Imaging Correlation相關性影像圖

3.4.1 套件corregram 和 fAssets

3.4.2 levelplot的相關係數視覺化:套件lattice

3.5 Multiway多向式繪圖— 套件lattice

3.5.1 dotchart(), dotplot() 和peichart() 的多向繪圖

3.5.2 散佈點標註文字

3.5.3 histogram 和densityplot: lattice多向呈現資料分佈

3.5.4 xyplot和bwplot: lattice多向呈現雙變數資料關聯

3.6 ggplot2 簡介

3.7 統計分析視覺化

3.7.1 迴歸係數視覺化

3.7.2 迴歸資料視覺化

3.7.3 多種設定績效比較