<?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: Variable SEX in WORK.COVS does not have the same format as in the input data in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717891#M34703</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/368538"&gt;@rachelm22&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does variable &lt;FONT face="courier new,courier"&gt;SEX&lt;/FONT&gt; in dataset &lt;FONT face="courier new,courier"&gt;work.sasp&lt;/FONT&gt; have values 1 for males and 2 for females (as in dataset &lt;FONT face="courier new,courier"&gt;covs&lt;/FONT&gt;)? If so, it should be sufficient to copy the FORMAT statement from your DATA step into the PROC PHREG step:&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#808080"&gt;proc phreg data = WORK.sasp plots(overlay=group)=(survival);&lt;/FONT&gt;
&lt;STRONG&gt;format SEX SEX.;&lt;/STRONG&gt;
&lt;FONT color="#808080"&gt;class SEX;
...&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;Also, you may want to specify an output dataset name (with the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax03.htm&amp;amp;locale=en#statug.phreg.phrbasout" target="_blank" rel="noopener"&gt;OUT= option&lt;/A&gt;) in the&amp;nbsp;BASELINE statement so that SAS&amp;nbsp;doesn't create datasets with default names using the DATA&lt;EM&gt;n&lt;/EM&gt; convention.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 13:03:48 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2021-02-09T13:03:48Z</dc:date>
    <item>
      <title>Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717860#M34695</link>
      <description>&lt;P&gt;I am having an issue with formatting/ proc phreg, i'll attach my code below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="support 1.PNG" style="width: 310px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54495iB22787B7BCFECF93/image-dimensions/310x45?v=v2" width="310" height="45" role="button" title="support 1.PNG" alt="support 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="support 2.PNG" style="width: 267px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54496i7260BB5B47EEFD78/image-size/large?v=v2&amp;amp;px=999" role="button" title="support 2.PNG" alt="support 2.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="support 3.PNG" style="width: 516px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54497iFEE16C08AAAD6147/image-size/large?v=v2&amp;amp;px=999" role="button" title="support 3.PNG" alt="support 3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, doing this gives me this error code:&lt;/P&gt;&lt;P&gt;ERROR: Variable SEX in WORK.COVS does not have the same format as in the input data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help me spot my mistake, I am completely lost, thankyou&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717860#M34695</guid>
      <dc:creator>rachelm22</dc:creator>
      <dc:date>2021-02-09T11:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717864#M34696</link>
      <description>&lt;P&gt;Can you please show us the LOG so we can see the code and the error in the sequence shown in the log. Seeing errors detached from the code is not really that helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please copy the log as text, not as a screen capture, and paste it into your reply by clicking on the &amp;lt;/&amp;gt; icon and pasting it into the window that appears. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:51:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717864#M34696</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-09T11:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717866#M34697</link>
      <description>&lt;P&gt;Please post code by copy/pasting to a "code box". A code box is opened with the "little running man" button right next to the one marked in the picture:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg"&gt;&lt;img src="https://communities.sas.com/skins/images/2FD96521DCF95C42FE57BF2A7CB72678/responsive_peak/images/image_not_found.png" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717866#M34697</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-09T11:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717868#M34699</link>
      <description>&lt;PRE&gt;289  proc phreg data = WORK.sasp plots(overlay=group)=(survival);
290  class SEX;
291  model TIMEE*CENSE(0)=SEX|AGE BMI|BMI KCAL;
292  baseline covariates=covs  / rowid=BMI group=SEX;
293  run;

ERROR: Variable SEX in WORK.COVS does not have the same format as in the input data.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DATA8 may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
NOTE: PROCEDURE PHREG used (Total process time):
      real time           0.03 seconds
      cpu time            0.06 seconds&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717868#M34699</guid>
      <dc:creator>rachelm22</dc:creator>
      <dc:date>2021-02-09T11:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717870#M34700</link>
      <description>&lt;PRE&gt;proc format;
value SEX 1 = "male" 2 = "female";
run;
data covs;
format SEX SEX.;
input SEX BMI AGE KCAL;
datalines;
1 25 49.5 1981.95
1 30 49.5 1981.95
1 40 49.5 1981.95
2 25 49.5 1981.95
2 30 49.5 1981.95
2 40 49.5 1981.95
;
run;
PROC PRINT DATA= covs;
run;
Proc contents data=covs;
run;
proc phreg data = WORK.sasp plots(overlay=group)=(survival);
class SEX;
model TIMEE*CENSE(0)=SEX|AGE BMI|BMI KCAL;
baseline covariates=covs  / rowid=BMI group=SEX;
run;&lt;/PRE&gt;&lt;P&gt;above is my code&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 12:04:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717870#M34700</guid>
      <dc:creator>rachelm22</dc:creator>
      <dc:date>2021-02-09T12:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717881#M34701</link>
      <description>&lt;P&gt;Please supply an example for dataset SASP, similar to what you did for COVS.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 12:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717881#M34701</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-09T12:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Variable SEX in WORK.COVS does not have the same format as in the input data</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717891#M34703</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/368538"&gt;@rachelm22&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does variable &lt;FONT face="courier new,courier"&gt;SEX&lt;/FONT&gt; in dataset &lt;FONT face="courier new,courier"&gt;work.sasp&lt;/FONT&gt; have values 1 for males and 2 for females (as in dataset &lt;FONT face="courier new,courier"&gt;covs&lt;/FONT&gt;)? If so, it should be sufficient to copy the FORMAT statement from your DATA step into the PROC PHREG step:&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#808080"&gt;proc phreg data = WORK.sasp plots(overlay=group)=(survival);&lt;/FONT&gt;
&lt;STRONG&gt;format SEX SEX.;&lt;/STRONG&gt;
&lt;FONT color="#808080"&gt;class SEX;
...&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;Also, you may want to specify an output dataset name (with the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_phreg_syntax03.htm&amp;amp;locale=en#statug.phreg.phrbasout" target="_blank" rel="noopener"&gt;OUT= option&lt;/A&gt;) in the&amp;nbsp;BASELINE statement so that SAS&amp;nbsp;doesn't create datasets with default names using the DATA&lt;EM&gt;n&lt;/EM&gt; convention.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 13:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Variable-SEX-in-WORK-COVS-does-not-have-the-same-format-as-in/m-p/717891#M34703</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-02-09T13:03:48Z</dc:date>
    </item>
  </channel>
</rss>

