[R-sig-ME] Years as random effect

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Wed May 25 02:11:17 CEST 2022



On 2022-05-24 7:38 p.m., Abdullah Nagy wrote:
> Dear All,
> 
> I'm trying to fit a GLMM to presence absence data using binomial distribution in glmmTMB R package.
> 
> My model formula: Midden(0/1) ~ scale(Tree Height) + scale(I(Tree Height^2)) + scale(NDVI) + scale(Distance_to_quarry)+(1|ID) + (1|YEAR)
> The ID is 39 level and data were collected in 2009 and 2021.
> 
> My questions are:
> 
>    1.  Is it correct to include year as crossed random effect to avoid pseudoreplication ?
>    2.  When I use year as a crossed random effect, I get Unusually large Z-statistics (theta_1|YEAR.1=-5.456213), how to solve this issue ?
> 
> Thank you,
> Abdullah


     While year may *conceptually* be a random effect, it's unlikely to 
work very well in practice (unless you do fancy things, random effects 
are hard to fit when there are fewer than 5-6 levels). I would recommend 
including YEAR as a categorical (factor) fixed effect.

    For the other question we might need more detail (is this a warning 
message, or the results of diagnose(), or  ... ?) but is most likely an 
indication that you don't have enough information to estimate a positive 
among-year variance (solution as above: treat YEAR as fixed instead).

   Depending on the size of your data set (total observations, and 
especially the total number of the less-common outcome (0 or 1)), it 
might be worth considering fitting an interaction between YEAR and any 
predictors that vary within years (Tree height, distance to quarry -- 
not sure about NDVI, that would depend on your observational design)

   cheers
    Ben Bolker
> 
> 
> 
> 
> Abdullah Nagy
> Assistant lecturer of Ecology
> Al-Azhar University in Cairo
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ????? ??????: ?? ???? ????????? ??????? ?? ??? ??????? ??? ????? ????? ?? ??????? ??? ?????? ????? ??? ???? ??????? ????. ?????? ??? ?? ??? ??? ???????? ??????? ??? ??????? ???????? ?????? ?????? ????? ???? ??????? ?????? ????? ??????? ???? ?? ???? ??? ???? ????????? ?? ????. ??? ???? ???? ???? ??? ?? ????? ??? ??????? ????? ????? ?? ????? ???? ??? ????????? ??????? ???? ???? ???? ??? ?????? ???? ?? ??????? ?? ?????????. ????? ?????? ?? ???? ?????? ?????? ????? ???????? ?? ??? ??????? ??? ??? ?????? ??? ???? ???????? ??? ????? ?????? ??? ?? ????? ????? ?????? ??????? ?? ????? ????? ?? ?? ????? ?? ????? ???? ?????? ??? ?????? ?????????? Disclaimer: This message and any attachments are intended exclusively for the n
>   amed addressee(s) and may contain confidential information. If you are not the intended/named addressee/recipient you are hereby notified that any disclosure, copying, distribution or use of the information (including attachments) contained herein is strictly prohibited under current legislation. Likewise, no action may be taken based on the information provided in this message unless a prior written consent is obtained from the person in charge of such content. If you received this transmission in error, please contact the sender immediately and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts of the email or attachments. It is worth noting that any opinions expressed in this communication are not necessarily those of Al-Azhar University and they are solely the writer's. We advise that, in keeping with best business practice, the recipient must ensure they are actually virus free, as Al-Azhar University
>    bears no liability for any damage resulting from any viruses communicated via this email.
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

-- 
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics


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