On May 11, 2019, at 5:10 PM, emyoung90 <emyo...@gmail.com> wrote:Thanks so much! That all makes sense - I'd thought that the best distribution would be poisson, and I even thought about the rounding technique, but I was thrown off since I didn't think of my data as appropriate for a poisson for some reason (I guess since it isn't traditional count data). I ran the rounded poisson model and everything worked (thank you!!), but I have a couple followup questions about the selection process if you don't mind, just so I fully understand.###CODE######First, I can't seem to get the models with the non-rounded poisson or the negative binomial to work for some reason, even though I used your code exactly.sitetest1 <- glmer(rainfallplus ~ site + (1|year/month), family="poisson", data = panamarain)sitetest3 <- glmer.nb(round(rainfallplus) ~ site + (1|year/month), data = panamarain)#For poisson, I get this error for each rainfall value:#"1: In (function (fr, X, reTrms, family, nAGQ = 1L, verbose = 0L, ... :#non-integer x = 21.320000"#I'm assuming that's because the values aren't rounded? I'm curious as to how you overrode those warnings. Or can I just ignore them?
#And for negative binomial, I get this error:#"1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :#Model failed to converge with max|grad| = 0.025627 (tol = 0.001, component 1)"#I think this usually happens when there isn't a large enough sample size or similar, is that correct?
###Second, I put the rounded poisson into the AIC comparison, and the AIC value for poisson is huge - is this just not the right technique to use for this?fit1<-fitdistr(round(panamarain$rainfallplus), "normal")fit2<-fitdistr(round(panamarain$rainfallplus), "lognormal")fit3 <-fitdistr(round(panamarain$rainfallplus), "gamma", lower=c(0,0))fit4 <-fitdistr(round(panamarain$rainfallplus), "poisson")AIC(fit1,fit2,fit3,fit4)
###Third, would you mind sharing the code you used to get the q-q plots? I think I'm using a different function than you, and I'd love to be able to reproduce those plots.
--
You received this message because you are subscribed to the Google Groups "STRI R users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stri-R-group...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/stri-R-group/CF5A12C5-1356-4A28-8B70-52B20B392A2E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
|
|
Emma
Young | PhD
Candidate |