Warnings when running an lmer in R

你。 提交于 2021-02-15 06:49:07

问题


I am trying to run a linear mixed-effects model in R using the function lmer, but I keep getting the same warning messages.

I am attempting to analyze the effects of graded air density, thorax temperature (main effects), and hive selection (random effect) on flight metabolic rate in honey bees. There looks like there is a strongly significant effect of this "aerial treadmill" I've developed, I just need to figure out the stats to back up my claims.

Attached is my code:

    #Loading my dataset
    tread<-read.csv("Beetreadmill 35C 1.288-0.441 - stats.csv", head=TRUE)

    #To look at the headers of your data
    names(tread)

    #To look at the structure of the data
    str(tread)

    #To look at the summary of this dataset
    summary(tread)


    #To run a linear mixed-effects model, install package "lme4"
    install.packages("lme4")
    #Load "lme4"
    library("lme4")

    #Test data for normality
    shapiro.test(tread$VCO2..ml.h.)
    #Normal
    shapiro.test(tread$Tthoroax)
    #Normal
    shapiro.test(tread$Body.mass)
    #Normal

    ## Looking at the significance of the random effects ##

    #Running a (lmer) model (full model)
    lm1<-lmer(VCO2..ml.h.~Mix+Tthoroax+(1|Hive),data=tread)

This code outputs

Here's the Warning Messages output:

    Warning messages:
    1: In class(object) <- "environment" :
      Setting class(x) to "environment" sets attribute to NULL; result will no longer be an S4 object
    2: In class(object) <- "environment" :
      Setting class(x) to "environment" sets attribute to NULL; result will no longer be an S4 object

Being self taught, I'd appreciate any help with figuring out how to get past this hurdle.

来源:https://stackoverflow.com/questions/59365389/warnings-when-running-an-lmer-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!