<?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: which is dependent variable (proc GENMOD) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15529#M345</link>
    <description>Ryan,&lt;BR /&gt;
&lt;BR /&gt;
You do, indeed, have your independent and dependent variables turned around in your genmod code.  Your regression model would suggest that the risk factor can affect whether a respondent is black or not.  This is a strange notion indeed!&lt;BR /&gt;
&lt;BR /&gt;
You can get the RR of 1.3 with the following code:&lt;BR /&gt;
&lt;BR /&gt;
proc genmod data=test desc;&lt;BR /&gt;
 &amp;nbsp; class RefPop (ref='1') /param=glm;&lt;BR /&gt;
 &amp;nbsp; model RiskFactor = RefPop / link=log dist=bin;&lt;BR /&gt;
 &amp;nbsp; estimate 'Beta RefPop' RefPop 1 -1/ exp;&lt;BR /&gt;
run;</description>
    <pubDate>Fri, 17 Jun 2011 16:56:02 GMT</pubDate>
    <dc:creator>Dale</dc:creator>
    <dc:date>2011-06-17T16:56:02Z</dc:date>
    <item>
      <title>which is dependent variable (proc GENMOD)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15528#M344</link>
      <description>I'm trying to determine the prevalence of risk factors in a Black population compared to a reference group, but I can't figure out if the risk factor is the dependent or independent variable.  &lt;BR /&gt;
&lt;BR /&gt;
For example (Here's my 2X2 table):&lt;BR /&gt;
____________Risk Factor&lt;BR /&gt;
____________Yes__________No&lt;BR /&gt;
-------------------------------------------------------&lt;BR /&gt;
Black________34_________99,966_______100,000&lt;BR /&gt;
RefPop_______26_________99,974_______100,000&lt;BR /&gt;
--------------------------------------------------------&lt;BR /&gt;
Total_________60________199,940_______200,000&lt;BR /&gt;
&lt;BR /&gt;
I've been calculating the RR as (34/100,000)/(26/100,000)=1.3&lt;BR /&gt;
&lt;BR /&gt;
I interpret this to mean that the Black population is 1.3 times as likely to smoke (one of the risk factors) as the reference population.&lt;BR /&gt;
&lt;BR /&gt;
However, when I test using proc GENMOD (NOTE:  next step is to include covariates, but I wanted to test it to see if the calculated RR using a single risk factor matched my 2X2 table above) I can't get it to calculate the RR I got above (1.3).  However, it does calculate to the alternative RR (34/60)/(99,966/199,940)=1.13&lt;BR /&gt;
&lt;BR /&gt;
Here's my SAS code:&lt;BR /&gt;
&lt;BR /&gt;
proc genmod data=dataset1; &lt;BR /&gt;
	class  RiskFactor (ref='1') /param=ref;	&lt;BR /&gt;
	model RefPop = RiskFactor / link=log dist=bin;&lt;BR /&gt;
	estimate 'Beta RiskFactor ' RiskFactor 1 -1/ exp;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
(Note:  RefPop = 0 indicates Black, RiskFactor=1 indicates risk factor present)&lt;BR /&gt;
&lt;BR /&gt;
This seems like a really fundamental concept that I can't wrap my head around in this case.  What am I doing wrong?&lt;BR /&gt;
&lt;BR /&gt;
To take this one step further, I've planned to set up the multivariate analysis like this:&lt;BR /&gt;
&lt;BR /&gt;
proc genmod data=dataset1; &lt;BR /&gt;
	class  RiskFactor1 (ref='1') RiskFactor2 (ref='2') RiskFactor3 (ref='1') /param=ref;	&lt;BR /&gt;
	model RefPop = RiskFactor1 RiskFactor2 RiskFactor3 / link=log dist=bin;&lt;BR /&gt;
	estimate 'Beta RiskFactor1 ' RiskFactor1 1 -1/ exp;&lt;BR /&gt;
	estimate 'Beta RiskFactor2 ' RiskFactor2 1 -1/ exp;&lt;BR /&gt;
	estimate 'Beta RiskFactor3 ' RiskFactor3 1 -1/ exp;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Is this correct?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your help.</description>
      <pubDate>Thu, 16 Jun 2011 21:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15528#M344</guid>
      <dc:creator>RyanD</dc:creator>
      <dc:date>2011-06-16T21:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: which is dependent variable (proc GENMOD)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15529#M345</link>
      <description>Ryan,&lt;BR /&gt;
&lt;BR /&gt;
You do, indeed, have your independent and dependent variables turned around in your genmod code.  Your regression model would suggest that the risk factor can affect whether a respondent is black or not.  This is a strange notion indeed!&lt;BR /&gt;
&lt;BR /&gt;
You can get the RR of 1.3 with the following code:&lt;BR /&gt;
&lt;BR /&gt;
proc genmod data=test desc;&lt;BR /&gt;
 &amp;nbsp; class RefPop (ref='1') /param=glm;&lt;BR /&gt;
 &amp;nbsp; model RiskFactor = RefPop / link=log dist=bin;&lt;BR /&gt;
 &amp;nbsp; estimate 'Beta RefPop' RefPop 1 -1/ exp;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 17 Jun 2011 16:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15529#M345</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2011-06-17T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: which is dependent variable (proc GENMOD)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15530#M346</link>
      <description>Thanks Dale.  The code you provided worked!  I appreciate your help.</description>
      <pubDate>Mon, 20 Jun 2011 15:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15530#M346</guid>
      <dc:creator>RyanD</dc:creator>
      <dc:date>2011-06-20T15:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: which is dependent variable (proc GENMOD)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15531#M347</link>
      <description>Hi Dale,&lt;BR /&gt;
&lt;BR /&gt;
I'm getting an error message "Out of memory" when I run my code with the dist=poisson option.  Do you know what's causing this or any work arounds?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Ryan</description>
      <pubDate>Mon, 20 Jun 2011 21:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/which-is-dependent-variable-proc-GENMOD/m-p/15531#M347</guid>
      <dc:creator>RyanD</dc:creator>
      <dc:date>2011-06-20T21:05:13Z</dc:date>
    </item>
  </channel>
</rss>

