<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: comparing models fit with GLIMMIX using R-side Z matrix in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/555064#M27579</link>
    <description>&lt;P&gt;Thanks so much for the suggestions! DAP does change by year, so that was not the issue. I found using the FMM procedure that a Generalized Poisson model fits the data fairly well (Chi Sq/DF = 0.75), and I can use GLIMMIX to fit this model with random effects. However, because this model must be fit with the LaPlace method, I cannot specify a Kenward-Rogers type of DDFM. This makes my degrees of freedom - in my opinion - way too high. However, I think that it is better to interpret the significance of the effects conservatively than to have a very bad fit to the model.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2019 14:41:49 GMT</pubDate>
    <dc:creator>staudham</dc:creator>
    <dc:date>2019-04-30T14:41:49Z</dc:date>
    <item>
      <title>comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/549390#M27460</link>
      <description>&lt;P&gt;I am using PROC GLIMMIX to fit a Poisson model to repeated measures count data. The data are fruit counts from trees in two sites over 9 years. The data clearly do not show an AR(1) structure, and one of the sites shows a roughly bi-annual pattern of correlation. When I include a CS structure, the Generalized Chi-Sq/DF is very high (&amp;gt;10), but if I either include a GROUP in the RANDOM statement, or use TYPE=UN, the Generalized Chi -q/DF is 1.00.&amp;nbsp; And this latter result is repeated regardless of what fixed effects I add or eliminate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all, is this result an artifact of the way these models are fit? That is, is it over-parameterizing in some way as to give me a 'perfect fit'?&amp;nbsp; And second, if this fit statistic is in fact valid, how do I compare two competing models? There are no other fit statistics generated.&amp;nbsp; (Output attached). Thanks for your time.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Simplified models with just a few effects.;

PROC GLIMMIX DATA=sasds.cast_1019;
	CLASS local arv ano ;
	MODEL prod =   LOCAL|ano|dap  /DIST=poisson ddfm=kenward ;
	RANDOM RESIDUAL/SUB=arv(LOCAL) TYPE=CS;
	NLOPTIONS tech=nrridg;
RUN;  *this gives very poor fit:  Gener. Chi-Square / DF 58.61 ;

PROC GLIMMIX DATA=sasds.cast_1019;
	CLASS local arv ano;
	MODEL prod =   LOCAL|ano|dap  /DIST=poisson ddfm=kenward ;
	RANDOM RESIDUAL/SUB=arv(LOCAL) GROUP=local TYPE=CS;
	NLOPTIONS tech=nrridg;
RUN;		* Gener. Chi-Square / DF 1.00 ;

PROC GLIMMIX DATA=sasds.cast_1019;
	CLASS local arv ano;
	MODEL prod =   LOCAL|ano|dap  /DIST=poisson ddfm=kenward ;
	RANDOM RESIDUAL/SUB=arv(LOCAL)  TYPE=UN;
	NLOPTIONS tech=nrridg;
RUN;	* Gener. Chi-Square / DF 1.00 ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Apr 2019 19:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/549390#M27460</guid>
      <dc:creator>staudham</dc:creator>
      <dc:date>2019-04-08T19:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/551367#M27502</link>
      <description>&lt;P&gt;No suggestions yet. I'm hoping that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt;&amp;nbsp; or&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92458"&gt;@StatsMan&lt;/a&gt;&amp;nbsp;might have an idea about this.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 13:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/551367#M27502</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-04-16T13:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/551440#M27506</link>
      <description>&lt;P&gt;Before I dove too deeply into modeling the covariance structure of the repeated measures, I first would look into whether the Poisson distribution is the best choice. From your output, I suspect not and that something like the negative binomial or a generalized Poisson might suit the data better. I'm not seeing a lot of evidence of heterogeneity of variance in the current results either, so a relatively simple covariance structure might work well enough, once other issues are resolved.&amp;nbsp;&lt;A href="http://support.sas.com/resources/papers/proceedings11/349-2011.pdf" target="_self"&gt;This paper by Walt Stroup&lt;/A&gt;&amp;nbsp;dates to 2011, and I know that Walt is continuing to refine his understanding of GLMMs (and recommendations for use) but I think the paper might still be quite helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a distinction between a GLMM and a GEE-type model that focuses on whether or how you model "residual" (the R-side stuff). For an example of the latter, see&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sect024.htm" target="_self"&gt;Example 38.12 Fitting a Marginal (GEE-Type) Model&lt;/A&gt;. I usually take the GLMM approach because I think it is more "natural" (Walt Stroup addresses this concept in his writings), but a GEE-type model could do the job as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is DAP? From the output, it looks like a continuous covariate measured on each tree (ARV). Are you comfortable with assuming a linear relationship between DAP and log(PROD)? A misspecified mean model could contribute to overdispersion. I assume that LOCAL is site, and ANO is year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the range of values for PROD? Are values equal to or close to zero, or large? I'd ponder zero-inflation if counts are small, or even a normal or lognormal distribution (probably with heterogeneous variances) if counts are large.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would use method=laplace or quad, unless results were pathological (which sometimes happens). These methods allow information criteria (e.g., AIC) which you could use to compare models. The default pseudo-likelihood method does not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would start with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model prod = local|ano|dap / dist=poisson;
random intercept / subject=arv(local);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see whether the Generalized chisq/df indicated overdispersion. (Pretty sure it will.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, then I'd try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model prod = local|ano|dap / dist=poisson;
random intercept ano / subject=arv(local);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then I'd try either a negative binomial distribution or a generalized Poisson distribution (see&amp;nbsp;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glimmix_sect026.htm" target="_self"&gt;Example 38.14 Generalized Poisson Mixed Model for Overdispersed Count Data&lt;/A&gt;).&amp;nbsp;As far as I know, it is not possible to model a covariance structure among repeated measures when you move to a two-parameter distribution (e.g., negative binomial) from a one-parameter distribution (e.g., Poisson); SAS tech support might be able to weigh in on that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then I'd look to see whether the fruit production story changed with the model. It's a comfort when results point you in the same direction, regardless &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 16:32:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/551440#M27506</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2019-04-16T16:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/552342#M27520</link>
      <description>&lt;P&gt;You are right that the data are extremely overdispersed. However, I have not been able to get Negative Binomial models to converge with my data. I have not investigated the generalized Poisson - but that is a great suggestion.&lt;/P&gt;&lt;P&gt;As for the R-side random effects, this was a suggestion from the SAS technical support, as I had trouble with model convergence with G-side effects.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, DAP is a continuous variable for tree diameter.&amp;nbsp; Although I have more variables available, our model is predicting fruit production per tree as a function of year, DAP, and site.&amp;nbsp; (I did not list the other possible covariates to simplify the problem.) There is some evidence in previous literature of a more quadratic pattern of diameter versus numbers of fruits (due to tree senescence); however, my data do not support that. There is a weak linear relationship evident in the data.&amp;nbsp; Since there are years where some trees produce no fruit at all, then a log-normal model is not appropriate.&amp;nbsp; These are Brazil nut trees and the fruit production can vary wildly from year to year, with some individuals producing 900+ fruits and some producing 0.&amp;nbsp; 'Normal' production is in the 100-200 range.&amp;nbsp; &amp;nbsp;We are trying to better explain variation among trees and among years.&lt;/P&gt;&lt;P&gt;I had avoided the Laplace and quad methods as I was interested in using Kenward-Rogers DDFM. That said, I have followed your suggestion and got some output. For the first set of code, I get a Pearson Chi-sq/DR of 41.&amp;nbsp; absolutely terrible.&amp;nbsp; For the second, the Pearson Chi-sq/DF many of the effects are not estimable.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLIMMIX DATA=sasds.cast_1019 method=quad ;
	CLASS local arv ano ;
	MODEL prod =   local|dap|ano     /DIST=poisson  ; 
	random intercept ano / subject=arv(local);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any suggestions as to why that might happen? here is the output:&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Fit Statistics for Conditional Distribution 
-2 log L(prod | r. effects) 12826.77 
Pearson Chi-Square 353.17 
Pearson Chi-Square / DF 0.15 



Covariance Parameter Estimates 
Cov Parm Subject Estimate Standard
Error 
Intercept Arv(local) 2.4705 0.2474 
ano Arv(local) 1.1158 0.04375 



Type III Tests of Fixed Effects 
Effect Num DF Den DF F Value Pr &amp;gt; F 
local 1 256 2.16 0.1428 
dap 1 0 3.42 . 
dap*local 1 0 1.85 . 
ano 8 2012 7.38 &amp;lt;.0001 
local*ano 8 2012 1.46 0.1654 
dap*ano 8 0 3.12 . 
dap*local*ano 8 0 0.77 . &lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Apr 2019 20:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/552342#M27520</guid>
      <dc:creator>staudham</dc:creator>
      <dc:date>2019-04-18T20:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/552354#M27521</link>
      <description>&lt;P&gt;Hmm.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see that your model is overspecified (resulting in 0 ddf for some terms), although there could well be something I don't see or some data structure that I don't know that. So at the moment I can only offer some thoughts and questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does each tree have the same DAP for all years, or does DAP change with year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried centering or standardizing DAP?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What proportion of the prod values are equal to zero? Might zero values be predicted by your explanatory variables? Would it be worth ignoring the mixed model structure and exploring a mixture model (e.g., zero-inflated or hurdle) using the FMM procedure?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_fmm_gettingstarted02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_fmm_gettingstarted02.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 21:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/552354#M27521</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2019-04-18T21:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/555064#M27579</link>
      <description>&lt;P&gt;Thanks so much for the suggestions! DAP does change by year, so that was not the issue. I found using the FMM procedure that a Generalized Poisson model fits the data fairly well (Chi Sq/DF = 0.75), and I can use GLIMMIX to fit this model with random effects. However, because this model must be fit with the LaPlace method, I cannot specify a Kenward-Rogers type of DDFM. This makes my degrees of freedom - in my opinion - way too high. However, I think that it is better to interpret the significance of the effects conservatively than to have a very bad fit to the model.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 14:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/555064#M27579</guid>
      <dc:creator>staudham</dc:creator>
      <dc:date>2019-04-30T14:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: comparing models fit with GLIMMIX using R-side Z matrix</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/555119#M27581</link>
      <description>&lt;P&gt;It sounds like you might have found a "good enough" model &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a decent idea of what the denominator degrees of freedom "should" be, then you can specify them explicitly with the DDF option on the MODEL statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 16:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/comparing-models-fit-with-GLIMMIX-using-R-side-Z-matrix/m-p/555119#M27581</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2019-04-30T16:32:15Z</dc:date>
    </item>
  </channel>
</rss>

