<?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: LOG Error Message &amp;quot; Only one cluster in a stratum. The estimate of variance will omit this in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260235#M13790</link>
    <description>&lt;P&gt;Try running&lt;/P&gt;
&lt;P&gt;proc freq &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; Mylib&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;newbrfss_subgroup2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables&amp;nbsp; Nonsmoker * _Ststr * _psu&amp;nbsp;/ list;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one or more lines has a freq of 1 those are the culprits. If there is only one _psu then there is NO variability within the stratum.&lt;/P&gt;
&lt;P&gt;You may have to include a WHERE clause for the class variables to be non-missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be that your Nonsmoker is very unbalanced in some geographic area (_ststr), assuming nonsmoker is basically a&amp;nbsp; yes/no value of some sort.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2016 21:16:22 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-03-30T21:16:22Z</dc:date>
    <item>
      <title>LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this stratum"</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260230#M13789</link>
      <description>&lt;P&gt;I am using proc surveylogistic and place my code below. However, I am receiving the following message in my log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Only one cluster in a stratum. The estimate of variance will omit this stratum"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveylogistic data = Mylib.newbrfss_subgroup2;
Class Age65older (ref='1') _EDUCAG (ref='1') _INCOMG (ref='1')  _RFBMI5 (ref='2') _IMPRACE (ref='1') 
_SMOKER3 (ref='4') _ASTHMS1 (ref='3') /param=ref ;
Domain Nonsmoker;
Strata _Ststr;
Cluster _Psu;
Weight _LLCPWT;
model MISS_AnyTeeth (event='1')= Fem_NoDrinker Fem_ModDrinker Fem_HeavyDrinker Male_NoDrinker Male_ModDrinker Male_HeavyDrinker
Age65older _EDUCAG _INCOMG _DENVST2 _RFBMI5 _IMPRACE DIABETE3 _SMOKER3 _ASTHMS1 CVDSTRK3 ; run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Mar 2016 20:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260230#M13789</guid>
      <dc:creator>sdwhite1989</dc:creator>
      <dc:date>2016-03-30T20:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260235#M13790</link>
      <description>&lt;P&gt;Try running&lt;/P&gt;
&lt;P&gt;proc freq &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; Mylib&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;newbrfss_subgroup2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables&amp;nbsp; Nonsmoker * _Ststr * _psu&amp;nbsp;/ list;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one or more lines has a freq of 1 those are the culprits. If there is only one _psu then there is NO variability within the stratum.&lt;/P&gt;
&lt;P&gt;You may have to include a WHERE clause for the class variables to be non-missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be that your Nonsmoker is very unbalanced in some geographic area (_ststr), assuming nonsmoker is basically a&amp;nbsp; yes/no value of some sort.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 21:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260235#M13790</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-30T21:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260242#M13791</link>
      <description>What does the DOMAIN variable mean?</description>
      <pubDate>Wed, 30 Mar 2016 21:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260242#M13791</guid>
      <dc:creator>sdwhite1989</dc:creator>
      <dc:date>2016-03-30T21:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260260#M13792</link>
      <description>&lt;P&gt;Dangerous to be running procs without understanding the options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Domain requests an analysis for each level of the variable (subpopulation) in addition to the whole data set.&lt;/P&gt;
&lt;P&gt;I would expect to get output related to 1) Non-smoker respondents (from the name of the variable) 2) Smokers (if that is another level) and possibly 3) indeterminate respondents (refused or did not answer enough questions to know the smoking status).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 22:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/260260#M13792</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-30T22:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/837555#M41483</link>
      <description>&lt;P&gt;sorry, i met the same question as well. I don't understand your reply about where clause. should i add the where clause following the class variables?&amp;nbsp; like this ? what should I add? I have found the ommited stratum,but waht should I do to avoid the situation?&lt;/P&gt;&lt;P&gt;And whether an omitted stratum will have an influence on the outcomes? please help me! pleeeeeeeeeeeease! thank you!&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc surveylogistic data=final nomcar varmethod=taylor; strata sdmvstra/list; cluster sdmvpsu; weight wtmec12yr; domain dmadult;
class riagendr(param=ref ref="1") race(param=ref ref="3") dmdurcat(param=ref ref="1") hbA1c_control(param=ref ref="1") nhdlcontrol(param=ref ref="1") obese(param=ref ref="0") bpmet_old(param=ref ref="0") ratio(param=ref ref="2")/where;
model drcat(desc)=ratio ridageyr riagendr dmdurcat race hbA1c_control nhdlcontrol bpmet_old obese/noint clparm vadjust=none;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2022 08:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/837555#M41483</guid>
      <dc:creator>liiiiiiiib</dc:creator>
      <dc:date>2022-10-09T08:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/837562#M41486</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/400430"&gt;@liiiiiiiib&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;sorry, i met the same question as well. I don't understand your reply about where clause. should i add the where clause following the class variables?&amp;nbsp; like this ? what should I add? I have found the ommited stratum,but waht should I do to avoid the situation?&lt;/P&gt;
&lt;P&gt;And whether an omitted stratum will have an influence on the outcomes? please help me! pleeeeeeeeeeeease! thank you!&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc surveylogistic data=final nomcar varmethod=taylor; strata sdmvstra/list; cluster sdmvpsu; weight wtmec12yr; domain dmadult;
class riagendr(param=ref ref="1") race(param=ref ref="3") dmdurcat(param=ref ref="1") hbA1c_control(param=ref ref="1") nhdlcontrol(param=ref ref="1") obese(param=ref ref="0") bpmet_old(param=ref ref="0") ratio(param=ref ref="2")/where;
model drcat(desc)=ratio ridageyr riagendr dmdurcat race hbA1c_control nhdlcontrol bpmet_old obese/noint clparm vadjust=none;run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did you run a Proc FREQ on your class variables as shown? Did it identify the combination(s) where there is only one observation in the combination?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The WHERE suggestion &lt;STRONG&gt;might&lt;/STRONG&gt; be of use if one or more of your class variables is missing frequently. Which could result in singular clusters. The WHERE statement is a separate statement, not an option. Would look like (generic):&lt;/P&gt;
&lt;PRE&gt;Where not missing(var1) and not missing(othervar) and not missing(thatvar);&lt;/PRE&gt;
&lt;P&gt;The variable names would be your variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may remove the message but it does that by, very likely, removing entire clusters and those values won't appear at all in the model. It also comes from some work with the BRFSS survey where we had that message because of some of the "strata" which were related to something basically added by the weighting scheme after collection and not really the sample design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically your data will generate that message with your combination of variables. It is just telling you that some caution may be needed when using those domains / clusters as there is no variability within those in your current data. Depending on&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2022 11:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/837562#M41486</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-09T11:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: LOG Error Message " Only one cluster in a stratum. The estimate of variance will omit this</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/837662#M41491</link>
      <description>&lt;P&gt;The log message is a Note and not an Error. When you have clusters and strata, clusters are nested within strata in the SAS survey procedures. If there is a stratum with only a single cluster in it, the within-stratum variance cannot be computed. (You can look at the variance estimation formula and see where (n_h - 1) introduces a division by zero). The message is letting you know this stratum is omitted from the variance calculation, treating its contribution as zero. The results are valid, but if you don't want to make the zero assumption, you would need to make prior adjustments to your data such as collapsing strata.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 13:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LOG-Error-Message-quot-Only-one-cluster-in-a-stratum-The/m-p/837662#M41491</guid>
      <dc:creator>Zard</dc:creator>
      <dc:date>2022-10-10T13:36:08Z</dc:date>
    </item>
  </channel>
</rss>

