<?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 Erorr: Error in computing the variance function during genmod execution in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163877#M8570</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to build a model using generalized estimating equations (gee) in proc genmod to examine factors that may affect inpatient re-admissions (PTNT_RE_ADMIT_IND2) across a number of specifically selected facilities (NM), while controlling for a continuous, numerical measure of severity of illness (severity).&amp;nbsp; Patients (ptno) have multiple visit sequentially indicated by the variable visitindex.&amp;nbsp; My model is below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14237584063241942" jivemacro_uid="_14237584063241942"&gt;
&lt;P&gt;proc genmod data=new.patientencounters descending;&lt;/P&gt;
&lt;P&gt;class&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NM &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visitindex&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptno;&lt;/P&gt;
&lt;P&gt;model PTNT_RE_ADMIT_IND2 = severity NM /dist=bin link=logit type3 ;&lt;/P&gt;
&lt;P&gt;repeated subject=ptno /within=visitindex corr=ar(1) corrw;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this very simple model, I continue to receive the following error message in the SAS Log:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1423758406317714" jivemacro_uid="_1423758406317714"&gt;
&lt;P&gt;NOTE: Algorithm converged.&lt;/P&gt;
&lt;P&gt;ERROR: Error in computing the variance function.&lt;/P&gt;
&lt;P&gt;ERROR: Error in parameter estimate covariance computation.&lt;/P&gt;
&lt;P&gt;ERROR: Error in estimation routine.&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried everything I can think of to remedy this:&amp;nbsp; I've tried to take subsets of my data, I've tried collapsing categories of NM, I've examined cross-tabs to look for sparse tables and zero-cells (none are found), and I can't seem to resolve this error.&amp;nbsp; I performed a Google search for these errors and apparently it's not very common as I've only identified a handful of people who have reported this error or asked for help related to this error.&amp;nbsp; Indeed, I found one other poster in this forum with the questions, but there wasn't much information in that post to help resolve this. Does anyone have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Feb 2015 18:09:23 GMT</pubDate>
    <dc:creator>statistician13</dc:creator>
    <dc:date>2015-02-11T18:09:23Z</dc:date>
    <item>
      <title>Erorr: Error in computing the variance function during genmod execution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163877#M8570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to build a model using generalized estimating equations (gee) in proc genmod to examine factors that may affect inpatient re-admissions (PTNT_RE_ADMIT_IND2) across a number of specifically selected facilities (NM), while controlling for a continuous, numerical measure of severity of illness (severity).&amp;nbsp; Patients (ptno) have multiple visit sequentially indicated by the variable visitindex.&amp;nbsp; My model is below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14237584063241942" jivemacro_uid="_14237584063241942"&gt;
&lt;P&gt;proc genmod data=new.patientencounters descending;&lt;/P&gt;
&lt;P&gt;class&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NM &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visitindex&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptno;&lt;/P&gt;
&lt;P&gt;model PTNT_RE_ADMIT_IND2 = severity NM /dist=bin link=logit type3 ;&lt;/P&gt;
&lt;P&gt;repeated subject=ptno /within=visitindex corr=ar(1) corrw;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run this very simple model, I continue to receive the following error message in the SAS Log:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1423758406317714" jivemacro_uid="_1423758406317714"&gt;
&lt;P&gt;NOTE: Algorithm converged.&lt;/P&gt;
&lt;P&gt;ERROR: Error in computing the variance function.&lt;/P&gt;
&lt;P&gt;ERROR: Error in parameter estimate covariance computation.&lt;/P&gt;
&lt;P&gt;ERROR: Error in estimation routine.&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried everything I can think of to remedy this:&amp;nbsp; I've tried to take subsets of my data, I've tried collapsing categories of NM, I've examined cross-tabs to look for sparse tables and zero-cells (none are found), and I can't seem to resolve this error.&amp;nbsp; I performed a Google search for these errors and apparently it's not very common as I've only identified a handful of people who have reported this error or asked for help related to this error.&amp;nbsp; Indeed, I found one other poster in this forum with the questions, but there wasn't much information in that post to help resolve this. Does anyone have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 18:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163877#M8570</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2015-02-11T18:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Erorr: Error in computing the variance function during genmod execution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163878#M8571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is just a wild guess, but it may be that visitindex is the culprit here.&amp;nbsp; If you have a lot of patients with only a single visit, the optimization routine is going to gag, and the correlation at later time points will dominate.&amp;nbsp; And if the continuous covariate 'severity' is closely aligned/correlated with the number of visits it would make it worse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing to try would be to move over to GLIMMIX, and see what this gives.&amp;nbsp; Here is a conditional repeated measures model:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data=new.patientencounters method=laplace;&lt;/P&gt;&lt;P&gt;class NM visitindex&amp;nbsp; ptno;&lt;/P&gt;&lt;P&gt;model PTNT_RE_ADMIT_IND2 = severity NM&amp;nbsp; /dist=binary;&lt;/P&gt;&lt;P&gt;random visitindex/subject=ptno type=ar(1) gcorr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a hunch this will throw some error messages as well, but I know those messages better than the GENMOD ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other would be to try PROC GEE, especially if you have missing values for visitindex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2015 15:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163878#M8571</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-02-13T15:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Erorr: Error in computing the variance function during genmod execution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163879#M8572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I think I found the culprit.&amp;nbsp; It appears that there were some patients that went to multiple facilities.&amp;nbsp; I discovered this when I attempted to verify that each patient (ptno) was in one facility only (NM).&amp;nbsp; During this analysis, I discovered this was not the case.&amp;nbsp; So, I simply modifed the repeated statement to be "repeated subject=ptno(NM)", treating each patient within a hospital separately.&amp;nbsp; This resolved the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this will be helpful to others who might encounter similar issues as this type of error seems to have relatively little coverage.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 19:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163879#M8572</guid>
      <dc:creator>statistician13</dc:creator>
      <dc:date>2015-02-18T19:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Erorr: Error in computing the variance function during genmod execution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163880#M8573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is good to know.&amp;nbsp; If you had been doing this in GLIMMIX, the error would have been "Infinite likelihood in iteration 1"--so it is good to know the equivalent wording in GENMOD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if you can, but if so, give yourself full credit for answering this one.&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, 19 Feb 2015 17:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Erorr-Error-in-computing-the-variance-function-during-genmod/m-p/163880#M8573</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-02-19T17:31:27Z</dc:date>
    </item>
  </channel>
</rss>

