英語コーパス学会第41回大会ワークショップ

「Webアプリケーションを使ったコーパス研究のための統計的手法」

会場:愛知大学名古屋キャンパス
日時:2015年10月3日(土)10:00–12:00


スライド


Rで分析を実行する場合

# vcd パッケージがない場合はインストール
# install.packages("vcd")

# データ読み込み
dat <- read.csv("http://www.mizumot.com/files/JAECS2015Table.csv", header=T, row.names=1) 
## Warning in read.table(file = file, header = header, sep = sep, quote =
## quote, : incomplete final line found by readTableHeader on
## 'http://www.mizumot.com/files/JAECS2015Table.csv'
# 読み込んだデータの確認
dat
##         Corpus.A Corpus.B
## Word.X        12        9
## Word.Y         8       11
# データの型を行列に変更
x <- as.matrix(dat)

# Pearson's Chi-squared Test
chisq.test(x, correct=F)
## 
##  Pearson's Chi-squared test
## 
## data:  x
## X-squared = 0.9023, df = 1, p-value = 0.3422
# Yates' Continuity Correction
chisq.test(x)
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  x
## X-squared = 0.401, df = 1, p-value = 0.5266
# Log-likelihood Ration (G-test)
library(vcd)
assocstats(x)          
##                      X^2 df P(> X^2)
## Likelihood Ratio 0.90571  1  0.34125
## Pearson          0.90226  1  0.34218
## 
## Phi-Coefficient   : 0.15 
## Contingency Coeff.: 0.149 
## Cramer's V        : 0.15
# Fisher's Exact Test
fisher.test(x)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  x
## p-value = 0.5273
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.4416666 7.7255071
## sample estimates:
## odds ratio 
##   1.805369

ワークショップ担当者

Atsushi MIZUMOTO, Ph.D.
email: atsushi[at]mizumot.com
Associate Professor of Applied Linguistics
Faculty of Foreign Language Studies
Graduate School of Foreign Language Education and Research
Kansai University, Osaka, Japan