<?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 do I bring a format into a model statement? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214823#M11611</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community, &lt;/P&gt;&lt;P&gt;I would like to know how I could bring in the following formats for the variable "ATTRACTL" into my model output, so that the labels indicated by the formats can be seen in the model output...&lt;/P&gt;&lt;P&gt;"bothstatusNew" is a four level variable, I'm attempting simple multinomial regression with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is it easiest to change the numeric level coding into character form coding using a data step and length statement for the predictor variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. Here I provide an example code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data psw.NewVar6;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set psw.NewVar5;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value ATTRACTL&lt;/P&gt;&lt;P&gt;0 = 'Only Male'&lt;/P&gt;&lt;P&gt;1='Male and Female'&lt;/P&gt;&lt;P&gt;2= 'Only Female'&lt;/P&gt;&lt;P&gt;3= 'None'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq Data=psw.NewVar6;&lt;/P&gt;&lt;P&gt;tables ATTRACTL;&lt;/P&gt;&lt;P&gt;format ATTRACTL ATTRACTL.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc logistic data = psw.NewVar6;&lt;/P&gt;&lt;P&gt;class ATTRACTL;&lt;/P&gt;&lt;P&gt;model bothstatusNEW = ATTRACTL;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2015 12:19:31 GMT</pubDate>
    <dc:creator>Macyhe22</dc:creator>
    <dc:date>2015-05-14T12:19:31Z</dc:date>
    <item>
      <title>How do I bring a format into a model statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214823#M11611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community, &lt;/P&gt;&lt;P&gt;I would like to know how I could bring in the following formats for the variable "ATTRACTL" into my model output, so that the labels indicated by the formats can be seen in the model output...&lt;/P&gt;&lt;P&gt;"bothstatusNew" is a four level variable, I'm attempting simple multinomial regression with this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is it easiest to change the numeric level coding into character form coding using a data step and length statement for the predictor variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. Here I provide an example code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data psw.NewVar6;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set psw.NewVar5;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value ATTRACTL&lt;/P&gt;&lt;P&gt;0 = 'Only Male'&lt;/P&gt;&lt;P&gt;1='Male and Female'&lt;/P&gt;&lt;P&gt;2= 'Only Female'&lt;/P&gt;&lt;P&gt;3= 'None'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq Data=psw.NewVar6;&lt;/P&gt;&lt;P&gt;tables ATTRACTL;&lt;/P&gt;&lt;P&gt;format ATTRACTL ATTRACTL.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc logistic data = psw.NewVar6;&lt;/P&gt;&lt;P&gt;class ATTRACTL;&lt;/P&gt;&lt;P&gt;model bothstatusNEW = ATTRACTL;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 12:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214823#M11611</guid>
      <dc:creator>Macyhe22</dc:creator>
      <dc:date>2015-05-14T12:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bring a format into a model statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214824#M11612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry forgot to add bothstatusNEW to the class statement in the model code. This is the correction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc logistic data = psw.NewVar6;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;class bothstatusNEW ATTRACTL;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;model bothstatusNEW = ATTRACTL;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 12:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214824#M11612</guid>
      <dc:creator>Macyhe22</dc:creator>
      <dc:date>2015-05-14T12:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bring a format into a model statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214825#M11613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add the same format statement to the proc logistic code.&lt;/P&gt;&lt;P&gt;Format is one of those statements that are available in almost every proc that displays or manipulates data without an explicit entry in the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A big advantage to the format approach is that if you want to see the results for a different grouping of values is to create a new format and apply that in the code instead of having to go back to a data step and add a new variable.&lt;/P&gt;&lt;P&gt;Such as:&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;value ATTRACTLALt&lt;/P&gt;&lt;P&gt;0,2 = 'Only Male or Only Female'&lt;/P&gt;&lt;P&gt;1='Male and Female'&lt;/P&gt;&lt;P&gt;3= 'None'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 14:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214825#M11613</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-05-14T14:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bring a format into a model statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214826#M11614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So do I place my format code within the model statement before the run command and after the model statement for example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 20:33:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214826#M11614</guid>
      <dc:creator>Macyhe22</dc:creator>
      <dc:date>2015-05-14T20:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I bring a format into a model statement?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214827#M11615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Scratch that, thank you Ballard I believe I understand what your are saying thank you for your response!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 20:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-bring-a-format-into-a-model-statement/m-p/214827#M11615</guid>
      <dc:creator>Macyhe22</dc:creator>
      <dc:date>2015-05-14T20:45:36Z</dc:date>
    </item>
  </channel>
</rss>

