<?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: PROC GENMOD w/ Complex Survey Data in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/569207#M28002</link>
    <description>&lt;P&gt;Is this a SURVEY procedure that is being created? It seems like a major oversight to not have a Proc Survey Genmod procedure.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jun 2019 18:04:17 GMT</pubDate>
    <dc:creator>DrKristy</dc:creator>
    <dc:date>2019-06-26T18:04:17Z</dc:date>
    <item>
      <title>PROC GENMOD w/ Complex Survey Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312496#M16481</link>
      <description>&lt;P&gt;I am using PROC GENMOD for the first time to analyze complex survey data. The outcome variable is a count, injuries per year, over 14 years, from 2002 to 2015.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm seeking some help in understanding the error message below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found some generic syntax online and ran it w/ my variables and data:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc genmod data=data;
class cluster_var stratum_var ;
model y=x&amp;nbsp;/dist=negbin link=log;
weight psu_var;
repeated subject =cluster_var(stratum_var);
domain=flag;
run;&lt;/PRE&gt;
&lt;P&gt;I created a subset in a preceding DATA step by defining a variable, flag. I added the DOMAIN statement myself. It was not included in the sample code I found. I did not seem to produce an error, but I'm not sure if it worked properly either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run this, the following messages are generated:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Class levels for some variables were not printed due to excessive size.&lt;/P&gt;
&lt;P&gt;NOTE: Algorithm converged.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: A missing value was detected in the SUBJECT, WITHINSUBJECT, or LOGORVAR effect. All values of variables in these effects must be non-missing.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;Any ideas what this error message means?&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 00:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312496#M16481</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-11-18T00:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD w/ Complex Survey Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312545#M16482</link>
      <description>&lt;PRE&gt;
That means there are missing value in cluster_var or  stratum_var .check your data.

&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Nov 2016 08:17:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312545#M16482</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-11-18T08:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD w/ Complex Survey Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312741#M16487</link>
      <description>&lt;P&gt;PROC GENMOD should not be used to analyze complex survey data.&amp;nbsp;Only the SURVEY procedures (SURVEYFREQ, SURVEYLOGISTIC, etc.) can provide a proper analysis of survey sample data. &amp;nbsp;A variable specified in the WEIGHT statement in other procedures may produce correct parameter estimates, but their variances will not be correct. &amp;nbsp;Special variance estimators are needed in the analysis of survey data and only the SURVEY procedures have these estimators. &amp;nbsp;There is currently no SURVEY procedure available for fitting count models such as Poisson or negative binomial models.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See &lt;A href="http://support.sas.com/kb/22600" target="_self"&gt;this note&lt;/A&gt; for more.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 21:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312741#M16487</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2016-11-18T21:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD w/ Complex Survey Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312747#M16488</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave﻿&lt;/a&gt;&amp;nbsp;Wow. Thanks, I had no idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have an outcome variable that is injuries per year. It's&amp;nbsp;a count so I was going to use a negative binomial model...What SURVEY procedure should I used to determine if there is a linear relationship between year and injuries per year? Should I treat injuries per year as a continuous variable and use PROC SURVEYREG? Is there another approach?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 22:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/312747#M16488</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-11-18T22:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD w/ Complex Survey Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/313105#M16496</link>
      <description>&lt;P&gt;Currently, there is no SURVEY procedure for fitting count models using the Poisson or negative binomial distributions. &amp;nbsp;SURVEYREG will assume that the response is normally distributed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2016 15:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/313105#M16496</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2016-11-21T15:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GENMOD w/ Complex Survey Data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/569207#M28002</link>
      <description>&lt;P&gt;Is this a SURVEY procedure that is being created? It seems like a major oversight to not have a Proc Survey Genmod procedure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 18:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GENMOD-w-Complex-Survey-Data/m-p/569207#M28002</guid>
      <dc:creator>DrKristy</dc:creator>
      <dc:date>2019-06-26T18:04:17Z</dc:date>
    </item>
  </channel>
</rss>

