混合模型的纵向数据分析报告

上传人:xmg****18 文档编号:118689671 上传时间:2019-12-22 格式:PPT 页数:55 大小:1.09MB
返回 下载 相关 举报
混合模型的纵向数据分析报告_第1页
第1页 / 共55页
混合模型的纵向数据分析报告_第2页
第2页 / 共55页
混合模型的纵向数据分析报告_第3页
第3页 / 共55页
混合模型的纵向数据分析报告_第4页
第4页 / 共55页
混合模型的纵向数据分析报告_第5页
第5页 / 共55页
点击查看更多>>
资源描述

《混合模型的纵向数据分析报告》由会员分享,可在线阅读,更多相关《混合模型的纵向数据分析报告(55页珍藏版)》请在金锄头文库上搜索。

1、第三章 混合模型的纵向数据分 析 线性模型 分成数据的混合模型 这里 是协方差矩阵,即 的元素不 需要独立 纵向数据(Longitudinal Data)的混 合模型 常见的是和时间有关,如 中的元素服从 时间序列模型,自回归模型,滑动平均模 型等,并有周期。 例如模型 的选取 对于AR(1) 令 其中 独立。 假设 则时间序列平稳且 时间序列有单位根即 。 AR(1)简介 令 和 为给定t-1时刻前的条 件期望和方差,则 因此 AR(1)模型的数值特征 均值方差为 分布为 无条件期望方差 定义 协方差 相关系数 因为 自相关系数 协方差 d阶自相关系数 d阶自相关系数 对于ARMA(1,1)

2、 模型 其中 一般形式 其中 ARMA(1,1)简介 假设 其中 , ARMA(1,1) 另一种形式为 自协方差函数 其中 MA( ) 方差 方差 自协方差函数 自相关系数 第一层模型 分层模型 第二层模型 混合模型 截距项 组间(时间不变) 组内(时变的) 交互 说明 记为 其中 4个组群,随机部分 随机部分方差 模型的矩阵形式1 这里 矩阵形式2 矩阵形式3 矩阵形式4 广义最小二乘(GLS) 极大似然估计,同时估计 , 采 用 anova 函数, 其中 为固定效应, 为 随机效应,常被低估. 限制的极大似然估计,先估计 然后 采用GLS估计 ,采用函数lme, 更精确 两种估计算法 程序

3、 数据集描述(畸齿矫, 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 po

4、ints that are easily identified on x-ray exposures of the side of the head. 数据续 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 orde

5、red 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 文献 Pinheiro, J. C. and Bates, D. M. (2000), Mixed-

6、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, 313326. 数据预处理 plot(dd) tab(dd,Sex) fit1-lm(distanceage*Sex,dd) summary(fit)

7、wald(fit,Sex) fit2-lm(distanceage+Sex,dd) summary(fit2) fit3-lm(distanceage/Sex,dd) summary(fit3) 混合效应模型 fit- lme(distanceage*Sex,dd,random=1+ag e|Subject,correlation=corAR1(form=1|Su bject) summary(fit) intervals(fit)#区间估计 getVarCov(fit)#得到G矩阵 去掉Sex主效应 fit1- lme(distanceage/Sex,dd,random=1+age |Sub

8、ject,correlation=corAR1(form=1|Subj ect) summary(fit1) intervals(fit1)#区间估计 getVarCov(fit1)#G矩阵 去掉异常数据 fit.dropM09- update(fit,subset=Subject!=M09) summary(fit.dropM09) intervals(fit.dropM09) 去掉异常数据2 fit1.dropM09- update(fit1,subset=Subject!=M09) summary(fit1.dropM09) intervals(fit1.dropM09) Wald检验

9、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) 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) 一些模型总结 令X为组内因子(时变),W为组间因子

10、( 时间不变) 一因子混合模型 第一层 第二层 合并 条件方差和无条件方差 条件方差 无条件方差 的估计, 的加权平均 定义 估计值为 一般结构 条件方差 估计的期望 方差 EBLUPs(Empirical Best Linear Unbiased Predictor) 最佳线性预测 BLUP EBLUP of OLS 估计 方差 分布的均值为0 方差为 EBLUP 最佳线形无偏估计(BLUPS) Best linear unbiased predictor estimate OLS HLM BLUP EBLUP Empirical BLUP (经验最佳线型无偏估计) 一些方差结论 知识回顾知识回顾 Knowledge Knowledge ReviewReview

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号