I am a biologist and am attempting to analyze the effects of time and location on depth. I was told I needed to use a mixed effects model to account for the random variables of Individual and tracking type, but am unfamiliar with the outputs and am having difficulty interpreting it. I am not sure if there is something wrong with my model, or if I do not correctly understand how to read the output.
I am attempting to analyze data that looks like this:
Name Seconds Depth Time Location Place Tracking
8601 29422 19 Day Off Hawaii Active
8601 29434 29 Day Off Hawaii Active
8601 29444 36 Day Off Hawaii Active
8601 29455 44 Day Off Hawaii Active
8601 29466 50 Day Off Hawaii Active
8601 29480 55 Day Off Hawaii Active
and I built a model using R package lme4
, function lmer
. My model is
Depth~Time*Location+(1|Name)+(1|Tracking)
With output:
Fixed effects:
Estimate Std. Error t value
(Intercept) 28.577 4.263 6.703
TimeNight 26.021 6.341 4.104
LocationOn -22.835 1.181 -19.327
TimeNight:LocationOn -33.049 1.567 -21.088
Systematically removing terms revealed that Location
, Time
, and their interaction were all significant.
I am mostly interested in the differences between On/Night
and On/Day
, as well as Off/Night
and Off/Day
. I know that Off/Day
is 28.577, with Off/Night
at (28.577+26.021), and On/Day
at (28.577-22.835). My trouble comes in interpreting Night/On
, since the answer cannot be negative (can't have negative depth). Does the negative value mean this type of model isn't appropriate for my situation?
Also, is there a way to determine if the values for On/Night
are significantly different from On/Day
? Can I use a glht
?
afex::mixed
. Not only because I wrote it, it might give easier to interpret output. Alternatively or in addition you might want to pass thelmer
ormixed
object tolsmeans
. Also easier thanglht
. $\endgroup$