Presentation is loading. Please wait.

Presentation is loading. Please wait.

第三章 混合模型的纵向数据分析.

Similar presentations


Presentation on theme: "第三章 混合模型的纵向数据分析."— Presentation transcript:

1 第三章 混合模型的纵向数据分析

2 线性模型 分成数据的混合模型 单击此处添加备注

3 纵向数据(Longitudinal Data)的混合模型
这里 是协方差矩阵,即 的元素不需要独立 单击此处添加备注

4 的选取 常见的是和时间有关,如 中的元素服从时间序列模型,自回归模型,滑动平均模型等,并有周期。 例如模型 单击此处添加备注

5 对于AR(1) 单击此处添加备注

6 AR(1)简介 令 其中 独立。 假设 则时间序列平稳且 时间序列有单位根即 。 单击此处添加备注

7 AR(1)模型的数值特征 令 和 为给定t-1时刻前的条件期望和方差,则 因此 单击此处添加备注

8 无条件期望方差 均值方差为 分布为 单击此处添加备注

9 自相关系数 定义 协方差 相关系数 因为 单击此处添加备注

10 d阶自相关系数 协方差 d阶自相关系数 单击此处添加备注

11 对于ARMA(1,1) 单击此处添加备注

12 ARMA(1,1)简介 模型 其中 一般形式 其中 单击此处添加备注

13 假设 其中 , 单击此处添加备注

14 MA( ) ARMA(1,1) 另一种形式为 自协方差函数 其中 单击此处添加备注

15 方差 方差 单击此处添加备注

16 自协方差函数 单击此处添加备注

17 自相关系数 单击此处添加备注

18 分层模型 第一层模型 单击此处添加备注

19 第二层模型 单击此处添加备注

20 混合模型 单击此处添加备注

21 21 说明 截距项 组间(时间不变) 组内(时变的) 交互

22 4个组群,随机部分 记为 其中 单击此处添加备注

23 随机部分方差 单击此处添加备注

24 模型的矩阵形式1 单击此处添加备注

25 矩阵形式2 这里 单击此处添加备注

26 矩阵形式3 单击此处添加备注

27 矩阵形式4 单击此处添加备注

28 广义最小二乘(GLS) 单击此处添加备注

29 两种估计算法 极大似然估计,同时估计 , 采用 anova 函数, 其中 为固定效应, 为随机效应,常被低估.
限制的极大似然估计,先估计 然后采用GLS估计 ,采用函数lme, 更精确 单击此处添加备注

30 程序 单击此处添加备注

31 数据集描述(畸齿矫,orthodontics)
Investigators at 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 exposures of the side of the head.

32 数据续 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).

33 Subject an ordered factor indicating the subject on which the 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

34 文献 Pinheiro, J. C. and Bates, D. M. (2000), Mixed-Effects Models in S and S-PLUS, Springer, New 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, 51, 313–326.

35 数据预处理 plot(dd) tab(dd,~Sex) fit1<-lm(distance~age*Sex,dd)
summary(fit) wald(fit,"Sex") fit2<-lm(distance~age+Sex,dd) summary(fit2) fit3<-lm(distance~age/Sex,dd) summary(fit3)

36 混合效应模型 fit<-lme(distance~age*Sex,dd,random=~1+age|Subject,correlation=corAR1(form=~1|Subject)) summary(fit) intervals(fit)#区间估计 getVarCov(fit)#得到G矩阵

37 去掉Sex主效应 fit1<-lme(distance~age/Sex,dd,random=~1+age|Subject,correlation=corAR1(form=~1|Subject)) summary(fit1) intervals(fit1)#区间估计 getVarCov(fit1)#G矩阵

38 去掉异常数据 fit.dropM09<-update(fit,subset=Subject!="M09")
summary(fit.dropM09) intervals(fit.dropM09)

39 去掉异常数据2 fit1.dropM09<-update(fit1,subset=Subject!="M09")
summary(fit1.dropM09) intervals(fit1.dropM09)

40 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 at 14"=c(1,14,0),"Female at 14"=c(1,14,14)) wald(fit1,L1)

41 Wald检验2 L.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")

42 一些模型总结 令X为组内因子(时变),W为组间因子(时间不变) 单击此处添加备注

43 单击此处添加备注

44 一因子混合模型 第一层 第二层 合并

45 条件方差和无条件方差 条件方差 无条件方差

46 的估计, 的加权平均 定义 估计值为

47 一般结构 条件方差

48 估计的期望

49 方差

50 EBLUPs(Empirical Best Linear Unbiased Predictor)

51 EBLUP of OLS 估计 方差 分布的均值为0 方差为 EBLUP

52 最佳线形无偏估计(BLUPS) Best linear unbiased predictor estimate OLS HLM BLUP
单击此处添加备注

53 EBLUP Empirical BLUP (经验最佳线型无偏估计) 单击此处添加备注

54 一些方差结论 单击此处添加备注


Download ppt "第三章 混合模型的纵向数据分析."

Similar presentations


Ads by Google