I wonder if anyone would like to give me some guidance (I am a beginner in R). My data comes from a forest, where they performed a conservation fire. We measured the volume of trees before the fire (2007) and after (2013 and 2016) in eight plots. I want to analyze if there is any difference in tree volume between the years, for each species.
Random effect = plot, fixed effects = species and year, response = volume.
The data is poisson distributed. One species (pine) dominates, and other species are more rare, which means that there are many zeros in the dataset. I think I can use generalised linear mixed modelling (GLMM).
I wrote the code like this:
modelglmm <- glmm(as.integer(round(Volume)) ~ Species*Year,
random = list(~Plot),
data = data,
family.glmm = poisson.glmm,
m = 10^4,
varcomps.names = c("plots"))
summary(modelglmm)
And after that:
data_pine = data[data$Species == "Pine",]
modelglmmpine <- glmm(as.integer(round(Volume)) ~ Year,
random = list(~Plot),
data = data_pine,
family.glmm = poisson.glmm,
m = 10^4,
varcomps.names = c("plot"))
summary(modelglmmpine)
What do you think? I'm unsure about this since the data is unbalanced. Should I use a different method, or change the code? I hope I am clear enough.