<?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 creating a variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511077#M73040</link>
    <description>&lt;P&gt;Dear users,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a overall total physical activity variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;*TOTAL LEVEL OF PHYSICAL ACTIVITY (MET_hrs/WEEK);&lt;BR /&gt;TOTAL_PAHRS= MET_MODRECHRS + MET_VIGRECHRS + MET_MODWORKHRS + MET_VIGWORKHRS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with this is that is only taking those individuals who have values in each one of these variables and creating one. Which is increasing missing values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is how do I create a variable that includes individuals who do all of these type of physical activity or do only one, or&amp;nbsp; a combination.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main goal is to create a&amp;nbsp;final variable that assigns each individuals with a total physical activity MET score.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2018 16:32:13 GMT</pubDate>
    <dc:creator>epi101</dc:creator>
    <dc:date>2018-11-07T16:32:13Z</dc:date>
    <item>
      <title>creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511077#M73040</link>
      <description>&lt;P&gt;Dear users,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a overall total physical activity variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;*TOTAL LEVEL OF PHYSICAL ACTIVITY (MET_hrs/WEEK);&lt;BR /&gt;TOTAL_PAHRS= MET_MODRECHRS + MET_VIGRECHRS + MET_MODWORKHRS + MET_VIGWORKHRS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem with this is that is only taking those individuals who have values in each one of these variables and creating one. Which is increasing missing values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is how do I create a variable that includes individuals who do all of these type of physical activity or do only one, or&amp;nbsp; a combination.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main goal is to create a&amp;nbsp;final variable that assigns each individuals with a total physical activity MET score.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:32:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511077#M73040</guid>
      <dc:creator>epi101</dc:creator>
      <dc:date>2018-11-07T16:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511078#M73041</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TOTAL_PAHRS= sum(MET_MODRECHRS, MET_VIGRECHRS, MET_MODWORKHRS, MET_VIGWORKHRS);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511078#M73041</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-07T16:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511081#M73042</link>
      <description>&lt;P&gt;why not take advantage of var lists?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;TOTAL_PAHRS&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;sum&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(of &lt;/SPAN&gt;MET_:&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511081#M73042</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-07T16:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511083#M73043</link>
      <description>&lt;P&gt;If I could be 100% sure that there are no other variables that begin with MET_ in this data set, that's a good answer. But since I am not 100% sure (in fact, I have no idea what is in this data set), then I would not advise using MET_:&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511083#M73043</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-07T16:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511089#M73044</link>
      <description>&lt;P&gt;Oh well, I didn't think of that. Well that's what makes your analytical reasoning smarts distinct and superior&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 16:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511089#M73044</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-07T16:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511120#M73046</link>
      <description>&lt;P&gt;It works!! Thank you!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 18:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-variable/m-p/511120#M73046</guid>
      <dc:creator>epi101</dc:creator>
      <dc:date>2018-11-07T18:50:51Z</dc:date>
    </item>
  </channel>
</rss>

