群馬大学 | 医学部 | サイトトップ | 医学情報処理演習

医学情報処理演習:2010年度第10回課題

第10回に出てきた関数と文の主なものはこちらを参照されたい。

課題

http://phi.med.gunma-u.ac.jp/medstat/sample10.txtは,悩み相談に訪れて同意を得た人について,THIDとSCOREXという2種類のうつ質問紙調査をして得られたスコアと,精神科医による診察の結果,臨床的にうつと診断されたかどうか(変数CLINICAL,1がうつ,2が健康),さらに喫煙頻度(変数SMOKE,1がヘビースモーカー,2が時々吸う,3が吸わない)を聞き取った結果を示すタブ区切りテキストファイルである(架空のデータである)。

喫煙頻度の異なるグループ間で臨床的にうつの人の割合に差が無いという帰無仮説を検定したところ,有意水準5%でグループ間に有意な差がみられた。そこで,どのグループとどのグループに差があるのか,Holmの方法で検定の多重性を調整したペアごとの比較をしたところ,どのペアでも5%水準では有意差はなかった。しかしサンプルサイズが小さいので近似が不正確であるという警告が表示されたので,検定の多重性はHolmの方法で調整し,ペアごとの比較にフィッシャーの正確な検定(詳しくは次回説明する)を用いるpairwise.fisher.testを使ったところ,ヘビースモーカーと非喫煙者の間のうつの人の割合に有意差が見られた。次に,うつの臨床診断結果をゴールドスタンダードとしたときのTHID及びSCOREXの値についてROC分析をした。コードと結果と解釈を以下に示す。

http://phi.med.gunma-u.ac.jp/medstat/sample10.txt is the tab-delimited text file, which is the result of clinical diagnosis by psychiatry doctor (variable CLINICAL, 1 means depression, 2 means normal), two questionnaires' scores about depression (variable THID and SCOREX), and the frequency of smoking (variable SMOKE, 1 means heavy smoker, 2 means sometimes smoking, 3 means no smoking). This is imaginary data.

We have read this data to R, and tested the null-hypothesis that the proportions of depression are different among smoking groups, with significance level being 0.05. The difference of depression prevalence was significant among different smoking habits. Then we have done pairwise comparisons using Holm's adjustment. There was no pair of significant difference. However, the warning message suggested too small sample size making approximation bad, so that we tried to do pairwise comparison by pairwise.fisher.test (it will be explained in detail next week). As the result, there was significant difference of depression prevalence between heavy smoker and non smoker groups. After that, ROC analyses for THID and SCOREX were done with clinical diagnosis being the gold standard. The code and result with its interpretation are shown below.

学籍番号・氏名とともに,下のフォームと解釈文を穴埋めして送信せよ。

Please write the registry number and name, fill the boxes by adequate characters.


コードは以下の通り。

(The code is shown below.)

x <- read.delim("http://phi.med.gunma-u.ac.jp/medstat/sample10.txt") # read data into x
TAB <- xtabs(~Box A+Box B, data=x) # make a cross table of SMOKE and CLINICAL
prop.test(TAB[,1],Box C(TAB))
pairwise.prop.test(TAB[,1],Box C(TAB))
require(fmsb)
pairwise.fisher.test(TAB[,1],Box C(TAB))
res1 <- roc(x$THID, 2-x$CLINICAL)
res2 <- roc(x$SCOREX, Box D-x$CLINICAL)
print(res1)
print(res2)
layout(1:2)
plot(res1)
plot(res2)

THIDの値についてROC分析をしたところ,最適カットオフ値は17,曲線下面積は0.912となり,同様にSCOREXについてROC分析をしたところ,最適カットオフ値は18,曲線下面積は0.978となった。曲線下面積の大きいSCOREXの方がTHIDよりも性能のよいスクリーニング方法であるといえる。

ROC analysis of THID showed that optimal cut-off value was 17 and AUC was 0.912, and ROC analysis of SCOREX showed that optimal cutoff was 18 and AUC was 0.978. Larger AUC was obtained about the result of SCOREX, then we can judge the higher performance of screening being seen in SCOREX than in THID.

解答フォーム (Answer form)

項目入力欄
学籍番号(数字のみ,半角で)(Reg.No.)
氏名(Name)
Box A
Box B
Box C
Box D
感想・要望・質問など(Comments)


リンクと引用について