[R-sig-ME] Alternatives to lmer

Murray Jorgensen maj at waikato.ac.nz
Sun Jan 16 23:34:25 CET 2011


On 17/01/2011 11:22 a.m., Iker Vaquero Alba wrote:
>
>
> Let me check that I am interpreting your data correctly. It seems that
> you have 12 sites at each of which you have a number of mated pairs. You
> have physical measurements on the male and the female of each pair and
> some environmental measurements on the sites.
>
> Yes, that's absolutely correct.
>
> The pairs are numbered within sites but some numbers are missing. Might
> they be the numbers corresponding to pairs that failed to fledge? I
> think maybe they should be there as well with nfledge = 0.
>
> Actually, the missing numbers correspond to the rows I have removed from
> the original data set because they contained "nfledge" missing values.
>
> 'instotal' and 'weatherpc1' are measured at the 'site' level, so the
> natural way to incorporate them in a model would be through a
>
> (instotal + weatherpc1|site)
>
> term.
>
> Would it be (instotal+weatherpc1|site) or
> (instotal|site+weatherpc1|site)? According to the way you've written it,
> only "weatherpc1" seems to be in relation to "site".

In a model formula term   ( .... |site) everything in the .... part is 
at the site level.


>
> Surely also 'nfledge' should be at the 'pair' level ?
>
> I think it would then be better to re-shape the data so that each row is
> a pair and, for example, 'tlength' splits into two covariates 'tlengthM'
> and 'tlengthF'.
>
> I see the point, but what would be the difference compared to having one
> individual per row and sex as a factor, as it is now?

Well 'nfledge' depends only on the pair. The units at which the response 
variable is measured must be the underlying units of the analysis.


>
> It looks doubtful to me that a Poisson model will fit this data well,
> with or without the addition of the nfledge = 0 pairs.
>
> Yes, the problem clearly seems to be in teh fact that it's a Poisson
> model, as assuming Gaussian errors it doesn't return any error message.

But that does not mean that the analysis is correct, even in an 
approximate way. I do not think your model formula reflects the 
structure of the data, even if it runs without computing errors.

Murray

>
> I think that you should be talking more to some local statisticians
> before you attempt to fit models to this data.
>
>
> Regards, Murray
>
> Thank you so, so much for all your suggestions. I will work on it and
> tell you if it worked.
>
> Best wishes, Iker
>
> On 17/01/2011 9:15 a.m., Iker Vaquero Alba wrote:
>  >
>  > Hello:
>  >
>  > As I posted several days ago, I was trying to implement this model:
>  >
>  >
> fledgecoltailmodel1<-lmer(nfledge~sex*briventral*inslarge*weatherpc1*tlength-sex:briventral:inslarge:weatherpc1:tlength-sex:briventral:inslarge:weatherpc1-sex:briventral:inslarge:tlength-sex:briventral:weatherpc1:tlength-sex:inslarge:weatherpc1:tlength-briventral:inslarge:weatherpc1:tlength-sex:briventral:inslarge-sex:briventral:weatherpc1-sex:briventral:tlength-sex:inslarge:weatherpc1-sex:inslarge:tlength-sex:weatherpc1:tlength-briventral:inslarge:weatherpc1-briventral:inslarge:tlength-briventral:weatherpc1:tlength-inslarge:weatherpc1:tlength+(site|pair),family=poisson)
>  >
>  > but I got the error message:
>  >
>  > Error in asMethod(object) : matrix is not symmetric [1,2]
>  >
>  > as no one seems to know what could be the reason for that or how to
> find a solution, I was thinking that maybe I could try using another
> function. Starting with the one which seems more similar to "lmer", I
> tried with "GLMM", which I read in some post it could be taken from
> "lme4" package. However, when I try to use it (either "glmm" or "GLMM"),
> R tells me such function doesn't exist.
>  >
>  > Do you know why this could be happening? Do you know of any other
> functions I could use to fit my model? I was thinking as well of
> "MCMCglmm", but I'm not sure I can apply it to my model and I don't
> think I'm expert enough as to deal with its syntax or the overdispersion
> problems.
>  >
>  > I am using R 2.12.0
>  >
>  > Thank you very much for your help!
>  >
>  >
>  >
>  > Iker Vaquero-Alba
>  >
>  > Centre for Ecology
>  > and Conservation
>  >
>  > Daphne du Maurier
>  > Building
>  >
>  > University of Exeter,
>  > Cornwall Campus
>  >
>  > Treliever Road
>  >
>  > TR10 9EZ Penryn
>  >
>  > U.K.
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > [[alternative HTML version deleted]]
>  >
>  >
>  >
>  >
>  > _______________________________________________
>  > R-sig-mixed-models at r-project.org
> <compose?to=R-sig-mixed-models at r-project.org> mailing list
>  > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> --
> Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html
> Department of Statistics, University of Waikato, Hamilton, New Zealand
> Email: maj at waikato.ac.nz <compose?to=maj at waikato.ac.nz>
> majorgensen at ihug.co.nz <compose?to=majorgensen at ihug.co.nz> Fax 7 838 4155
> Phone +64 7 838 4773 wk Home +64 7 825 0441 Mobile 021 0200 8
>
>


-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz    majorgensen at ihug.co.nz      Fax 7 838 4155
Phone  +64 7 838 4773 wk    Home +64 7 825 0441   Mobile 021 0200 8350




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