<?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: Fitting OLS and GLM with repeated observation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192645#M10255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deep water here, but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at QICu for GENMOD and AIC for GLIMMIX.&amp;nbsp; Since these are essentially -2 loglikelihood + 2*number of parameters, and the number of parameters should be the same for both approaches, then the difference between these would be the difference in the log likelihoods (or quasi-likelihoods).&amp;nbsp; And for GLIMMIX, with an R-side approach, the information criterion is based on a pseudo-likelihood rather than a quasi-likelihood, but in this case they should be close.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing the optimization technique in GLIMMIX, with an NLOPTIONS statement.&amp;nbsp; GENMOD uses a ridge stabilized Newton-Raphson method, so add the following to your GLIMMIX codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nloptions tech=nrridg;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to see if the results are any closer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Dec 2014 16:09:59 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-12-10T16:09:59Z</dc:date>
    <item>
      <title>Fitting OLS and GLM with repeated observation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192642#M10252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am comparing different estimation methodologies for a project I am working on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The first model I am estimating is an ols, To get robust standard error for the correlated observations, I used genmod. But then someone told me the genmod routine for calculating robust standard errors are not entirely correct and suggested using glimmix. So I tried that too. My understanding is that the parameter estimates should be same, but I am not getting that. I tried different estimation within glimmix but that did not give similar estimates either. Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc genmod data= filename ; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;class id;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; model log_y = x1 x2 x3 x4 ; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;repeated subject=id/type=cs printmle ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc glimmix data = filename ; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;class id ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;model log_y = x1 x2 x3 x4 / s ; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;random _residual_ /subject=id type=cs ;run ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The second model I am estimating is GLM. I used genmod for that as well. To be able to use the same routine for both, I re-estimated glm using glimmix and again I get different parameter estimates. So, any explanation for that will be helpful. my codes are below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code for GLM:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc genmod data= filename ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;class id;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;model y=&amp;nbsp; x1 x2 x3 x4&amp;nbsp; / dist=gamma link=log;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;repeated subject= id/type=cs printmle;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;proc glimmix data = filename; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;class id ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;nloptions maxiter= 50;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;model y=&amp;nbsp; x1 x2 x3 x4&amp;nbsp; / dist=gamma link=log; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;random _residual_ /subject= id type=cs ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 21:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192642#M10252</guid>
      <dc:creator>cd2011</dc:creator>
      <dc:date>2014-12-02T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting OLS and GLM with repeated observation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192643#M10253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you say you get different estimates, can you present examples?&amp;nbsp; I mean, are the differences in the second or third decimal place, or are they grossly different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been able to get estimations between GENMOD and GLIMMIX to "match", but there is occasionally a trivial difference in the estimates.&amp;nbsp; Be sure to check the log likelihood values and the number of observations analyzed as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Dec 2014 19:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192643#M10253</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-12-03T19:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting OLS and GLM with repeated observation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192644#M10254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input. I noticed the differences are at the second decimal places for some and at the third decimal for others. An example given below:&lt;/P&gt;&lt;P&gt;OLS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GENMOD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GLIMMIX&lt;/P&gt;&lt;P&gt;intercept&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.0117&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.0272&lt;/P&gt;&lt;P&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5870&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.5464&lt;/P&gt;&lt;P&gt;x2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -0.0216&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -0.02112&lt;/P&gt;&lt;P&gt;x3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.2678&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.2892&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GLM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GENMOD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GLIMMIX&lt;/P&gt;&lt;P&gt;intercept&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.4702&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.5124&lt;/P&gt;&lt;P&gt;x1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8672&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.8738&lt;/P&gt;&lt;P&gt;x2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -0.0165&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -0.01434&lt;/P&gt;&lt;P&gt;x3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.0139&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.9925&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, number of observations are same in both, but I cannot compare log-likelihood since GENMOD with repeated option does not give Log-likelihood values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could it be the &lt;EM&gt;type&lt;/EM&gt; option within the random statement ? When I do the two methods without the random or repeated options, the answers are same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- CD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 20:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192644#M10254</guid>
      <dc:creator>cd2011</dc:creator>
      <dc:date>2014-12-09T20:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting OLS and GLM with repeated observation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192645#M10255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deep water here, but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at QICu for GENMOD and AIC for GLIMMIX.&amp;nbsp; Since these are essentially -2 loglikelihood + 2*number of parameters, and the number of parameters should be the same for both approaches, then the difference between these would be the difference in the log likelihoods (or quasi-likelihoods).&amp;nbsp; And for GLIMMIX, with an R-side approach, the information criterion is based on a pseudo-likelihood rather than a quasi-likelihood, but in this case they should be close.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing the optimization technique in GLIMMIX, with an NLOPTIONS statement.&amp;nbsp; GENMOD uses a ridge stabilized Newton-Raphson method, so add the following to your GLIMMIX codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nloptions tech=nrridg;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to see if the results are any closer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 16:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192645#M10255</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-12-10T16:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting OLS and GLM with repeated observation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192646#M10256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did as you suggested. But the tech=nrridg and the default method gave the same parameter estimates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of the day, I wanted to make sure the estimation method I am using is doing what I intend it to do, that is getting robust standard error for OLS and estimating GLM with subject correlation. Before I used genmod for that and now I am using GLIMMIX with random residual option. Am I ok to use GLIMMIX for this purpose? It would have been nice if I could test these two approaches giving same results, but somehow I am not getting this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Dec 2014 18:52:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192646#M10256</guid>
      <dc:creator>cd2011</dc:creator>
      <dc:date>2014-12-10T18:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting OLS and GLM with repeated observation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192647#M10257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way to get robust standard errors in GLIMMIX is to specify ddfm=kr2 in the MODEL statement as an option.&amp;nbsp; The Kenward-Roberts adjustment uses Satterthwaite degrees of freedom, and the methods of Prasad-Rao-Kackar-Harville-Jeske to adjust the variance-covariance matrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2014 19:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-OLS-and-GLM-with-repeated-observation/m-p/192647#M10257</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-12-11T19:07:57Z</dc:date>
    </item>
  </channel>
</rss>

