[R-sig-ME] Lmer model drops one parameter

Rob Robinson rob@rob|n@on @end|ng |rom bto@org
Wed Mar 17 19:26:42 CET 2021


Pierre
 This is to be expected, you cannot estimate both an intercept and all
levels of a factor. The immediate answer to your question is to include a
"-1" in the formula, which will give you an estimate for all your
categories; but you probably also want to review how factors are treated in
linear models according to your favourite stats book so that you
understand what is actually happening here. In the meantime this post might
help a little?
https://anythingbutrbitrary.blogspot.com/2012/04/lm-function-with-categorical-predictors.html
Best wishes
Rob


*************** Learn about Britain's Birds at www.bto.org/birdfacts
  ******************

Dr Rob Robinson, Associate Director - Research (he/him)
Hon Reader: Univ East Anglia | Visiting Researcher: Swiss Ornithological
Institute
British Trust for Ornithology, The Nunnery, Thetford, Norfolk, IP24 2PU
Ph: +44 (0)1842 750050       T: @btorobrob
E: rob.robinson using bto.org      W: www.bto.org/about-bto/our-staff/rob-robinson

======== "How can anyone be enlightened, when truth is so poorly lit"
========


On Wed, 17 Mar 2021 at 17:59, Pierre Marle <Pierre.Marle using unige.ch> wrote:

> Dear everyone,
>
> I have a lmer model to predict [Hg] according to a categorical variable (7
> parameters for 134 observations) as fixed effects and the species as random
> effect.
>
> The issue that I have is that the summary of model dropped one parameter
> of the qualitative variable. This is not a problem of unsufficient data of
> the dropped parameter because it has a high number of observations
> comparing with other parameters. Moreover, I don’t have any warning message
> after the model processing.
>
> lme <- lmer(Hg ~ Feeding_type + (1|Sp), data=sp, REML=T)
>
> Fixed effects:
>                                              Estimate    Std. Error
>  df t value Pr(>|t|)
> (Intercept)                              0.08404    0.01344 28.13392
>  6.254 9.06e-07 ***
> Feeding_typeGatherer          -0.06692    0.02261 27.57559  -2.960
> 0.00626 **
> Feeding_typeGrazer             -0.06701    0.02084 20.31009  -3.216
> 0.00427 **
> Feeding_typePiercer             -0.07752    0.03093 18.71971  -2.506
> 0.02161 *
> Feeding_typePredator           -0.03889    0.02026 25.21664  -1.919
> 0.06634 .
> Feeding_typeShredder          -0.04154    0.01722 27.41420  -2.413
> 0.02278 *
> Feeding_typeSponge-feeder  0.01674    0.02157 23.04972   0.776  0.44566
>
> As you can see I’m using the lme4 package with REML=T. Should I change
> something to have the coefficients of all the feeding types in the summary?
>
> I will be very grateful if someone could help me.
>
> Kind regards
>
> Pierre Marle
> Phd student / Research assistant
> pierre.marle using unige.ch<mailto:pierre.marle using unige.ch> / +41 22 379 0487
>
> Département F.-A. Forel des sciences de l’environnement et de l'eau
> Laboratoire d’Ecologie et de Biologie Aquatique
> Sciences de la Terre et de l’Environnement
> Université de Genève
>
> ADRESSE POSTALE:
> Université de Genève
> Carl-Vogt 66
> CH-1211 Genève 4
> SWITZERLAND
> __________________________________________
>
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



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