<?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 proc phreg hazard ration levels list for categorical variables and choose reference category in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506089#M1258</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have in the output for a Cox regression (the table with the results for the estimates for maximum likelihood analysis) the list showing the results for each level of the independent variable "independent_v1" or "independent_v2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dataset is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id time1 event1 weight independent_v1 independent_v2;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 0 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 1 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 2 0 0.8 0 0&lt;/P&gt;&lt;P&gt;1 3 0 0.8 0 0&lt;/P&gt;&lt;P&gt;1 4 0 0.8 0 1&lt;/P&gt;&lt;P&gt;15 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 6 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 7 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 8 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 9 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 10 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1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t;P&gt;7 7 0 0.89 0 3&lt;/P&gt;&lt;P&gt;7 8 1 0.89 0 1&lt;/P&gt;&lt;P&gt;7 9 . 0.89 0 1&lt;/P&gt;&lt;P&gt;7 10 . 0.89 0 1&lt;/P&gt;&lt;P&gt;8 0 0 1.1 1 0&lt;/P&gt;&lt;P&gt;8 1 0 1.1 1 1&lt;/P&gt;&lt;P&gt;8 2 0 1.1 1 1&lt;/P&gt;&lt;P&gt;8 3 . 1.1 1 2&lt;/P&gt;&lt;P&gt;8 4 . 1.1 1 2&lt;/P&gt;&lt;P&gt;;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I code I have the regression results list, but I would like to know how to change the reference category for each independent variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My coding:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=have;&lt;/P&gt;&lt;P&gt;class independent_v1 independent_v2;&lt;/P&gt;&lt;P&gt;id id;&lt;/P&gt;&lt;P&gt;model time1*event1(0) =&amp;nbsp;independent_v1 independent_v2;&lt;/P&gt;&lt;P&gt;weight weight;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So SAS automatically chooses to omit one level as the reference category for each independent variable. For example, How I could change that so I choose the reference category 1 for "independent_v1" and 3 for "independent_v2", ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 18:37:03 GMT</pubDate>
    <dc:creator>MFraga</dc:creator>
    <dc:date>2018-10-19T18:37:03Z</dc:date>
    <item>
      <title>proc phreg hazard ration levels list for categorical variables and choose reference category</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506089#M1258</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have in the output for a Cox regression (the table with the results for the estimates for maximum likelihood analysis) the list showing the results for each level of the independent variable "independent_v1" or "independent_v2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dataset is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id time1 event1 weight independent_v1 independent_v2;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 0 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 1 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 2 0 0.8 0 0&lt;/P&gt;&lt;P&gt;1 3 0 0.8 0 0&lt;/P&gt;&lt;P&gt;1 4 0 0.8 0 1&lt;/P&gt;&lt;P&gt;15 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 6 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 7 0 0.8 0 1&lt;/P&gt;&lt;P&gt;1 8 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 9 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 10 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 11 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 12 0 0.8 0 2&lt;/P&gt;&lt;P&gt;1 13 0 0.8 0 2&lt;/P&gt;&lt;P&gt;2 0 0 1.1 1 0&lt;/P&gt;&lt;P&gt;2 1 1 1.1 1 0&lt;/P&gt;&lt;P&gt;2 2 . 1.1 1 0&lt;/P&gt;&lt;P&gt;3 0 0 1.01 2 1&lt;/P&gt;&lt;P&gt;3 1 0 1.01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 3 . 1.1 1 2&lt;/P&gt;&lt;P&gt;8 4 . 1.1 1 2&lt;/P&gt;&lt;P&gt;;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I code I have the regression results list, but I would like to know how to change the reference category for each independent variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My coding:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=have;&lt;/P&gt;&lt;P&gt;class independent_v1 independent_v2;&lt;/P&gt;&lt;P&gt;id id;&lt;/P&gt;&lt;P&gt;model time1*event1(0) =&amp;nbsp;independent_v1 independent_v2;&lt;/P&gt;&lt;P&gt;weight weight;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So SAS automatically chooses to omit one level as the reference category for each independent variable. For example, How I could change that so I choose the reference category 1 for "independent_v1" and 3 for "independent_v2", ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:37:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506089#M1258</guid>
      <dc:creator>MFraga</dc:creator>
      <dc:date>2018-10-19T18:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc phreg hazard ration levels list for categorical variables and choose reference category</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506109#M1259</link>
      <description>&lt;P&gt;You can add a REF= option to each class variable and specify either the level or Ref=First (for the lowest value)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so&lt;/P&gt;
&lt;P&gt;class independent_v1 (ref='category 1')&amp;nbsp;independent_v2 (ref='category 3');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't mention which value might be category 1 or 3. the value would the formatted value for the variable concerned and value of interest.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506109#M1259</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-19T18:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc phreg hazard ration levels list for categorical variables and choose reference category</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506118#M1260</link>
      <description>&lt;P&gt;It works! Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 18:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-phreg-hazard-ration-levels-list-for-categorical-variables/m-p/506118#M1260</guid>
      <dc:creator>MFraga</dc:creator>
      <dc:date>2018-10-19T18:50:19Z</dc:date>
    </item>
  </channel>
</rss>

