<?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 Finding a correlation coefficient and putting it into a table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47515#M27093</link>
    <description>&lt;DIV&gt;I have created 2 files to demonstrate my problem.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In "Test 1" I have data from 4 people (i.e., AAAA, BBBB, CCCC, DDDD). Each person has 8 responses to an "estimate" question and 8 responses to a "truth" question. Half the responses are from Domain "0" and the other half from Domain "1".&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would like to find the correlation of between the estimate and truth question for each person in each domain. I know that I can do that by going to Analyze / Multivariate Methods / Multivariate and putting the estimate and truth questions in the "Y, Columns" box, and both "ID" and "Domain" in the "By" box.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The problem is that I want the output of this analysis to be in another JMP table so that I can do further analyses on the correlations. For example, I want to know what the average persons' correlation is between estimate and truth in each of the domains. In order to do this, I need a file that looks like the data in the "Test 2" file.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you please tell me an automatic way to produce the "Test 2" data from the Test 1 data? I cannot do this manually because the actual dataset that I am working with is huge.&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Wed, 22 Nov 2017 08:25:37 GMT</pubDate>
    <dc:creator>ac111ca</dc:creator>
    <dc:date>2017-11-22T08:25:37Z</dc:date>
    <item>
      <title>Finding a correlation coefficient and putting it into a table</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47515#M27093</link>
      <description>&lt;DIV&gt;I have created 2 files to demonstrate my problem.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In "Test 1" I have data from 4 people (i.e., AAAA, BBBB, CCCC, DDDD). Each person has 8 responses to an "estimate" question and 8 responses to a "truth" question. Half the responses are from Domain "0" and the other half from Domain "1".&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I would like to find the correlation of between the estimate and truth question for each person in each domain. I know that I can do that by going to Analyze / Multivariate Methods / Multivariate and putting the estimate and truth questions in the "Y, Columns" box, and both "ID" and "Domain" in the "By" box.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The problem is that I want the output of this analysis to be in another JMP table so that I can do further analyses on the correlations. For example, I want to know what the average persons' correlation is between estimate and truth in each of the domains. In order to do this, I need a file that looks like the data in the "Test 2" file.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you please tell me an automatic way to produce the "Test 2" data from the Test 1 data? I cannot do this manually because the actual dataset that I am working with is huge.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Nov 2017 08:25:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47515#M27093</guid>
      <dc:creator>ac111ca</dc:creator>
      <dc:date>2017-11-22T08:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a correlation coefficient and putting it into a table</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47520#M27097</link>
      <description>&lt;P&gt;You could explot the 'makeCombinedDataTableMessage'. In JSL, something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Data table
dt = DataTable("Test 1.jmp");

// Multivariate
m = dt &amp;lt;&amp;lt; Multivariate(Y( :Estimate, :Truth ), By( :ID, :Domain ));

// 'm' is a list because of the 'By' variable: Get the report for the first level
mRep = Report(m[1]);

// Get the correlation matrix into a table dt2 (for all levels)
dt2 = mRep[MatrixBox(1)] &amp;lt;&amp;lt; makeCombinedDataTable;

// Manipulate dt2 to remove redundancy
dt2 &amp;lt;&amp;lt; setName("Correlation Coefficients For By Groups");
dt2 &amp;lt;&amp;lt; deleteColumns({3, 4});
r2del = dt2 &amp;lt;&amp;lt; getRowsWhere(:Truth == 1);
dt2 &amp;lt;&amp;lt; deleteRows(r2del);
Column(dt2, "Truth") &amp;lt;&amp;lt; setName("Correlation Coefficient")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 10:25:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47520#M27097</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-11-22T10:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a correlation coefficient and putting it into a table</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47570#M27116</link>
      <description>Thank you, Ian. That works perfectly.</description>
      <pubDate>Wed, 22 Nov 2017 21:28:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-a-correlation-coefficient-and-putting-it-into-a-table/m-p/47570#M27116</guid>
      <dc:creator>ac111ca</dc:creator>
      <dc:date>2017-11-22T21:28:54Z</dc:date>
    </item>
  </channel>
</rss>

