<?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 Background subtraction based on variables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47270#M26949</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi Everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="gmail_signature"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am new to JMP and I need some help on selecting the specific rows from a column and subtract rest of the column based on the variable. Herewith, I have attached a data in which you can see&amp;nbsp; Target, Replicates, Cell, Data order and Data. Basically, I wanted to subtract the background data from rest of the data with cell and data order specific. For instance, let's consider D in Target column is the background, I wanted the JMP to calculate the mean of D in every Cell and Data Order and subtract the rest of the data from the respective Cell and Data Order automatically.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please let me know if you need more information! Thank you for helping me :)&lt;/img&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Nov 2017 16:22:29 GMT</pubDate>
    <dc:creator>Subbu</dc:creator>
    <dc:date>2017-11-15T16:22:29Z</dc:date>
    <item>
      <title>Background subtraction based on variables</title>
      <link>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47270#M26949</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Everyone,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="gmail_signature"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am new to JMP and I need some help on selecting the specific rows from a column and subtract rest of the column based on the variable. Herewith, I have attached a data in which you can see&amp;nbsp; Target, Replicates, Cell, Data order and Data. Basically, I wanted to subtract the background data from rest of the data with cell and data order specific. For instance, let's consider D in Target column is the background, I wanted the JMP to calculate the mean of D in every Cell and Data Order and subtract the rest of the data from the respective Cell and Data Order automatically.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please let me know if you need more information! Thank you for helping me :)&lt;/img&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Nov 2017 16:22:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47270#M26949</guid>
      <dc:creator>Subbu</dc:creator>
      <dc:date>2017-11-15T16:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Background subtraction based on variables</title>
      <link>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47272#M26951</link>
      <description>&lt;P&gt;Hi, Subbu!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;More information will be helpful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, do you need 25 (mean of Target D in Cell/DataOrder 1) subtracted from all the Cell/DataOrder 1's, and 22 (&lt;SPAN&gt;mean of Target D in Cell/DataOrder&amp;nbsp;2) subtracted from all the Cell/DataOrder 2's?&amp;nbsp; Or something else?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are Cell and DataOrder always identical?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any specific reason why there are 7680 rows (with 7664 missing) in this datatable?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 16:48:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47272#M26951</guid>
      <dc:creator>Kevin_Anderson</dc:creator>
      <dc:date>2017-11-15T16:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Background subtraction based on variables</title>
      <link>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47276#M26954</link>
      <description>&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;Thank you for the reply! Yes, you are right in the subtraction part! However, the Cell and Data order order are not identical. The Cell ranges from 1-4 and Data Order ranges from 0-14 or more. I apologize for the file! I did delete those information and put some random numbers for demonstration!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 17:15:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47276#M26954</guid>
      <dc:creator>Subbu</dc:creator>
      <dc:date>2017-11-15T17:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Background subtraction based on variables</title>
      <link>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47302#M26971</link>
      <description>&lt;P&gt;For cases like this I often use&amp;nbsp;&lt;EM&gt;Summary&lt;/EM&gt;&amp;nbsp;followed by&amp;nbsp;&lt;EM&gt;Update&lt;/EM&gt; (&lt;EM&gt;Tables&lt;/EM&gt; menu).&lt;/P&gt;
&lt;P&gt;Make&amp;nbsp;a Summary table with mean of Data (grouped by Target, Cell &amp;amp; Data Order), delete rows except&amp;nbsp;for Target = D, and updade the original with the summary table (match by columns Cell and Data Order).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need a dynamic solution it is possible with a Column Formula, however they can get quite complex. This formula should work for your example table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:Data - If(:Target == "D",
    Col Mean(:Data, :DataOrder, :Target == "D"),
    (Col Sum(:Data, :Cell, :DataOrder) - Col Sum(:Data, :Cell, :DataOrder, :Target == "D")) / (
    Col Number(:Data, :Cell, :DataOrder) - Col Number(:Data, :Cell, :DataOrder, :Target == "D"))
);&lt;/CODE&gt;&lt;/PRE&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;</description>
      <pubDate>Thu, 16 Nov 2017 00:37:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47302#M26971</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2017-11-16T00:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Background subtraction based on variables</title>
      <link>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47387#M27027</link>
      <description>&lt;P&gt;Hi MS,&lt;/P&gt;&lt;P&gt;Thank you for the help! The column formula works great for the most part. However, in a large dataset I see the mean of Target D doesn't&amp;nbsp;subtract the Target D. Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;</description>
      <pubDate>Sun, 19 Nov 2017 18:48:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Background-subtraction-based-on-variables/m-p/47387#M27027</guid>
      <dc:creator>Subbu</dc:creator>
      <dc:date>2017-11-19T18:48:25Z</dc:date>
    </item>
  </channel>
</rss>

