I am trying to move data analysis from proc mixed to glimmix for the easy of the ilink transformation. However I am finding a big difference on the denominator DF when using either of them. As background. My data comes from a group of 95 calves that were fed 4 diets (about 24 calves per diet), my measure is neutrophil number in blood which was repeated 4 times (7, 14, 28, 42 d of age). Thus I am using sp (pow) as cov structure.

When using proc mixed with next statements: I got about 85 DF for the diff contrasts

`CLASS calf diet parity sex age; MODEL RBCx= diet sex age diet*sex diet*age sex*age diet*sex*age / DDFM=KR;; random calf (diet*sex); repeated age /type=sp(pow)(age) subject=calf (diet*sex) ; `

However when using proc glimmix, for same contrast I got 336 DF when using next:

`proc glimmix data = CBC_2011 IC= PQ; CLASS calf diet parity sex age; MODEL RBCx= diet sex age diet*sex diet*age sex*age diet*sex*age / dist=Gaussian DDFM=KR;; random age /type=sp(pow)(age) subject=calf (diet*sex) residual; `

Thanks in advance.

Miriam

**Contents**hide

#### Best Answer

In the mixed procedure code you specified a random statement and a repeated statement. The first one affects the G-matrix (and therefore the DFs), the second only affects the R-matrix. Your glimmix procedure code only contains a random statement with a residual option which therefore only affects the R-matrix and acts as the repeated statement in the mixed procedure. I think for proc glimmix you need a second random statement identical to the random statement of the mixed procedure.

In reply to Mike's comment I try to clarify the notation: The normal mixed model (proc mixed) can be written as: $ y=X alpha + Z beta + e$, where $alpha$ represents the fixed effects and $beta$ the random effects with $beta sim N(0, G)$ and $var(e)=R$, so that $var(y)=V=ZGZ' +R$.

In the generalized linear mixed model (proc glimmix) this is analogous: $y=mu+e$, where $g(mu)=X alpha + Z beta$, $var(e)=R$ and therefore $var(y)=V=var(mu)+R approx BZGZ'B +R$, $B$ being a diagonal matrix of variance terms.

### Similar Posts:

- Solved – How to draw B-spline plots via the PROC GLIMMIX procedure in SAS
- Solved – repeated measures ANOVA, crossover trial, R
- Solved – repeated measures ANOVA, crossover trial, R
- Solved – Multilevel logistic mixed model
- Solved – Why are ‘random’ and ‘repeated’ in mixed models in SAS both producing the same result