<?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 How to ask SAS calculate P trend in a multivariable Cox regression model in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-ask-SAS-calculate-P-trend-in-a-multivariable-Cox/m-p/922301#M363190</link>
    <description>&lt;DIV class="sasSource"&gt;Hi guys, I would like to calculate p trends for my main exposures: cig, pipe and nass. They were originally numeric variables. I tried to use the numeric version in the Cox model but the result is either blank or "0". Then I tried to categorize these exposures into 4 levels, and I used the code below to calculate the trend, but SAS gave me this feedback. The instruction I used said there is a "ptrend" option in the Phreg function but when I entered it didn't turn blue as a valid option. Did anyone know how to fix the problem or how to calculate the p trend in the multivariable Cox model? Thank you.&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 73         proc phreg data=liverfp;
 74         class cigd(ref='0') nassd(ref='0') piped(ref='0') everopi(ref='0')
 75                Aspirin(ref='2') HCVAb(ref='0')
 76          HBSAg(ref='0')  DLiver(ref='2') Diab(ref='2') ALC(ref='2')
 77           / param=ref;
 78         model length*caseco(0,2)= cigd piped nassd everopi HBSAg HCVAb
 79               DLiver Aspirin Diab Alc
 80              / risklimits ties=efron ptrend;
                                         ______
                                         22
                                         202
 ERROR 22-322: Syntax error, expecting one of the following: ;, ABSFCONV, ALPHA, BEST, CORRB, COVB, DETAILS, ENTRYTIME, FAILCODE, 
               FCONV, FIRTH, GCONV, HIERARCHY, INCLUDE, INITIAL, ITPRINT, MAXITER, MAXSTEP, NODESIGNPRINT, NODP, NODUMMY, 
               NODUMMYPRINT, NOFIT, OFFSET, PLCONV, RIDGING, RISKLIMITS, ROCLABEL, SELECTION, SEQUENTIAL, SINGULAR, SLENTRY, SLSTAY, 
               START, STOP, STOPRES, TIES, TYPE3, XCONV.  
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 81         strata age1 gender ethnicity;
 82         run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2024 20:00:57 GMT</pubDate>
    <dc:creator>LarissaW</dc:creator>
    <dc:date>2024-03-29T20:00:57Z</dc:date>
    <item>
      <title>How to ask SAS calculate P trend in a multivariable Cox regression model</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-ask-SAS-calculate-P-trend-in-a-multivariable-Cox/m-p/922301#M363190</link>
      <description>&lt;DIV class="sasSource"&gt;Hi guys, I would like to calculate p trends for my main exposures: cig, pipe and nass. They were originally numeric variables. I tried to use the numeric version in the Cox model but the result is either blank or "0". Then I tried to categorize these exposures into 4 levels, and I used the code below to calculate the trend, but SAS gave me this feedback. The instruction I used said there is a "ptrend" option in the Phreg function but when I entered it didn't turn blue as a valid option. Did anyone know how to fix the problem or how to calculate the p trend in the multivariable Cox model? Thank you.&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 73         proc phreg data=liverfp;
 74         class cigd(ref='0') nassd(ref='0') piped(ref='0') everopi(ref='0')
 75                Aspirin(ref='2') HCVAb(ref='0')
 76          HBSAg(ref='0')  DLiver(ref='2') Diab(ref='2') ALC(ref='2')
 77           / param=ref;
 78         model length*caseco(0,2)= cigd piped nassd everopi HBSAg HCVAb
 79               DLiver Aspirin Diab Alc
 80              / risklimits ties=efron ptrend;
                                         ______
                                         22
                                         202
 ERROR 22-322: Syntax error, expecting one of the following: ;, ABSFCONV, ALPHA, BEST, CORRB, COVB, DETAILS, ENTRYTIME, FAILCODE, 
               FCONV, FIRTH, GCONV, HIERARCHY, INCLUDE, INITIAL, ITPRINT, MAXITER, MAXSTEP, NODESIGNPRINT, NODP, NODUMMY, 
               NODUMMYPRINT, NOFIT, OFFSET, PLCONV, RIDGING, RISKLIMITS, ROCLABEL, SELECTION, SEQUENTIAL, SINGULAR, SLENTRY, SLSTAY, 
               START, STOP, STOPRES, TIES, TYPE3, XCONV.  
 ERROR 202-322: The option or parameter is not recognized and will be ignored.
 81         strata age1 gender ethnicity;
 82         run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 20:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-ask-SAS-calculate-P-trend-in-a-multivariable-Cox/m-p/922301#M363190</guid>
      <dc:creator>LarissaW</dc:creator>
      <dc:date>2024-03-29T20:00:57Z</dc:date>
    </item>
  </channel>
</rss>

