<?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: Turning a continuous variable into a discrete variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/278194#M54039</link>
    <description>&lt;P&gt;if "Pilot A", etc, is a string, it needs quotation marks. There might be a message in the log about an undefined variable.&lt;/P&gt;</description>
    <pubDate>Sun, 12 Jul 2020 02:53:34 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2020-07-12T02:53:34Z</dc:date>
    <item>
      <title>Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59865#M32740</link>
      <description>&lt;P&gt;Hi all - was wondering if someone could give me a few pointers on a problem I'm struggling with. I would like to create a dummy variable using a range of values based on a continuous variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to take a set of values and place them in nominal "buckets" if you will.&lt;/P&gt;&lt;P&gt;For example the data is&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;45&lt;/P&gt;&lt;P&gt;11&lt;/P&gt;&lt;P&gt;13&lt;/P&gt;&lt;P&gt;I want take those values and id when range they fall into. So 1- 12, 13-20, etc. Any ideas??&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 17:06:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59865#M32740</guid>
      <dc:creator>dannyfinn11</dc:creator>
      <dc:date>2018-06-10T17:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59866#M32741</link>
      <description>&lt;P&gt;select the column you are interested in, and then go to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Cols==&amp;gt;Recode&lt;/P&gt;
&lt;P&gt;and create a new column that has the values binned into new groups&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 19:53:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59866#M32741</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-10T19:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59867#M32742</link>
      <description>&lt;P&gt;done. But what about large datasets? The one I was working on was only 450 rows. If I have a dataset with 29K rows, can I use a formula to go through and recode everything?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 20:19:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59867#M32742</guid>
      <dc:creator>dannyfinn11</dc:creator>
      <dc:date>2018-06-10T20:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59870#M32744</link>
      <description>&lt;P&gt;1. Yes you can use a formula.&amp;nbsp; Here is one version that you could use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	min = Col Min( :height );
	incr = (Col Max( :height ) - Col Min( :height )) / 9;
);
Floor( (:height - min) / incr ) + 1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It uses the Big Class sample data table.&amp;nbsp; Just change the variable :Height out for the column you are calculating against.&lt;/P&gt;
&lt;P&gt;2. But the number of rows does not affect the Recode.&amp;nbsp; Only the number of unique values within those rows.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 00:04:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59870#M32744</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-11T00:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59916#M32764</link>
      <description>&lt;P&gt;I think that Jim already&amp;nbsp;answered your question, but I wanted to expand a bit on the answer. The &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;If()&lt;/FONT&gt; &lt;/STRONG&gt;function in a formula or script is very versatile. Here is an example of what you want to do (bin data)&amp;nbsp;from our &lt;A href="https://support.sas.com/edu/schedules.html?ctry=us&amp;amp;crs=JSCR" target="_self"&gt;JMP Software: Introduction to the JMP Scripting Language&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 845px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11057iC2971301424D1E63/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It compares the numeric value in Age with the cutoffs and returns a character string in the new column, Stage.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 13:41:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59916#M32764</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-06-11T13:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59917#M32765</link>
      <description>&lt;P&gt;I forgot to mention that if you are not otherwise scripting, you can interactively create a new data column with the bins: select the data column with the continuous values and then select &lt;STRONG&gt;Cols&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Utilities&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Make Binning Formula&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 13:44:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59917#M32765</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-06-11T13:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59921#M32769</link>
      <description>&lt;P&gt;YES!! This is what I needed :)&lt;/img&gt; Thank you!!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 13:52:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59921#M32769</guid>
      <dc:creator>dannyfinn11</dc:creator>
      <dc:date>2018-06-11T13:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59929#M32773</link>
      <description>&lt;P&gt;You may find the &lt;A href="https://community.jmp.com/t5/JMP-Add-Ins/Interactive-Binning-V2/ta-p/22495" target="_blank"&gt;Interactive Binning add-in&lt;/A&gt; useful.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 14:13:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/59929#M32773</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2018-06-11T14:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/278191#M54037</link>
      <description>&lt;P&gt;I tried to follow this example using a column formula.&amp;nbsp; I get no error but the column is blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JSpear_0-1594513738165.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/25265iC5CAACA0ADB8F3C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JSpear_0-1594513738165.png" alt="JSpear_0-1594513738165.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 00:29:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/278191#M54037</guid>
      <dc:creator>JSpear</dc:creator>
      <dc:date>2020-07-12T00:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Turning a continuous variable into a discrete variable</title>
      <link>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/278194#M54039</link>
      <description>&lt;P&gt;if "Pilot A", etc, is a string, it needs quotation marks. There might be a message in the log about an undefined variable.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 02:53:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Turning-a-continuous-variable-into-a-discrete-variable/m-p/278194#M54039</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-07-12T02:53:34Z</dc:date>
    </item>
  </channel>
</rss>

