### 纵向数据混合回归模型

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

 分成数据的混合模型




AR（1）简介

 假设




。
AR（1）模型的数值特征














d阶自相关系数



d阶自相关系数

ARMA（1,1）简介








，
MA( )

ARMA(1,1) 另一种形式为






 组间（时间不变）
 组内（时变的）
 交互

4个组群，随机部分



，采



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（脑垂体，

（翼上颌列）（单位mm）, two points that
are easily identified on x-ray exposures of the

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 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), MixedEffects 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.


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)


fit<lme(distance~age*Sex,dd,random=~1+age|Sub
ject,correlation=corAR1(form=~1|Subject))
 summary(fit)
 intervals(fit)#区间估计
 getVarCov(fit)#得到G矩阵


fit1<lme(distance~age/Sex,dd,random=~1+age|Subj
ect,correlation=corAR1(form=~1|Subject))
 summary(fit1)
 intervals(fit1)#区间估计
 getVarCov(fit1)#G矩阵



fit.dropM09<update(fit,subset=Subject!="M09")

summary(fit.dropM09)

intervals(fit.dropM09)


fit1.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 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")




（时间不变）























EBLUPs(Empirical Best Linear
Unbiased Predictor)


EBLUP of

OLS 估计




EBLUP

Best linear unbiased predictor estimate
 OLS


HLM

BLUP
EBLUP

Empirical BLUP (经验最佳线型无偏估计)

```