李劍龍 陳方堯 李丹玲 周基元 陳平雁
南方醫科大學公共衛生與熱帶醫學學院“器官衰竭防治”國家重點實驗室(510515)
具有相關關系的靈敏度和特異度的Monte Carlo模擬方法研究*
李劍龍#陳方堯#李丹玲 周基元△陳平雁
南方醫科大學公共衛生與熱帶醫學學院“器官衰竭防治”國家重點實驗室(510515)
目的 旨在提出一種Monte Carlo模擬方法,對具有相關關系的靈敏度和特異度進行計算機模擬,并運用其相關系數估計值的均方根誤及偏差對該模擬方法的有效性進行評價;進而探討分析具有相關關系的靈敏度和特異度數據時單樣本Youden指數u檢驗方法的可靠性。方法 將診斷試驗的四格表資料看成來自服從四元正態分布總體的樣本,借助R語言的mvrnorm函數產生四格表資料,其滿足靈敏度和特異度之間的總體相關系數。計算相關系數估計值的均方根誤及偏差,并計算Youden指數u檢驗的第I類錯誤率與檢驗效能。結果 相關系數估計值的均方根誤及偏差均較小。當相關系數ρ為0時,u檢驗能很好地控制犯第I類錯誤的概率;然而,當ρ不是0時,u檢驗的結果偏保守,并且隨著|ρ|的增加,其結果偏離0.05更甚。結論 本文提出的具有相關關系靈敏度和特異度的Monte Carlo模擬方法能真實地反應靈敏度和特異度之間的相關性;當相關性強時,Youden指數u檢驗的前提假設不正確。
相關系數 Monte Carlo模擬 靈敏度 特異度
科學的評價診斷試驗是臨床醫師選擇診斷試驗的基礎[1]。為了合理選用診斷試驗以避免盲目性,臨床醫師就需要對診斷試驗進行科學研究并做出科學的評價。在進行兩個診斷系統比較時,單獨使用靈敏度與特異度作為評價指標不能完美判斷哪個診斷系統更好。由此,Youden建議將靈敏度與特異度綜合起來提出了Youden指數來評價診斷試驗的準確度[2]。Youden指數(Youden index,YI)是評價診斷方法診斷能力的綜合性指標[3]。YI的值介于-1與1之間,其值越大,說明診斷試驗的真實性越好;當YI小于等于0時,該診斷試驗無任何臨床應用價值[1]。
然而,對于現有診斷試驗的評價方法能否正確地對診斷試驗進行評價都是需要進行檢驗的。單樣本Youden指數u檢驗可以用于檢驗單樣本的Youden指數是否為某一常數。注意到其需要一個前提假設,即要求靈敏度和特異度之間是相互獨立的。然而,現實中靈敏度和特異度通常是相關的[4-5]。有研究曾提出采用多項分布來模擬產生兩個相關的二項分布數據(四格表數據),然而這種方法早前曾被研究人員證實所產生的數據并不能良好地反應出所設定的參數[6-7]。因此,本研究旨在提出一種Monte Carlo模擬方法[8],對具有相關關系的靈敏度和特異度進行計算機模擬,并運用其相關系數估計值的均方根誤(root mean squared error,RMSE)及偏差對該模擬方法的有效性進行評價;進而計算出其樣本Youden指數,運用現有的單樣本Youden指數u檢驗方法對模擬數據進行分析,重復多次模擬時計算其第I類錯誤率與檢驗效能,以探討運用u檢驗方法分析具有相關關系的靈敏度和特異度數據時的可靠性。
1.理論背景
(1)靈敏度與特異度之間的相關系數
在實際應用過程中,靈敏度與特異度之間存在著一定的相關關系[4-5],體現二者相關關系的方法很多[9]。本文只考慮將二者之間的相關關系與二者之間的線性回歸聯系起來的方法,其滿足r=bSpe.Sen(SSen/SSpe)=bSen.Spe(SSpe/SSen),其中r為靈敏度與特異度之間的樣本相關系數,bSpe.Sen與bSen.Spe分別表示由靈敏度到特異度的回歸系數和由特異度到靈敏度的回歸系數,SSen與SSpe分別為靈敏度與特異度的標準誤。
(2)靈敏度Sen、特異度Spe及Youden指數的u檢驗[1]
(1)
給定一個四格表診斷試驗數據與三個常數Sen0、Spe0與YI0,對靈敏度、特異度與Youden指數可以做單樣本的u檢驗,其檢驗統計量分別為
(2)
2.模擬方法
(1)模擬第I類錯誤率時的參數設置
設p1、p2、p3與p4分別為四格表中四個實際頻數a、b、c與d的理論頻率,t=p1+p3=0.5,1-t=p2+p4=0.5,給定靈敏度總體均數μ1=0.65,特異度總體均數μ2=0.75,那么p1=0.325,p2=0.175,p3=0.125,p4=0.375。總樣本量n為100、200、300、500與1000,靈敏度和特異度之間的總體相關系數ρ為0、-0.3與-0.4。從而,三個檢驗的原假設分別為Sen0=0.65、Spe0=0.75、YI0=0.4。
(2)模擬靈敏度和特異度之間的相關關系與四格表數據
(3)靈敏度和特異度之間相關系數的估計
(4)模擬檢驗效能時的參數設置
三個檢驗的原假設仍然分別取為Sen0=0.65、Spe0=0.75、YI0=0.4。而在備擇假設條件下Sen、Spe和YI的設置如表1,其中D=YI-YI0。另外,總樣本量n、靈敏度和特異度之間總體相關系數ρ的取法與第I類錯誤率模擬中的參數設置相同。
(5)模擬第I類錯誤率與檢驗效能
1.靈敏度和特異度之間相關系數的均方根誤與偏差
2.單樣本靈敏度、特異度與Youden指數u檢驗的第I類錯誤率
在不同ρ值與不同樣本量條件下,單樣本靈敏度、特異度與Youden指數u檢驗的第I類錯誤率結果見表3。無論ρ為0還是不為0,靈敏度與特異度的u檢驗第I類錯誤率基本控制在0.05的附近。因此,本文新提出的模擬方法能準確地模擬出所設定的參數。另一方面,由于單樣本Youden指數u檢驗有一個前提假設,即要求靈敏度和特異度之間是相互獨立的。因此,當靈敏度和特異度的相關系數為0時,其u檢驗能很好地控制犯第I類錯誤的概率。然而,當相關系數ρ不是0時,單樣本Youden指數u檢驗的結果偏保守,并且隨著相關性的增強,其結果偏離0.05更甚。
3.單樣本Youden指數u檢驗的檢驗效能
在不同ρ值與不同樣本量條件下,單樣本Youden指數u檢驗的檢驗效能結果見圖1。注意,當YI與YI0之間的差值D為0時,其為u檢驗的第I類錯誤率。從圖形可以看出,當相關系數與樣本量固定時,YI與YI0之間差值D的絕對值越大,單樣本Youden指數u檢驗的檢驗效能越大。另外,隨著樣本量的增加,其檢驗效能逐漸增大。
本文提出了一種基于四元正態分布總體、對具有相關關系的靈敏度和特異度進行Monte Carlo模擬的方法。從模擬結果可以看出,模擬方法能真實地反應靈敏度和特異度之間的相關系數。運用現有的單樣本Youden指數u檢驗方法對模擬數據進行分析,重復多次模擬時計算其第I類錯誤率。從模擬結果可以看出,當靈敏度和特異度的相關系數為0時,u檢驗能很好地控制犯第I類錯誤的概率。然而,當相關系數ρ不是0時,單樣本Youden指數u檢驗的結果偏保守,并且隨著相關性的增強,其結果偏離0.05更甚。因此,當靈敏度和特異度之間的相關性強時,反應診斷試驗真實性的綜合評價指標Youden指數單樣本u檢驗的前提假設不正確。
本文只模擬了總樣本量大于等于100的情形,將來要針對小樣本做適當的模擬。另外,本文中靈敏度與特異度之間的相關關系采用了二者標準化后將二者之間的回歸與相關聯系起來的方法,但是靈敏度與特異度之間的相關關系并不僅限于此種形式,在將來的研究中要選取更多體現相關關系的情況進行模擬分析。
[1]Galen RS,Brennan L.Laboratory Diagnosis and Patient Monitoring:Clinical Chemistry.Oradell,New Jersey:Medical Economics Company,1981.
[2]Yerushalmy J.Statistical problems in assessing methods of medical diagnosis,with special reference to X-ray techniques.Public Health Reports (1896-1970),1947,62(40):1432-1449.
[3]Youden WJ.Index for rating diagnostic tests.Cancer,1950,3(1):32-35.
[4]Zhou XH,Obuchowski NA,McClish DK.Statistical Method in Diagnostic Medicine.New York:John Wiley & Sons,2002.
[5]Fleiss JL,Levin B,Paik MC.Statistical Methods for Rates and Proportions.New York:John Wiley & Sons,2013.
[6]Johnson NL,Kotz S,Balakrishnan N.Discrete Multivariate Distributions.New York:Wiley,1997.
[7]Mardia KV.Families of Bivariate Distributions.London:Griffin,1970.
[8]文德智,卓仁鴻,丁大杰,等.蒙特卡羅模擬中相關變量隨機數序列的產生方法.物理學報,2012,61(22):220204-220204.
[9]Rodgers JL,Nicewander WA.Thirteen ways to look at the correlation coefficient.The American Statistician,1988,42(1):59-66.
(責任編輯:郭海強)
A Monte Carlo Simulation Method for Generating the Correlated Sensitivity and Specificity
Li Jianlong,Chen Fangyao,Li Danling,et al
(State Key Laboratory of Organ Failure Research,School of Public Health and Tropical Medicine,Southern Medical University (510515),Guangzhou)
Objective This study aims to propose a Monte Carlo simulation method to generate the correlated sensitivity and specificity in diagnostic trials,and then calculate the root mean squared error (RMSE) and bias of the estimate of the correlation coefficient between them so as to assess the validity of the proposed simulation method.Further,we study the reliability of the existingutest for single sampleYoudenindex based on the data where the sensitivity and specificity are correlated.Methods In the simulation study,the diagnostic test data are considered to be generated from a four-dimensional normal distribution and the four-fold table data in the diagnostic test are generated from the mvrnorm function in R,where the sample correlation coefficient between the sensitivity and specificity is kept close to the population correlation coefficientρ.As such,the corresponding RMSE and bias,the type I error rate and power can be calculated.Results Both the RMSE and bias are very small.Whenρis 0,theutest can control the type I error rate well.However,whenρis not 0,theutest is conservative.Further,with the increase of |ρ|,the type I error rate is much more faraway from 0.05.Conclusion The Monte Carlo simulation method proposed in this article can effectively simulate the correlation relationship between the sensitivity and specificity.When there is a strong correlation between the sensitivity and specificity,the independence assumption between them is not so reasonable for theutest of single sampleYoudenindex in diagnostic test.
Correlation coefficient;Monte Carlo simulation;Sensitivity;Specificity
國家自然科學基金項目(81373098,81072386,81402759);廣東省醫學科研基金(B2013222)和全國統計科學研究計劃項目(2013LY059)共同資助。
# 李劍龍與陳方堯為共同第一作者
△通信作者:周基元,E-mail:zhoujiyuan5460@hotmail.com