<?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 Code to use in model for highest value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465191#M118635</link>
    <description>&lt;P&gt;I'm creating a model where I want to use the highest level of education earned between the mother or the father (whichever one has the highest level of education).&amp;nbsp; The variable for mother and father education is measured continuously, with the higher numbers representing higher levels of education. However, I did create dummy variables also for different categories to combine some levels.&amp;nbsp; (Not that they have to stay combined, it was a preference at the time.) Does anyone know how to create a variable that would represent the highest level between the two?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 May 2018 18:51:30 GMT</pubDate>
    <dc:creator>DocStudent</dc:creator>
    <dc:date>2018-05-25T18:51:30Z</dc:date>
    <item>
      <title>Code to use in model for highest value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465191#M118635</link>
      <description>&lt;P&gt;I'm creating a model where I want to use the highest level of education earned between the mother or the father (whichever one has the highest level of education).&amp;nbsp; The variable for mother and father education is measured continuously, with the higher numbers representing higher levels of education. However, I did create dummy variables also for different categories to combine some levels.&amp;nbsp; (Not that they have to stay combined, it was a preference at the time.) Does anyone know how to create a variable that would represent the highest level between the two?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 18:51:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465191#M118635</guid>
      <dc:creator>DocStudent</dc:creator>
      <dc:date>2018-05-25T18:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Code to use in model for highest value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465196#M118638</link>
      <description>&lt;P&gt;Function &lt;STRONG&gt;max(x, y)&lt;/STRONG&gt; returns the maximun value between x and y.&lt;/P&gt;</description>
      <pubDate>Fri, 25 May 2018 19:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465196#M118638</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-05-25T19:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Code to use in model for highest value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465197#M118639</link>
      <description>&lt;P&gt;You should really post an example of the data you have and the data you want.&lt;/P&gt;&lt;P&gt;Regardless I have made a major assumption about the data you have&amp;nbsp; and the data you want and the below code should work for that data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID MotherEducation FatherEducation;
DATALINES;
1 0 1
2 1 2
3 2 2
4 2 1
5 2 0
;
run;

Data Want;
	SET have;
	MaxEd = Max(MotherEducation,FatherEducation);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 May 2018 19:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Code-to-use-in-model-for-highest-value/m-p/465197#M118639</guid>
      <dc:creator>DanielLangley</dc:creator>
      <dc:date>2018-05-25T19:14:51Z</dc:date>
    </item>
  </channel>
</rss>

