<?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: Continues variable into tertiles in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447517#M69529</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data = recode5 groups = 3;
var mvpa;
ranks mvpa_tert;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think you have a semicolon too early.&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/160313"&gt;@epi101&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a total leisure time physical activity (MVPA) as a continues variable. I am trying to create a new MVPA variable that is in tertiles.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So far this is what I have done&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc rank data = recode5;&lt;BR /&gt;ranks groups = 3;&lt;BR /&gt;var mvpa;&lt;BR /&gt;ranks mvpa_tert;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this code is not working....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help and guidance is greatly appreciated!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 17:56:18 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-03-21T17:56:18Z</dc:date>
    <item>
      <title>Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447513#M69528</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a total leisure time physical activity (MVPA) as a continues variable. I am trying to create a new MVPA variable that is in tertiles.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So far this is what I have done&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc rank data = recode5;&lt;BR /&gt;ranks groups = 3;&lt;BR /&gt;var mvpa;&lt;BR /&gt;ranks mvpa_tert;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this code is not working....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help and guidance is greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447513#M69528</guid>
      <dc:creator>epi101</dc:creator>
      <dc:date>2018-03-21T17:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447517#M69529</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc rank data = recode5 groups = 3;
var mvpa;
ranks mvpa_tert;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think you have a semicolon too early.&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/160313"&gt;@epi101&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a total leisure time physical activity (MVPA) as a continues variable. I am trying to create a new MVPA variable that is in tertiles.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So far this is what I have done&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc rank data = recode5;&lt;BR /&gt;ranks groups = 3;&lt;BR /&gt;var mvpa;&lt;BR /&gt;ranks mvpa_tert;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this code is not working....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help and guidance is greatly appreciated!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447517#M69529</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-21T17:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447518#M69530</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc rank data = recode5;
ranks &lt;STRONG&gt;&lt;FONT color="#ff0000" size="4"&gt;groups = 3&lt;/FONT&gt;&lt;/STRONG&gt;;
var mvpa;
ranks mvpa_tert;
run;

 
&lt;/PRE&gt;
&lt;P&gt;Groups is an option that goes on the Proc Rank statement, not as you have it her&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;proc rank data = recode5
    groups = 3
;
   var mvpa;
   ranks mvpa_tert;
run;

 
&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Mar 2018 17:59:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447518#M69530</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-21T17:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447527#M69531</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the advice. The code seems to run. The&amp;nbsp; log is not producing any errors. However when I tried to run cross tabulations is saying that&amp;nbsp; mvpa_tert (my new categorical variable) not found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447527#M69531</guid>
      <dc:creator>epi101</dc:creator>
      <dc:date>2018-03-21T18:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447528#M69532</link>
      <description>&lt;P&gt;You likely didn't run it on the new file created. SAS will automatically supply a name for the file if you don't.&lt;/P&gt;
&lt;P&gt;Try:&lt;/P&gt;
&lt;PRE&gt;proc rank data = recode5 out=want groups = 3;
  var mvpa;
  ranks mvpa_tert;
run;
&lt;/PRE&gt;
&lt;P&gt;and then do your analyst on file want&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:39:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447528#M69532</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-03-21T18:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447529#M69533</link>
      <description>&lt;P&gt;You didn't specify an output data set in the PROC RANKS statement so the data created is probably called DATA1 or something.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check your log.&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/160313"&gt;@epi101&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the advice. The code seems to run. The&amp;nbsp; log is not producing any errors. However when I tried to run cross tabulations is saying that&amp;nbsp; mvpa_tert (my new categorical variable) not found.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447529#M69533</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-21T18:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Continues variable into tertiles</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447532#M69535</link>
      <description>&lt;P&gt;It worked!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you s much!!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Continues-variable-into-tertiles/m-p/447532#M69535</guid>
      <dc:creator>epi101</dc:creator>
      <dc:date>2018-03-21T18:50:17Z</dc:date>
    </item>
  </channel>
</rss>

