0
$\begingroup$

Question from a novice.

I am looking at changes in wallaby activity (measured as scat count in fixed quadrats) over three consecutive years. An abbreviated version of my data looks something like this

enter image description here

Given my data has repeated measures and a non-normal distribution I have made a linear mixed-model using the lmer4 package in R.

I have year as a fixed effect and quadrat as a random effect:

wallaby.model = lmer(scatcount ~ year +(1|quadrat), data=wallaby)

I am unsure of how to then test for significant/get a p-value to report changes over each of the three years. As I only have 1 random effect a Likelihood Ratio Test doesn't make sense to me as the null model and the model appear to be exactly the same.

Any suggestions for another test?

Thanks for your help!

$\endgroup$
0
$\begingroup$

If interest lies in the year effect, then that's what you want to look at. From your model (which maybe should be a Poisson model), you can obtain the average scat count at year 1, year 2, and year 3 on a given quadrat, together with a measure of uncertainty (standard error). The relevant keyword for you is LSMeans (Least Squares Means). R has a library for this: lsmeans. By comparing the LSMeans, you will have an idea of the year-to-year changes (i.e. the year effect). If really relevant, tests of significance are readily available (both for the overall effect and for the 2-by-2 comparisons).

In contrast, if you are interested in the quadrat effect, then you should look at the quadrat-to-quadrat variability (which your model assumes to be the same for each year). Significance testing (again, if really relevant) on variance components is open for debate; see e.g. here.

PS: No details are given about your design, but according to your title this is a repeated measures situation, which your model ignores.

$\endgroup$
  • $\begingroup$ Thanks Ocram. I am looking at the year effect, I would like to know if there is a significant change in mean scat count from one year to the next. I've edited my original post to show some of my data. The same quadrat have been sampled once a year over three years resulting in repeated measure. My understanding was that I was accounting for the repeated measures by having quadrat as a random variable (1|quadrat). Have I got that wrong? $\endgroup$ – newecologist Mar 3 '18 at 7:40
  • $\begingroup$ No, that's OK then, (1|quadrat) accounts for the correlation among observations taken on the same quadrat over the years. If you are looking at the year effect, I think my first paragraph answers your question. Best $\endgroup$ – ocram Mar 3 '18 at 8:12
  • $\begingroup$ Hi again, I've been trying to calculate the Estimated Marginal Means (Least Squares Means) using the emmeans package. I am really struggling to make the reference grid needed to calculate the EMMs as I only have one variable and all the examples have several variables. I am quite confused about how to structure the code to get the cell means. I am using: cell.means <- matrix(with(BFRW_S_A, tapply(SCATCOUNT, interaction(SITE, YEAR), mean))nrow=3) but it tells me there is an unexpected symbol $\endgroup$ – newecologist Mar 5 '18 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.