I am running a mixed-effects model with lmer in R and am having trouble plotting the models by groups and pulling out the equations of the line.
I thought I needed to look at the fixed and random effects make my equation of the line for the final conditional model below (i.e., cond_ind_waterxsilver). When I pull these values out for the model, I get intercept values much higher than I expect. Would someone please provide me with some guidance on pulling the values of the model from the output to make the line and how to plot the model results?
#conditional model
cond_waterxsilver <- lmer(LnAg ~ LnVolume + (LnVolume | FilterID) + SilverType + WaterType + SilverType*WaterType + SilverType*LnVolume + WaterType*LnVolume, data=capwater_removed.data)
aov_cond_ind_waterxsilver <- anova(cond_ind_waterxsilver)
summary(cond_ind_waterxsilver)
aov_cond_ind_waterxsilver
As I mentioned the equations that I calculated for each group (by SilverType and WaterType) have an intercept much higher than expected.
Here is a portion of the output that I am trying to interpret:
Random effects:
Groups Name Variance Std.Dev. Corr
FilterID (Intercept) 1.84693 1.3590
LnVolume 0.07073 0.2660 -0.91
Residual 0.75533 0.8691
Number of obs: 187, groups: FilterID, 33
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 5.36298 0.67452 25.81163 7.951 2.09e-08 ***
LnVolume -1.10424 0.16764 22.59782 -6.587 1.11e-06 ***
SilverTypeCitrate 1.42888 0.90853 27.98025 1.573 0.1270
SilverTypePVP -1.68084 0.91226 37.20240 -1.842 0.0734 .
WaterTypeB 1.42923 0.78770 26.11938 1.814 0.0811 .
SilverTypeCitrate:WaterTypeB -1.81514 0.67120 24.94076 -2.704 0.0122 *
SilverTypePVP:WaterTypeB -0.03597 0.70150 31.06516 -0.051 0.9594
LnVolume:SilverTypeCitrate 0.14857 0.20368 14.34068 0.729 0.4775
LnVolume:SilverTypePVP 0.42758 0.25071 25.73948 1.705 0.1001
LnVolume:WaterTypeB -0.14359 0.19678 17.43737 -0.730 0.4753