<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Dear ADMB users,</p><p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323"><br></p><p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">
I hope this is the right mailing list, I wasn't sure whether to post here or the mixed models list...</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I am attempting to model zero-inflated data with a random effect (repeated measures on individuals over time). </p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">My data are total and relative abundances of calories of various crop species (~40 total) consumed within each country (154 countries total) over the past 40 years, sampled at 5 time periods (1967, 1977, 1987, 1997, 2007). The data appear as follows:</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323"> Year Country Item_general Total Rel.Total</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">1 1967 Albania Apples 6.45 0.002903365</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">2 1967 Albania Bananas_and_plantains 0.00 0.000000000</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">3 1967 Albania Barley 17.09 0.007692792</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">4 1967 Albania Beans 41.80 0.018815610</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">5 1967 Albania Beverages_Alcoholic 5.60 0.002520751</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">6 1967 Albania Beverages_Fermented 0.00 0.000000000</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">My plan is to run the model for each crop separately, and the output I would like to get is slope parameters with confidence intervals (this would tell me the direction and magnitude of change over time for each crop). [Though if anyone has any better ideas of how I could show change over time for each crop, I'd certainly be interested in hearing them!]</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I have not been able to find a way to account for both zero-inflation and repeated measures other than using the glmmADMB package (at least, not within my stats abilities). Unfortunately I am running into a whole host of errors in glmmADMB, in particular this one:</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Error in glmmadmb(Rel.Total.Rnd ~ I(Year - 1967), random = ~1 | Country, : </p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323"> The function maximizer failed (couldn't find STD file)</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">In addition: Warning message:</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">running command './glmmadmb -maxfn 500 -maxph 5 -noinit -shess' had status 1 </p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Need to increase the maximum number of separable calls allowed to at least 20001</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Current value is 20000</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Use the -ndi N command line option</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I have been using the following command:</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">glmmadmb(Rel.Total~I(Year-1967)+(1|Country), family="nbinom",zeroInflation=TRUE,data=crops) </p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">where Rel.Total is rounded to nearest (ceiling) integer. I run into the same error when I use the absolute total (rounded to nearest integer) instead of relative total. Interestingly, I do not run into this error when I run this same model on a subset of only one crop species.</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Googling this error brought up another email from someone having a similar problem, and his problem was solved by downloading an older version of the software, but I tried that (v. 0.7) and I am still getting the same error (I am using Mac OX 10.7). I have also tried adding the "<span style="font:12.0px Arial;color:#4f4f4f">admb.opts=admbControl(shess=FALSE,noinit=FALSE)" </span>command, which I saw recommended in some of the list serves, but that does not seem to help.</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I have also run into trouble when trying to check assumptions for these models. I have tried plotting residuals vs. fitted values by plot(model.out$fitted,model.out$residuals) and the resulting graph looks no better than that for a regular mixed model (using nlme) that doesn't account for zero inflation. The graph shows a horizontal V-shape, so that the values are close together on the left side of the graph and fan out widely on the right side. I was able to make the residuals look a lot better in the regular mixed model by 4th-root transforming the data (I know this isn't an appropriate solution, I was just experimenting), so I am confused as to why the glmmADMB graph of fitted v. residuals wouldn't look better.</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I would also like to try allowing for random slopes in the model (using (Year|Country)), but when I do this there are only about 5 points on the graph of fitted v. residuals and they form a straight line from top left to bottom right. This doesn't happen when I include random slopes in nlme, so perhaps it has something to do with the way the model accounts for zero-inflation?</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I apologize for the rambling nature of this email. I am relatively new to mixed models, and while I have read Zuur from cover to cover, I want to make sure I really understand what I'm doing rather than just plugging in numbers.</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">I would be happy to provide my full dataset off-line if anyone is interested.</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323;min-height:15.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Any help would be greatly appreciated!</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Many thanks,</p>
<p style="margin:0px 0px 0px 0px;font:13.0px Arial;color:#232323">Anne</p>