<?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: set reference group for categorical variable in proc lifereg in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/set-reference-group-for-categorical-variable-in-proc-lifereg/m-p/460320#M70303</link>
    <description>&lt;P&gt;If you read &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_lifereg_syntax04.htm&amp;amp;locale=en" target="_self"&gt;the PROC LIFEREG documentation&lt;/A&gt;, you will see that PROC LIFEREG does not support that syntax. The doc says that you can use PROC FORMAT to determine the reference level&amp;nbsp;in conjunction with the ORDER= option on the PROC LIFEREG statement. For examples and further discussion of how to set the reference level, see the last two examples in the Usage Note &lt;A href="http://support.sas.com/kb/37/108.html" target="_self"&gt;"&lt;I&gt;&lt;/I&gt;&lt;SPAN&gt;Setting the reference levels for the CLASS predictor variables.&lt;/SPAN&gt;"&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 06 May 2018 20:31:37 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-05-06T20:31:37Z</dc:date>
    <item>
      <title>set reference group for categorical variable in proc lifereg</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-reference-group-for-categorical-variable-in-proc-lifereg/m-p/460282#M70302</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I found myself lost in setting a baseline reference group for a categorical variable in my model of parametric survival analysis.&lt;/P&gt;&lt;P&gt;There are 6 categories in&amp;nbsp;&lt;SPAN&gt;priorarrests variable, coded in value 1 to 6. I want to use 2, the second group as my baseline.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is my code&lt;/P&gt;&lt;P&gt;proc lifereg data= roads.onlyrecordslessthan12 outest=weiboutest;&lt;BR /&gt;class race_group gender_group marital_group famprb0new priorarrests (ref="2");&lt;BR /&gt;model survivaltime*censor_1(1) =priorarrests impulsivetemperment school0 age&lt;BR /&gt;gender_group race_group famprb0new marital_group/distribution=lnormal;&lt;BR /&gt;title 'Weibull regression for the data';&lt;BR /&gt;output out=weibsurv xbeta=weib_xb;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;The log shows&lt;/P&gt;&lt;P&gt;10 proc lifereg data= roads.onlyrecordslessthan12 outest=weiboutest;&lt;BR /&gt;11 class race_group gender_group marital_group famprb0new priorarrests (ref="2");&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, -, /, :, _ALL_,&lt;BR /&gt;_CHARACTER_, _CHAR_, _NUMERIC_.&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;12 model survivaltime*censor_1(1) =priorarrests impulsivetemperment school0 age&lt;BR /&gt;13 gender_group race_group famprb0new marital_group/distribution=lnormal;&lt;BR /&gt;14 title 'Weibull regression for the data';&lt;BR /&gt;15 output out=weibsurv xbeta=weib_xb;&lt;BR /&gt;16 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using no quotation marks as this&lt;/P&gt;&lt;P&gt;priorarrests (ref=2);&lt;/P&gt;&lt;P&gt;But the log still gives error message.&lt;/P&gt;&lt;P&gt;17 proc lifereg data= roads.onlyrecordslessthan12 outest=weiboutest;&lt;BR /&gt;18 class race_group gender_group marital_group famprb0new priorarrests (ref=2);&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ;, -, /, :, _ALL_,&lt;BR /&gt;_CHARACTER_, _CHAR_, _NUMERIC_.&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;19 model survivaltime*censor_1(1) =priorarrests impulsivetemperment school0 age&lt;BR /&gt;20 gender_group race_group famprb0new marital_group/distribution=lnormal;&lt;BR /&gt;21 title 'Weibull regression for the data';&lt;BR /&gt;22 output out=weibsurv xbeta=weib_xb;&lt;BR /&gt;23 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone could help me?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 07:21:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-reference-group-for-categorical-variable-in-proc-lifereg/m-p/460282#M70302</guid>
      <dc:creator>Lindy</dc:creator>
      <dc:date>2018-05-06T07:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: set reference group for categorical variable in proc lifereg</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/set-reference-group-for-categorical-variable-in-proc-lifereg/m-p/460320#M70303</link>
      <description>&lt;P&gt;If you read &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_lifereg_syntax04.htm&amp;amp;locale=en" target="_self"&gt;the PROC LIFEREG documentation&lt;/A&gt;, you will see that PROC LIFEREG does not support that syntax. The doc says that you can use PROC FORMAT to determine the reference level&amp;nbsp;in conjunction with the ORDER= option on the PROC LIFEREG statement. For examples and further discussion of how to set the reference level, see the last two examples in the Usage Note &lt;A href="http://support.sas.com/kb/37/108.html" target="_self"&gt;"&lt;I&gt;&lt;/I&gt;&lt;SPAN&gt;Setting the reference levels for the CLASS predictor variables.&lt;/SPAN&gt;"&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 20:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/set-reference-group-for-categorical-variable-in-proc-lifereg/m-p/460320#M70303</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-05-06T20:31:37Z</dc:date>
    </item>
  </channel>
</rss>

