<?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: sorting in proc genmod in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127547#M6704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for you guys time, help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I applied the Genmod to compare the slope change for the measures SI3 and SI10, I met with another issue I cannot understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rate is the outcome variable, we use numerator/denominator to present it.&lt;/P&gt;&lt;P&gt;We have a set of independent variables to build the model.&lt;/P&gt;&lt;P&gt;The interaction term measure*time is our most interest output since we want to know which measure rate changes faster.&amp;nbsp; The estimate of time is the slope(rate change) for reference group(SI10) and the estimate of measure*time is the difference slope to the reference group which is for SI3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In output, the estimate for SI10 is 0.231 and the estimate for SI3 is 0.140, which means the rate change of SI10 is quicker than that of SI3.&amp;nbsp; Is it because we use the logit function?&amp;nbsp; From 0.98 to 0.99 need a bigger value(slope) to make it happen?&amp;nbsp; I cannot use simple linear to visualize the plot?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Kui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3273" alt="logit question_Genmod.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3273_logit question_Genmod.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2013 16:20:02 GMT</pubDate>
    <dc:creator>Kui</dc:creator>
    <dc:date>2013-03-22T16:20:02Z</dc:date>
    <item>
      <title>sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127538#M6695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We met with a wired issue when we use proc genmod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is straightforward, we have repeated measures data for hospitals, so we put hsp_ID as subject in the repeated statement.&amp;nbsp; Totnum is total numerator for each hospital by quarter and totdenom is total denominator for each hospital by quarter.&amp;nbsp; This step is variable seletion.&amp;nbsp; By throwing one candidate variable at a time and checking the p value, if p value is greater than 0.1, then we remove it and less than 0.1 we will keep it in the model. &lt;/P&gt;&lt;P&gt;Before we run this code, we sort the data by hospital ID.&amp;nbsp; But, when two person work on the same code, they have different output.&amp;nbsp; Then, we figured it out, one person sort the data by hospital ID and quarter, and another person sort the data by hospital ID and status (a variable in the dataset).&lt;/P&gt;&lt;P&gt;proc genmod data=dsn;&lt;/P&gt;&lt;P&gt;class hsp_ID &amp;amp;indvars.;&lt;/P&gt;&lt;P&gt;model totnum/totdenom=&amp;amp;indvars./dist=binomial link=logit;&lt;/P&gt;&lt;P&gt;repeated subject=hsp_ID/type=AR corrw;&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;Sometimes, both of their p value are greater than 0.1 or less than 0.1, but sometimes, one is greater than 0.1 and another is less than.&amp;nbsp; So, the same dataset and same coding give us different output if we sort the data differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grateful for any thoughts or suggestions!&lt;/P&gt;&lt;P&gt;Kui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 23:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127538#M6695</guid>
      <dc:creator>Kui</dc:creator>
      <dc:date>2013-03-04T23:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127539#M6696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not surprising behavior.&amp;nbsp; These communities are filled with posts pointing out the dangers of model building using such stepwise methods, and they get even worse when the data are not normally distributed.&amp;nbsp; My recommendation is to do something (almost anything) different for the model building.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you MUST do this, then sorting by hospital ID and then quarter preserves the repeated nature correctly, and so would be a better choice.&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, 05 Mar 2013 13:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127539#M6696</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-03-05T13:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127540#M6697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Steve, for your suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still confusing why the same dataset only the variables sorted by different order, we got different output?&amp;nbsp; It is really dangerous and I am kind of lost the confidence for using the procecure. :smileyconfused:&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, 05 Mar 2013 16:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127540#M6697</guid>
      <dc:creator>Kui</dc:creator>
      <dc:date>2013-03-05T16:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127541#M6698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't use GENMOD much, preferring GLIMMIX.&amp;nbsp; In GLIMMIX, you would specify a repeated measures model of this sort as something like:&lt;/P&gt;&lt;P&gt;proc glimmix data=dsn;&lt;/P&gt;&lt;P&gt;class hsp_ID &amp;amp;indvars.;&lt;/P&gt;&lt;P&gt;model totnum/totdenom=&amp;amp;indvars./dist=binomial link=logit;&lt;/P&gt;&lt;P&gt;random quarter /residual subject=hsp_ID type=AR(1); /* For a GEE type model; for a true GLMM with a repeated structure for this distribution, drop 'residual' */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I assume that quarter is in the list of &amp;amp;indvars.&amp;nbsp; This approach tells me that I should sort my data by subject and then by the indexing variable (here it is quarter).&amp;nbsp; Because of this schema, I haven't seen the problem you found with GENMOD.&amp;nbsp; Because GENMOD does not specify the indexing variable, I too worry that if the data are not sorted in a way that recognizes the repeated nature then the algorithm may lead to a discrepancy.&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, 05 Mar 2013 16:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127541#M6698</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-03-05T16:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127542#M6699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am grateful for your time and help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have two type of "quarter" in the list.&amp;nbsp; One is 1, 2, 3 and 4, which is for the seasonality consideration.&amp;nbsp; Another is continuous quarter, 1, 2,...22, which is 22 quarters in our data.&amp;nbsp; Both of them are candidate variables for the model.&amp;nbsp; The outcome is the rate(totnum/totdenom) changing by quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is more appropriate using for indexing variable?&amp;nbsp; How to understand to put the quarter in the random statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 16:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127542#M6699</guid>
      <dc:creator>Kui</dc:creator>
      <dc:date>2013-03-05T16:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127543#M6700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second is the repeated measure.&amp;nbsp; I would call the first "season" for obvious reasons (not wanting to confuse the two types of quarter). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, shifting gears a bit--why go through the model building effort in this way?&amp;nbsp; What is the ultimate objective?&amp;nbsp; If you want to develop a predictive model, backward stepwise is almost sure to result in a model that has inadequate predictive ability.&amp;nbsp; See Cassell and Flom &lt;A href="http://www.nesug.org/Proceedings/nesug09/sa/SA01.pdf" target="_new"&gt;http://www.nesug.org/Proceedings/nesug09/sa/SA01.pdf&lt;/A&gt;, or &lt;A href="http://www.denversug.org/presentations/2010CODay/StopStepPresntn.pdf"&gt;http://www.denversug.org/presentations/2010CODay/StopStepPresntn.pdf&lt;/A&gt;, or Frank Harrell's &lt;EM&gt;Regression Modeling Strategies &lt;/EM&gt;(2001) at &lt;A href="http://biostat.mc.vanderbilt.edu/twiki/pub/Main/RmS/rms.pdf"&gt;http://biostat.mc.vanderbilt.edu/twiki/pub/Main/RmS/rms.pdf&lt;/A&gt;.&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, 05 Mar 2013 17:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127543#M6700</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-03-05T17:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127544#M6701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AR(k) structure makes the ordering of your observation within a cluster matter, that is the problem&lt;/P&gt;&lt;P&gt;Are you sure you need to impose this structure to your cov matrix?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 18:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127544#M6701</guid>
      <dc:creator>oloolo</dc:creator>
      <dc:date>2013-03-19T18:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127545#M6702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&amp;nbsp; I changed it to default.&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 18:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127545#M6702</guid>
      <dc:creator>Kui</dc:creator>
      <dc:date>2013-03-19T18:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127546#M6703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the default is exchangeable (same as compound symmetry), so sorting will not make a difference.&amp;nbsp; However, if this is truly repeated in time (such as season) then the ordering is important: (spring, summer, fall, winter) is not the same as (summer, spring, winter, fall).&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, 19 Mar 2013 19:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127546#M6703</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-03-19T19:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: sorting in proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127547#M6704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for you guys time, help and suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I applied the Genmod to compare the slope change for the measures SI3 and SI10, I met with another issue I cannot understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rate is the outcome variable, we use numerator/denominator to present it.&lt;/P&gt;&lt;P&gt;We have a set of independent variables to build the model.&lt;/P&gt;&lt;P&gt;The interaction term measure*time is our most interest output since we want to know which measure rate changes faster.&amp;nbsp; The estimate of time is the slope(rate change) for reference group(SI10) and the estimate of measure*time is the difference slope to the reference group which is for SI3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In output, the estimate for SI10 is 0.231 and the estimate for SI3 is 0.140, which means the rate change of SI10 is quicker than that of SI3.&amp;nbsp; Is it because we use the logit function?&amp;nbsp; From 0.98 to 0.99 need a bigger value(slope) to make it happen?&amp;nbsp; I cannot use simple linear to visualize the plot?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Kui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="3273" alt="logit question_Genmod.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3273_logit question_Genmod.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 16:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sorting-in-proc-genmod/m-p/127547#M6704</guid>
      <dc:creator>Kui</dc:creator>
      <dc:date>2013-03-22T16:20:02Z</dc:date>
    </item>
  </channel>
</rss>

