混合模型的縱向數(shù)據(jù)分析課件_第1頁
混合模型的縱向數(shù)據(jù)分析課件_第2頁
混合模型的縱向數(shù)據(jù)分析課件_第3頁
混合模型的縱向數(shù)據(jù)分析課件_第4頁
混合模型的縱向數(shù)據(jù)分析課件_第5頁
已閱讀5頁,還剩49頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、第三章 混合模型的縱向數(shù)據(jù)分析線性模型分成數(shù)據(jù)的混合模型這里這里 是協(xié)方差矩陣,即是協(xié)方差矩陣,即 的的元素不需要獨立元素不需要獨立縱向數(shù)據(jù)(Longitudinal Data)的混合模型 常見的是和時間有關(guān),如 中的元素服從時間序列模型,自回歸模型,滑動平均模型等,并有周期。 例如模型 的選取對于AR(1)令 其中 獨立。假設(shè) 則時間序列平穩(wěn)且時間序列有單位根即 。AR(1)簡介令 和 為給定t-1時刻前的條件期望和方差,則因此AR(1)模型的數(shù)值特征均值方差為分布為無條件期望方差定義協(xié)方差相關(guān)系數(shù) 因為自相關(guān)系數(shù)協(xié)方差 d階自相關(guān)系數(shù) d階自相關(guān)系數(shù)對于ARMA(1,1)模型 其中一般形式

2、 其中 ARMA(1,1)簡介假設(shè)其中 , ARMA(1,1) 另一種形式為自協(xié)方差函數(shù) 其中MA( )方差方差自協(xié)方差函數(shù)自相關(guān)系數(shù)第一層模型分層模型第二層模型混合模型截距項組間(時間不變)組內(nèi)(時變的)交互說明記為其中4個組群,隨機(jī)部分隨機(jī)部分方差模型的矩陣形式1這里矩陣形式2矩陣形式3矩陣形式4廣義最小二乘(GLS) 極大似然估計,同時估計 , 采用 anova 函數(shù), 其中 為固定效應(yīng), 為隨機(jī)效應(yīng),常被低估. 限制的極大似然估計,先估計 然后采用GLS估計 ,采用函數(shù)lme, 更精確兩種估計算法程序數(shù)據(jù)集描述(畸齒畸齒矯,orthodontics) Investigators at

3、the University of North Carolina Dental School followed the growth of 27 children (16 males, 11 females) from age 8 until age 14. Every two years they measured the distance between the pituitary(腦垂體,腦下腺) and the pterygomaxillary fissure(翼上頜列)(單位mm), two points that are easily identified on x-ray exp

4、osures of the side of the head. 數(shù)據(jù)續(xù)distance a numeric vector of distances from the pituitary to the pterygomaxillary fissure (mm). These distances are measured on x-ray images of the skull. age a numeric vector of ages of the subject (yr). Subject an ordered factor indicating the subject on which th

5、e measurement was made. The levels are labelled M01 to M16 for the males and F01 to F13 for the females. The ordering is by increasing average distance within sex. Sex a factor with levels Male and Female 文獻(xiàn)Pinheiro, J. C. and Bates, D. M. (2000), Mixed-Effects Models in S and S-PLUS, Springer, New

6、York. (Appendix A.17) Potthoff, R. F. and Roy, S. N. (1964), “A generalized multivariate analysis of variance model useful especially for growth curve problems”, Biometrika, 5151, 313326. 數(shù)據(jù)預(yù)處理plot(dd)tab(dd,Sex)fit1-lm(distanceage*Sex,dd)summary(fit)wald(fit,Sex)fit2-lm(distanceage+Sex,dd)summary(f

7、it2)fit3-lm(distanceage/Sex,dd)summary(fit3)混合效應(yīng)模型fit-lme(distanceage*Sex,dd,random=1+age|Subject,correlation=corAR1(form=1|Subject)summary(fit)intervals(fit)#區(qū)間估計getVarCov(fit)#得到G矩陣 去掉Sex主效應(yīng)fit1-lme(distanceage/Sex,dd,random=1+age|Subject,correlation=corAR1(form=1|Subject)summary(fit1)intervals(fi

8、t1)#區(qū)間估計getVarCov(fit1)#G矩陣去掉異常數(shù)據(jù)fit.dropM09-update(fit,subset=Subject!=M09)summary(fit.dropM09)intervals(fit.dropM09)去掉異常數(shù)據(jù)2fit1.dropM09-update(fit1,subset=Subject!=M09)summary(fit1.dropM09)intervals(fit1.dropM09)Wald檢驗L=rbind(Male at 14=c(1,14,0,0),Female at 14=c(1,14,1,14)wald(fit,L)L1=rbind(Male

9、 at 14=c(1,14,0),Female at 14=c(1,14,14)wald(fit1,L1)Wald檢驗2L.gap-rbind(Gap at 12=c(0,0,1,12)wald(fit,L.gap)wald(fit,Sex)L1.gap-rbind(Gap at 12=c(0,0,12)wald(fit1,L1.gap)wald(fit1,Sex)一些模型總結(jié)令X為組內(nèi)因子(時變),W為組間因子(時間不變)一因子混合模型第一層第二層合并條件方差和無條件方差條件方差無條件方差 的估計, 的加權(quán)平均定義估計值為一般結(jié)構(gòu)條件方差估計的期望方差EBLUPs(Empirical Best Linear Unbiased Predictor)最佳線性預(yù)測

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論