Matvec Users’ Guide
Matvec Users' Guide
Matvec Users' Guide
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
84 CHAPTER 11. GENERALIZED LINEAR MIXED MODEL ANALYSES<br />
-1.58156 1.89349<br />
1.8521 3.93396<br />
The file mouse3.info:<br />
some extra information in the model<br />
--------------------------------------------------------<br />
AI REML converged<br />
maximum log restricted likelihood = -2200.06<br />
variance for animal =<br />
4.05386 -0.4364 0.412177 -0.0398331<br />
-0.4364 5.60885 1.36832 -0.432407<br />
0.412177 1.36832 1.58627 -1.58156<br />
-0.0398331 -0.432407 -1.58156 1.8521<br />
variance for dampe =<br />
0.306701 0.163672<br />
0.163672 1.93397<br />
residual variance =<br />
2.0784 2.74535<br />
2.74535 12.8342<br />
11.2.3 Cubic splines<br />
Data from a ELISA calibration study 4 and a constant variance with cubic splines model 5 will be used to<br />
illustrate the use of cubic splines and the M.var link() function. The model includes a fixed covariate for<br />
concentration, correlated random effects for trial and trial*concentration, and random effects for splines and<br />
splines by trial. The model equation is<br />
od ijk = µ + βconc ij +<br />
5∑<br />
γ l u ijl + T i + β i conc ij +<br />
l=1<br />
5∑<br />
γ il u ijl + e ijk<br />
where od ijk is the optical density for trial i with concentration conc j and sub-sample k, µ is the intercept, β is<br />
the overall slope, β i ∼ N(0, σ 2 C ) is the random trial specific slope, u ijl is the l spline covariate, γ l ∼ N(0, σ 2 s)<br />
is the overall l spline random effect, γ il ∼ N(0, σ 2 st) is the l spline random effect for trial i, T i ∼ N(0, σ 2 T ) is<br />
the trial random effect and is correlated with β i with covariance σ CT , and e ijk ∼ N(0, σ 2 ) is the residual.<br />
To fit a model with cubic splines the first step is to compute the spline covariates and this is accomplished<br />
with the following code<br />
D=Data();<br />
D.input("../data/elisa.dat","trial conc od");<br />
knots=[0 pow(2,-6:0)*12.5].t()<br />
nk=knots.nrow();<br />
Dmat=D.mat();<br />
conc=Dmat(*,3);<br />
X=conc.splines(knots,1);<br />
X.save("elisa-splines.dat");<br />
Next the covariate data is merged with the original data<br />
system("paste -d\" \" ../data/elisa.dat elisa-splines.dat > elisa-fit.dat");<br />
The model is then specified<br />
4 Davidian, M. and D. M. Giltinan (1993). Some simple methods for estimating intraindividual variability in nonlinear<br />
mixed effects models. Biometrics 49: 59-73.<br />
5 Verbyla, A. P., B. R. Cullis, M. G. Kenward and S. J. Welham (1999). The analysis of designed experiments and longitudinal<br />
data by using smoothing splines. Appl.Statist. 48: 269-311<br />
l=1