[R-sig-ME] interpreting random intercepts when no fixed intercept present

John.Morrongiello at csiro.au John.Morrongiello at csiro.au
Thu Feb 14 01:24:19 CET 2013


Hi Ben

Thanks for your response. 

In these kind of models I have normally treated age as numeric, and log transformed both growth and age to 'linearise' the relationship. However, this doesn't always work, especially when the growth~age relationship displays an initial steep decline followed by a period of relatively constant growth (think indeterminate growth in fish that nonetheless markedly declines at maturity). Obviously a smoothing spline for age could fit this kind of data better but I'm developing some quite complex models that don't seem to be fit easily/ possible with GAMM. A quadratic or even cubic age term doesn't always fit the data well. 

I decided to have a look at treating age as a factor as it allows for greater flexibility in the growth~age relationship (each age is free to respond in its own way) and the data set I have can cope with estimating quite a few additional parameters (1 linear parameter vs. 10 fixed age parameters). I believe having no fixed intercept in the model allows for direct comparison of parameters amongst models developed for different species/ locations. I'll have a look into how model.matrix() parameterizes models with ordered fixed effects. Just quickly, would you expect there to be any difference in how random intercepts are interpreted in a model with no fixed intercept and un-ordered fixed effects?

Thank you

John


> Hi list
 
> I was wondering how I interpret random effect intercepts in a model 
> with no fixed intercept? Take for example the following model, based 
> on those presented in Weisberg etal (2010):

> M1<-lmer(growth~0+Age+(1|ID)+(1|Year)
 
> Where growth is a repeatedly measured continuous variable, Age is a 
> factor with 10 ordered levels (2:11) corresponding to each growth 
> observation,
  
  Hmm.  It would generally seem to make more sense to treat age as numeric, since I would expect some sort of smooth, systematic
(linear/quadratic/spline) relationship between growth and age.
(Although I guess using an ordered factor does in some way allow you to separate linear, quadratic, higher-order contributions to the growth-age relationship)

>  ID and year are crossed random effects and represent individual 
> animals (100) and the years in which they were sampled. This model 
> provides a separate coefficient for each age; are the random effects 
> deviations from just the Age2 (first) coefficient, or from the Age 
> term in general? Each ID random effect has only one value, so they are 
> obviously not unique deviations from each level of Age. Or are the 
> random intercepts reflective of differences in average growth among 
> individuals and years after the effect of age is 'accounted' for (i.e. 
> not Age dependent)?

  Hmmm.  I think in order to answer this question I'd have to figure out what model.matrix() is doing when we use [ordered factor]+0 in a formula.  I thought I knew but now I don't think I do ...

> d <- data.frame(f=ordered(rep(1:5,10)),y=runif(50))
> options(digits=3)
> coef(lm(y~f,data=d))
(Intercept)         f.L         f.Q         f.C         f^4 
      0.525      -0.064       0.154       0.144      -0.116 
> coef(lm(y~f+0,data=d))
   f1    f2    f3    f4    f5 
0.589 0.651 0.360 0.428 0.599 
> coef(lm(y~f,data=d,contrasts=list(f=contr.treatment)))
(Intercept)          f2          f3          f4          f5 
     0.5885      0.0625     -0.2286     -0.1602      0.0101 

 (It would probably be better to use an example with a clear linear and quadratic term and nothing else, for clarity)
 
> Furthermore, if M1 was extended to include harvest (factor with three 
> levels) to which the population was exposed (some to just one level, 
> others all three):
 
> M2<-lmer(growth~0+Age+harvest+(1|ID)+(1|Year)
 
> Is the interpretation of random effects now different to that in M1 in 
> that they now include some harvest 'information'?

  I think the answer to this is going to have to involve more searching into how model.matrix() parameterizes these models.
Basically, once you know how the fixed effects are parameterized, you can interpret what it means to add a zero-mean random-effects
offset to it ...   
 
 
> Weisberg, S., Spangler, G., and Richmond, L.S. (2010). Mixed effects 
> models for fish growth. Canadian Journal of Fisheries and Aquatic 
> Sciences 67, 269-277.



------------------------------

Message: 2
Date: Wed, 13 Feb 2013 09:00:49 +0000
From: Andrea Cantieni <andrea.cantieni at phsz.ch>
To: "R-sig-mixed-models at r-project.org"
	<R-sig-mixed-models at r-project.org>
Subject: [R-sig-ME] goodness-of-fit tests on mcmc objects
Message-ID: <F4A166428041EA44893A6FF6AAC1AA36518A56 at ex01.phsz.loc>
Content-Type: text/plain

Dear all,

I am fitting an hierarchical model with MCMChregress() in MCMCpack package.

I want to do some goodness-of-fit tests, e.g. posterior predictive checks, that are suitable for hierarchical models.

Has anyone suggestions how I can do that?

Thanks!

Best,
Andrea
........................................................................

Andrea Cantieni
Research Assistant

University of Teacher Education Central Switzerland Campus Schwyz Institute for Media and Schools Zaystrasse 42
6410 Goldau
Switzerland

Tel. +41 41 859 05 72
andrea.cantieni at phsz.ch<mailto:andrea.cantieni at phsz.ch>
www.phsz.ch<http://www.phsz.ch>

........................................................................
Please take note of our new email address (@phsz.ch<http://phsz.ch>).
........................................................................





	[[alternative HTML version deleted]]



------------------------------

_______________________________________________
R-sig-mixed-models mailing list
R-sig-mixed-models at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


End of R-sig-mixed-models Digest, Vol 74, Issue 22



More information about the R-sig-mixed-models mailing list