问题
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