<?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 How to have &amp;quot;Fixed Effects&amp;quot; and &amp;quot;Cluster Robust Standard Error&amp;quot; simultaneously in Proc Genmod or Proc Glimmix? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106619#M29706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;Dear all, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;I am running into a big problem trying to have administrative region &lt;BR /&gt;fixed effects and account for cluster robust standard error. &lt;BR /&gt;The datset i am using for the research collects data using multiple- &lt;BR /&gt;stage sampling. &lt;BR /&gt;The sampling of clusters in districts, communes, enumeration areas at &lt;BR /&gt;the first stage and then selecting households within each cluster &lt;BR /&gt;represents multiple-stage stratified sampling design which is not &lt;BR /&gt;perfectly random. &lt;BR /&gt;This would underestimate my SE and I would like to have robust &lt;BR /&gt;standard error in the model to fix the problem. &lt;BR /&gt;The model I run: &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;proc genmod data=xlucky descending&amp;nbsp; ; &lt;BR /&gt;class districtid(param=ref); &lt;BR /&gt;model (Binary Dependent Variable) = (explanatory variables) &lt;BR /&gt;/ dist=binary link =logit&amp;nbsp; ; &lt;BR /&gt;repeated subject=districtid/type=cs corrw; &lt;BR /&gt;run; &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;This code give me all the parameter estimates and robust standard &lt;BR /&gt;errors. &lt;BR /&gt;HOWEVER, when I run: &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;proc genmod data=xlucky descending&amp;nbsp; ; &lt;BR /&gt;class districtid(param=ref); &lt;BR /&gt;model (Binary Dependent Variable) = (explanatory variables districtid) &lt;BR /&gt;/ dist=binary link =logit&amp;nbsp; ; &lt;BR /&gt;repeated subject=districtid/type=cs corrw; &lt;BR /&gt;run; &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;To have fixed effect and the RSE, the error massage pops up: &lt;BR /&gt;WARNING: The negative of the Hessian is not positive definite. The &lt;BR /&gt;convergence is questionable. &lt;BR /&gt;WARNING: The procedure is continuing but the validity of the model fit &lt;BR /&gt;is questionable. &lt;BR /&gt;WARNING: The specified model did not converge. &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;Any idea how to get this right? &lt;BR /&gt;Same problem happens when I run proc glimmix. &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;Thank you for your help. &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;WL &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2012 20:40:22 GMT</pubDate>
    <dc:creator>WLEE</dc:creator>
    <dc:date>2012-05-07T20:40:22Z</dc:date>
    <item>
      <title>How to have "Fixed Effects" and "Cluster Robust Standard Error" simultaneously in Proc Genmod or Proc Glimmix?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106619#M29706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;Dear all, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;I am running into a big problem trying to have administrative region &lt;BR /&gt;fixed effects and account for cluster robust standard error. &lt;BR /&gt;The datset i am using for the research collects data using multiple- &lt;BR /&gt;stage sampling. &lt;BR /&gt;The sampling of clusters in districts, communes, enumeration areas at &lt;BR /&gt;the first stage and then selecting households within each cluster &lt;BR /&gt;represents multiple-stage stratified sampling design which is not &lt;BR /&gt;perfectly random. &lt;BR /&gt;This would underestimate my SE and I would like to have robust &lt;BR /&gt;standard error in the model to fix the problem. &lt;BR /&gt;The model I run: &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;proc genmod data=xlucky descending&amp;nbsp; ; &lt;BR /&gt;class districtid(param=ref); &lt;BR /&gt;model (Binary Dependent Variable) = (explanatory variables) &lt;BR /&gt;/ dist=binary link =logit&amp;nbsp; ; &lt;BR /&gt;repeated subject=districtid/type=cs corrw; &lt;BR /&gt;run; &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;This code give me all the parameter estimates and robust standard &lt;BR /&gt;errors. &lt;BR /&gt;HOWEVER, when I run: &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;proc genmod data=xlucky descending&amp;nbsp; ; &lt;BR /&gt;class districtid(param=ref); &lt;BR /&gt;model (Binary Dependent Variable) = (explanatory variables districtid) &lt;BR /&gt;/ dist=binary link =logit&amp;nbsp; ; &lt;BR /&gt;repeated subject=districtid/type=cs corrw; &lt;BR /&gt;run; &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;To have fixed effect and the RSE, the error massage pops up: &lt;BR /&gt;WARNING: The negative of the Hessian is not positive definite. The &lt;BR /&gt;convergence is questionable. &lt;BR /&gt;WARNING: The procedure is continuing but the validity of the model fit &lt;BR /&gt;is questionable. &lt;BR /&gt;WARNING: The specified model did not converge. &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;Any idea how to get this right? &lt;BR /&gt;Same problem happens when I run proc glimmix. &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;Thank you for your help. &lt;/P&gt;&lt;P style="color: #000000; font-family: arial, sans-serif; font-size: 12px; text-align: -webkit-auto; background-color: #ffffff;"&gt;WL &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 20:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106619#M29706</guid>
      <dc:creator>WLEE</dc:creator>
      <dc:date>2012-05-07T20:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to have "Fixed Effects" and "Cluster Robust Standard Error" simultaneously in Proc Genmod or Proc Glimmix?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106620#M29707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The GENMOD error arises, I think, from the use of GEEs to estimate the within cluster variability, when districtid is being used in two ways.&amp;nbsp; Could you share the GLIMMIX code that gives the same error?&amp;nbsp; I feel a lot more comfortable commenting on errors in GLIMMIX, as I use it a lot more than GENMOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moving on, and based on some of the info, I may be answering the wrong question here, but have you considered PROC SURVEYLOGISTIC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would the following give anything like what you are looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc surveylogistic data=xlucky ;&lt;/P&gt;&lt;P&gt;class districtid(param=ref);&lt;/P&gt;&lt;P&gt;model binary_dependent_variable (descending) = explanatory_variables districtid;&lt;/P&gt;&lt;P&gt;cluster districtid;&lt;/P&gt;&lt;P&gt;weight &amp;lt;NEED A VARIABLE HERE&amp;gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would require some sort of weighting variable to reflect the proportions sampled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code could be modified to reflect the multiple levels of sampling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck with this.&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>Tue, 08 May 2012 11:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106620#M29707</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-05-08T11:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to have "Fixed Effects" and "Cluster Robust Standard Error" simultaneously in Proc Genmod or Proc Glimmix?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106621#M29708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steve Denham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your very helpful reply.&lt;/P&gt;&lt;P&gt;The Glimmix I fit was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data =xlucky ;&lt;/P&gt;&lt;P&gt;class districtid ;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;model binary_dependent_variable (descending) = explanatory_variables districtid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/solution&amp;nbsp; dist=binary link=logit&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;random intercept/subject=districtid;&lt;/P&gt;&lt;P&gt;random _residual_ ;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure to include both G and R random effects in my model, but that was what I did anyway.( I am using a survey that use multiple-staged sampling, do I have base to assume that there are both random effects?)&lt;/P&gt;&lt;P&gt;This code gives me the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Did not converge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and gives me no parameter estimates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe what I should do is to follow your suggestion and use proc surveylogistic to run my regression.&lt;/P&gt;&lt;P&gt;I also have question regarding surveylogistic. That is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would happen if I do not include "weight" command in the model?&lt;/P&gt;&lt;P&gt;What is wieght? number of population in each district / total population?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for your valuable insights on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 13:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106621#M29708</guid>
      <dc:creator>WLEE</dc:creator>
      <dc:date>2012-05-08T13:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to have "Fixed Effects" and "Cluster Robust Standard Error" simultaneously in Proc Genmod or Proc Glimmix?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106622#M29709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Working from the bottom up:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like there is more than just WEIGHT to consider.&amp;nbsp; Multistage sampling means looking at the primary sampling rate and total number of primary sampling units.&amp;nbsp; That gets explained fairly well in the documentation.&amp;nbsp; For examples with a continuous response variable, check PROC SURVEYREG documentation.&amp;nbsp; I think examples 90.4 and 90.5 can be converted to SURVEYLOGISTIC as a guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On to GLIMMIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Did not converge" can happen a lot of ways.&amp;nbsp; With no other messages, it may be that you need more iterations or to slightly relax the convergence criteria.&amp;nbsp; See the NLOPTIONS statement for guidance in these areas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My opinion is that the R side effects may not be needed.&amp;nbsp; It might be better to accommodate the multiple stage sampling in G side effects.&amp;nbsp; The secondary sampling units would have to be specified as a class variable, but not included in the model statement.&amp;nbsp; Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix data =xlucky ;&lt;/P&gt;&lt;P&gt;class districtid secondid;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;model binary_dependent_variable (descending) = explanatory_variables districtid&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/solution&amp;nbsp; dist=binary link=logit&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;random intercept districtid/subject=secondid solution;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the more I think about this, the more I believe that the SURVEY procs are where you need to be looking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 15:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106622#M29709</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2012-05-08T15:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to have "Fixed Effects" and "Cluster Robust Standard Error" simultaneously in Proc Genmod or Proc Glimmix?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106623#M29710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you again for your comments. It looks like the proc surveylogistic is the way to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 19:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-have-quot-Fixed-Effects-quot-and-quot-Cluster-Robust/m-p/106623#M29710</guid>
      <dc:creator>WLEE</dc:creator>
      <dc:date>2012-05-08T19:24:21Z</dc:date>
    </item>
  </channel>
</rss>

