Skip to main content
edited tags
Link
Robert Long
  • 65.9k
  • 11
  • 133
  • 248
Source Link

Assessing the effect of related variables using lmer in R

I am trying to run a model to describe the rate of water table drawdown in the soil. The predicted variable is rate, and I am interested in the effect of two categorical variables: (1) if the water table is above a certain threshold (yes, no) and (2) if the rate is different between seasons (summer / fall). I have measurements from 3 watersheds, treated as random effects. The wrinkle is that the water table is above the threshold more in the fall.

The two questions I'm trying to answer are (1) is there a difference in rate above and below the threshold and (2) after accounting for this difference, is there a difference in rate between the summer and fall? I can handle significance testing, etc.. but am having a fard time constructing the model properly. I've been using the lmer function from the lme4 package in R.