I'm trying to run a mixed model analysis and so far I've found two ways to write a negative binomial distribution model for my data:
m <- glmer.nb(two.percent~Management2+(1|Site/Farmer),
data=pollen_diversity,
control=glmerControl(optimizer="Nelder_Mead",optCtrl=list(maxfun=100000000)),
theta.ml = 1000)
and
m2 <- glmer(two.percent ~ Management2 + (1 | Site / Farmer),
family = negative.binomial(0.2),
data = pollen_diversity)
If I'm not mistaken, these should produce the same result. However, when I do a summary of each model after running them with the exact same data, I get drastically different results. In this case, the first model tells me each level of "Management2" is significantly different, and the second model tells me none of them are. I should add that the first model has other problems as well: it gives me many warnings when the data ("two.percent") aren't integers, and if they are integers it gives me a different warning as well as a completely different result.
What am I getting wrong?