<?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 Maximum value between 3 numerical variables per observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823453#M325134</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data try_data;
input V1 V2 V3;
datalines;
3 1 1 
2 3 2 
1 1 2 
0 2 3 
4 0 4 
0 0 0 
1 3 2 ;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have 3 numeric variables. I would like to create a new variable which retrieves each time, by observation, the greatest value between my 3 numerical variables.&lt;/P&gt;
&lt;P&gt;For example:&lt;BR /&gt;V1=3 V2=1 V3=1 then New_V=3&lt;BR /&gt;V1=2 V2=3 V3=2 then New_V=3&lt;BR /&gt;V1=1 V2=1 V3=2 then New_V=2&lt;BR /&gt;V1=0 V2=2 V3=3 then New_V=3&lt;BR /&gt;V1=4 V2=0 V3=4 then New_V=4&lt;BR /&gt;V1=0 V2=0 V3=0 then New_V=0&lt;BR /&gt;V1=1 V2=3 V2=2 then New_V=3&lt;/P&gt;
&lt;P&gt;Thank you in advance for your assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gick&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 04:25:28 GMT</pubDate>
    <dc:creator>Gick</dc:creator>
    <dc:date>2022-07-15T04:25:28Z</dc:date>
    <item>
      <title>Maximum value between 3 numerical variables per observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823453#M325134</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data try_data;
input V1 V2 V3;
datalines;
3 1 1 
2 3 2 
1 1 2 
0 2 3 
4 0 4 
0 0 0 
1 3 2 ;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have 3 numeric variables. I would like to create a new variable which retrieves each time, by observation, the greatest value between my 3 numerical variables.&lt;/P&gt;
&lt;P&gt;For example:&lt;BR /&gt;V1=3 V2=1 V3=1 then New_V=3&lt;BR /&gt;V1=2 V2=3 V3=2 then New_V=3&lt;BR /&gt;V1=1 V2=1 V3=2 then New_V=2&lt;BR /&gt;V1=0 V2=2 V3=3 then New_V=3&lt;BR /&gt;V1=4 V2=0 V3=4 then New_V=4&lt;BR /&gt;V1=0 V2=0 V3=0 then New_V=0&lt;BR /&gt;V1=1 V2=3 V2=2 then New_V=3&lt;/P&gt;
&lt;P&gt;Thank you in advance for your assistance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gick&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 04:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823453#M325134</guid>
      <dc:creator>Gick</dc:creator>
      <dc:date>2022-07-15T04:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum value between 3 numerical variables per observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823454#M325135</link>
      <description>&lt;P&gt;Use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.2/lefunctionsref/n00bjr4jof59pwn1bfzk9f5i0ujr.htm" target="_self"&gt;max&lt;/A&gt; function.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 04:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823454#M325135</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-07-15T04:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum value between 3 numerical variables per observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823508#M325160</link>
      <description>&lt;P&gt;First item, the semicolon that ends a datalines block must be on its own line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data try_data;
   input V1 V2 V3;
  new_v = max(v1,v2,v3);
datalines;
3 1 1 
2 3 2 
1 1 2 
0 2 3 
4 0 4 
0 0 0 
1 3 2
 ;
run;

&lt;/PRE&gt;
&lt;P&gt;There a many functions for statistics of variables in a single record in SAS: N, NMISS, MAX, MIN, MEAN, MEDIAN, IQR, STD and more.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 13:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Maximum-value-between-3-numerical-variables-per-observation/m-p/823508#M325160</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-07-15T13:51:14Z</dc:date>
    </item>
  </channel>
</rss>

