# Why proc mixed give different DF than proc glimmix?

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;


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.