<?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: Compute new cm variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599725#M173178</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If comor_9htunit then do;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this statement true, or false, when&amp;nbsp;&lt;SPAN&gt;comor_9htunit=1?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Is this statement true, or false, when&amp;nbsp;&lt;SPAN&gt;comor_9htunit=2?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 06:50:25 GMT</pubDate>
    <dc:creator>ScottBass</dc:creator>
    <dc:date>2019-10-28T06:50:25Z</dc:date>
    <item>
      <title>Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452892#M114347</link>
      <description>&lt;P&gt;I cannot figure out where I am going wrong in the problem below. I know it's something I'm overlooking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*2 Given the programs here, add the necessary statements to compute the four new variables. */&lt;/P&gt;&lt;P&gt;*a /Weight in kilograms (1kg = 2.2 pounds). Name this variable WtKg/;&lt;/P&gt;&lt;P&gt;*b /Height in centimenters (1 inch = 2.54 cm). Name this variable HtCm. */ ;&lt;/P&gt;&lt;P&gt;*c /Average blood pressure (call it AveBP)equal to the diastolic blood pressure plus one-third difference of the systolic blood pressure minus the diastolic blood pressure. */;&lt;/P&gt;&lt;P&gt;*d /A variable (call it HtPolynomial) equal to 2 times the height squared plus 1.5 times the height cubed. */;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Prob2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;INPUT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ID $&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Height &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* in inches */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Weight &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* in pounds */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;SBP &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* systolic B P */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DBP &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* diastolic B P */&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Wtkg = Weight/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2.2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;HtCm = Height/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2.54&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;AveBP = DBP + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;SBP - DBP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;HtPolynomial = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; *Height**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; *Height**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATALINES&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;001 68 150 110 70&lt;/P&gt;&lt;P&gt;002 73 240 150 90&lt;/P&gt;&lt;P&gt;003 62 101 120 80&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;TITLE&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"Listing of Prob2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;PRINT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = Prob2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 16:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452892#M114347</guid>
      <dc:creator>tmjeffer</dc:creator>
      <dc:date>2018-04-10T16:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452898#M114348</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;AveBP = DBP +&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;SBP - DBP;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;That's probably not what you want, and it's where SAS generated the error.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;BR /&gt;Second, review how you're converting height. Would you expect height in cm to be lareger than height in inches? Your conversion is likely backwards.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/203943"&gt;@tmjeffer&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I cannot figure out where I am going wrong in the problem below. I know it's something I'm overlooking.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*2 Given the programs here, add the necessary statements to compute the four new variables. */&lt;/P&gt;
&lt;P&gt;*a /Weight in kilograms (1kg = 2.2 pounds). Name this variable WtKg/;&lt;/P&gt;
&lt;P&gt;*b /Height in centimenters (1 inch = 2.54 cm). Name this variable HtCm. */ ;&lt;/P&gt;
&lt;P&gt;*c /Average blood pressure (call it AveBP)equal to the diastolic blood pressure plus one-third difference of the systolic blood pressure minus the diastolic blood pressure. */;&lt;/P&gt;
&lt;P&gt;*d /A variable (call it HtPolynomial) equal to 2 times the height squared plus 1.5 times the height cubed. */;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Prob2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;INPUT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ID $&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Height &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008000"&gt;/* in inches */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Weight &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008000"&gt;/* in pounds */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;SBP &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008000"&gt;/* systolic B P */&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DBP &lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#008000"&gt;/* diastolic B P */&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Wtkg = Weight/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;2.2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;HtCm = Height/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;2.54&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;AveBP = DBP + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;SBP - DBP;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;HtPolynomial = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; *Height**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; *Height**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;DATALINES&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;001 68 150 110 70&lt;/P&gt;
&lt;P&gt;002 73 240 150 90&lt;/P&gt;
&lt;P&gt;003 62 101 120 80&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;TITLE&lt;/FONT&gt; &lt;FONT face="Courier New" size="2" color="#800080"&gt;"Listing of Prob2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;PRINT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="2" color="#0000ff"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = Prob2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 17:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452898#M114348</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-10T17:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452954#M114364</link>
      <description>I put parentheses around (SBP -DBP) First and couldn’t get it to read either.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Apr 2018 20:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452954#M114364</guid>
      <dc:creator>tmjeffer</dc:creator>
      <dc:date>2018-04-10T20:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452967#M114372</link>
      <description>&lt;P&gt;Post your new code and log, and remember order of operations so make sure you have parenthesis where you need them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/203943"&gt;@tmjeffer&lt;/a&gt; wrote:&lt;BR /&gt;I put parentheses around (SBP -DBP) First and couldn’t get it to read either.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 21:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/452967#M114372</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-10T21:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/453189#M114489</link>
      <description>&lt;TABLE border="0" cellspacing="1" cellpadding="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Listing of Prob2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;Obs ID Height Weight SBP DBP Wtkg HtCm AveBP HtPolynomial123 &lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;001&lt;/TD&gt;&lt;TD&gt;68&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;68.182&lt;/TD&gt;&lt;TD&gt;172.72&lt;/TD&gt;&lt;TD&gt;83.333&lt;/TD&gt;&lt;TD&gt;480896.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;002&lt;/TD&gt;&lt;TD&gt;73&lt;/TD&gt;&lt;TD&gt;240&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;109.091&lt;/TD&gt;&lt;TD&gt;185.42&lt;/TD&gt;&lt;TD&gt;110.000&lt;/TD&gt;&lt;TD&gt;594183.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;003&lt;/TD&gt;&lt;TD&gt;62&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;45.909&lt;/TD&gt;&lt;TD&gt;157.48&lt;/TD&gt;&lt;TD&gt;93.333&lt;/TD&gt;&lt;TD&gt;365180.0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*2 Given the programs here, add the necessary statements to compute the four new variables. */&lt;/P&gt;&lt;P&gt;*a /Weight in kilograms (1kg = 2.2 pounds). Name this variable WtKg/;&lt;/P&gt;&lt;P&gt;*b /Height in centimenters (1 inch = 2.54 cm). Name this variable HtCm. */ ;&lt;/P&gt;&lt;P&gt;*c /Average blood pressure (call it AveBP)equal to the diastolic blood pressure plus one-third difference of the systolic blood pressure minus the diastolic blood pressure. */;&lt;/P&gt;&lt;P&gt;*d /A variable (call it HtPolynomial) equal to 2 times the height squared plus 1.5 times the height cubed. */;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Prob2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;INPUT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ID $&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Height &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* in inches */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Weight &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* in pounds */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;SBP &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* systolic B P */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DBP &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* diastolic B P */&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Wtkg = Weight/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2.2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;HtCm = Height*&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2.54&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;AveBP = DBP + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; *(SBP - DBP);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;HtPolynomial = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; * (Height)**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; * (Height)**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATALINES&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;001 68 150 110 70&lt;/P&gt;&lt;P&gt;002 73 240 150 90&lt;/P&gt;&lt;P&gt;003 62 101 120 80&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;TITLE&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"Listing of Prob2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;PRINT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DATA&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = Prob2;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 13:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/453189#M114489</guid>
      <dc:creator>tmjeffer</dc:creator>
      <dc:date>2018-04-11T13:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/453275#M114524</link>
      <description>I'm assuming this works now?</description>
      <pubDate>Wed, 11 Apr 2018 16:00:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/453275#M114524</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-11T16:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/453287#M114530</link>
      <description>Yes it does. Thanks for all your help!&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Apr 2018 16:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/453287#M114530</guid>
      <dc:creator>tmjeffer</dc:creator>
      <dc:date>2018-04-11T16:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Compute new cm variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599590#M173100</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to convert inches to cm in some of my data, it is a mixed bag of inches and cms.&amp;nbsp;&lt;/P&gt;&lt;P&gt;my variables&lt;/P&gt;&lt;P&gt;comor_9hgtunit_decode = says whether it is in inches or cm&lt;/P&gt;&lt;P&gt;comor_9hgtunit&amp;nbsp; gives 1 for cm and 2 for inches&lt;/P&gt;&lt;P&gt;comor_9hgt&amp;nbsp; = measurements in inches or cms&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how I approached it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data demo2;&lt;BR /&gt;set mergedata;&lt;BR /&gt;If comor_9htunit then do;&lt;BR /&gt;height_cm = comor_9ht/2.54;&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;height_cm =comor_9ht;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the error code&amp;nbsp;WARNING: The data set WORK.DEMO2 may be incomplete. When this&lt;BR /&gt;step was stopped there were 0 observations and 3&lt;BR /&gt;variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2019 00:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599590#M173100</guid>
      <dc:creator>heatherjae15</dc:creator>
      <dc:date>2019-10-27T00:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Compute new cm variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599725#M173178</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;If comor_9htunit then do;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this statement true, or false, when&amp;nbsp;&lt;SPAN&gt;comor_9htunit=1?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Is this statement true, or false, when&amp;nbsp;&lt;SPAN&gt;comor_9htunit=2?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 06:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599725#M173178</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2019-10-28T06:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Compute new cm variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599868#M173253</link>
      <description>I posted a fairly detailed explanation of the issue in one of your other posts. Please DO NOT ask the same question in multiple places and this thread is a year + old. &lt;BR /&gt;&lt;BR /&gt;Go check your other questions and posts and you'll find the correct answer and explanation. &lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Create-new-variable-based-on-values-rules-in-other-columns/m-p/599594#M173103" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Create-new-variable-based-on-values-rules-in-other-columns/m-p/599594#M173103&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599868#M173253</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-28T17:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compute 4 new variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599873#M173257</link>
      <description>Thank you</description>
      <pubDate>Mon, 28 Oct 2019 17:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Compute-4-new-variables/m-p/599873#M173257</guid>
      <dc:creator>heatherjae15</dc:creator>
      <dc:date>2019-10-28T17:19:40Z</dc:date>
    </item>
  </channel>
</rss>

