<?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 How to transform spearman correlation table into a matrix format like pearson? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911248#M107054</link>
    <description>&lt;P&gt;In multivariate analysis report the spearman correlation results are in a table; can I get this in a matrix format like the pearson correlation matrix?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Nov 2025 16:06:41 GMT</pubDate>
    <dc:creator>frankderuyck</dc:creator>
    <dc:date>2025-11-04T16:06:41Z</dc:date>
    <item>
      <title>How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911248#M107054</link>
      <description>&lt;P&gt;In multivariate analysis report the spearman correlation results are in a table; can I get this in a matrix format like the pearson correlation matrix?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 16:06:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911248#M107054</guid>
      <dc:creator>frankderuyck</dc:creator>
      <dc:date>2025-11-04T16:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911262#M107055</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/283"&gt;@frankderuyck&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the results of the Spearman correlation obtained in the table of the Multivariate platform, you can right-click on the table, select "Make into Datatable", and then use the Graph Builder on this new data table to reproduce the kind of graph you're used to with Pearson correlation matrix:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victor_G_0-1762274307095.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86362iD3981D063BD38C91/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victor_G_0-1762274307095.png" alt="Victor_G_0-1762274307095.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can also generate a table with Tabulate platform on this datatable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victor_G_1-1762274328989.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86363i5E70D481DEC465D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victor_G_1-1762274328989.png" alt="Victor_G_1-1762274328989.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;As Pearson correlation is symmetric, you might expect some missing values for pairs of variables (if you have correlation value between A and B, the value between B and A is not displayed but is the same). To have nice looking graph or Tabulate tables, you might have to add column property "Value order" to order the different variables.&lt;/P&gt;
&lt;P&gt;JSL code to generate graph from the table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Variables( X( :by Variable ), Y( :Variable ), Color( :Spearman ρ ) ),
	Elements( Heatmap( X, Y, Legend( 7 ), Label( "Label by Value" ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				7,
				Properties(
					0,
					{gradient( {Scale Values( [-1 0 1] )} )},
					Item ID( "Spearman ρ", 1 )
				)
			)}
		),
		Dispatch( {}, "graph title", TextEditBox,
			{Set Text( "Variable by Variable Spearman correlation matrix" )}
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And for table from tabulate (that you can transform into a JMP datatable with red triangle option from Tabulate "Make Into Data Table"):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table(
			Grouping Columns( :by Variable ),
			Analysis Columns( :Spearman ρ ),
			Statistics( Mean )
		),
		Row Table( Grouping Columns( :Variable ) )
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please find attached the datatable and analysis used for this example.&lt;/P&gt;
&lt;P&gt;Hope this answer will help you,&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 16:40:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911262#M107055</guid>
      <dc:creator>Victor_G</dc:creator>
      <dc:date>2025-11-04T16:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911274#M107059</link>
      <description>&lt;P&gt;Thanks Victor, this graph builder option looks interesting!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 17:31:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911274#M107059</guid>
      <dc:creator>frankderuyck</dc:creator>
      <dc:date>2025-11-04T17:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911275#M107060</link>
      <description>&lt;P&gt;Guess there is no spearman matrix option under a red trangle?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 17:33:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911275#M107060</guid>
      <dc:creator>frankderuyck</dc:creator>
      <dc:date>2025-11-04T17:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911464#M107090</link>
      <description>&lt;P&gt;Whe I run the scripts on the pearman table I get very confusing picture..? Aso the tabulation script does not generate a pearson-like correlation matrix?&amp;nbsp;Value ordening is not easy for I have many variables. The pearson correlation matrix is perfect, why not possible for spearman?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="frankderuyck_0-1762354996365.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86453i42679E817287DE95/image-size/medium?v=v2&amp;amp;px=400" role="button" title="frankderuyck_0-1762354996365.png" alt="frankderuyck_0-1762354996365.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 15:07:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911464#M107090</guid>
      <dc:creator>frankderuyck</dc:creator>
      <dc:date>2025-11-05T15:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911465#M107091</link>
      <description>&lt;P&gt;In attachment the spearman rank table&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 15:15:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911465#M107091</guid>
      <dc:creator>frankderuyck</dc:creator>
      <dc:date>2025-11-05T15:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911530#M107096</link>
      <description>&lt;P&gt;Hi Franck,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Yes, the ordering of the variables is very important to get a nice triangle confusion matrix.&lt;BR /&gt;I found a solution with your dataset:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Right-click on column "Variable", &lt;STRONG&gt;New Formula Column&amp;gt;Group By&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;Then, right-click on column "Variable",&amp;nbsp;&lt;STRONG&gt;New Formula Column&amp;gt;Character&amp;gt;Rank (reverse order)&lt;/STRONG&gt;. Then redo the action 1 so that "Variable" is no longer the GroupBy variable.&lt;/LI&gt;
&lt;LI&gt;Do the same steps for the column "By Variable".&lt;/LI&gt;
&lt;LI&gt;Change the modeling type of the two new columns to Ordinal.&lt;/LI&gt;
&lt;LI&gt;Then you can use Graph Builder, place the Variable, By Variables and Spearman columns, and add the "Reverse Rank[Variable][Variable]" column on top of "Variable" axis, and "Reverse Rank[by Variable][by Variable]" column on top of "By variable" axis.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;You should then get the nice looking Spearman correlation matrix:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victor_G_0-1762365478466.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86464i8D59148ADCADBF50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victor_G_0-1762365478466.png" alt="Victor_G_0-1762365478466.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Or once the rank columns are created, you can directly use this Graph Builder script:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 733, 664 ),
	Show Control Panel( 0 ),
	Variables(
		X( :"Reverse Rank[by Variable][by Variable]"n ),
		Y( :"Reverse Rank[Variable][Variable]"n ),
		Color( :Spearman ρ )
	),
	Elements( Heatmap( X, Y, Legend( 22 ), Label( "Label by Value" ) ) ),
	SendToReport(
		Dispatch( {}, "400", ScaleBox,
			{Legend Model(
				22,
				Properties(
					0,
					{gradient( {Scale Values( [-1 0 1] )} )},
					Item ID( "Spearman ρ", 1 )
				)
			)}
		),
		Dispatch( {}, "graph title", TextEditBox,
			{Set Text( "Correlation matrix Spearman" )}
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For the Tabulate option, this is more straightforward, you just need to check the option "Order by count of grouping columns" to get the nice matrix:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Victor_G_1-1762365673475.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/86465i35B67AD3F48F15F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Victor_G_1-1762365673475.png" alt="Victor_G_1-1762365673475.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find attached your dataset with the two columns and the visualization added.&lt;/P&gt;
&lt;P&gt;Hope this answer will help you,&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 18:03:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911530#M107096</guid>
      <dc:creator>Victor_G</dc:creator>
      <dc:date>2025-11-05T18:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to transform spearman correlation table into a matrix format like pearson?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911671#M107108</link>
      <description>&lt;P&gt;Excellent, thanks Victor!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 10:24:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-transform-spearman-correlation-table-into-a-matrix-format/m-p/911671#M107108</guid>
      <dc:creator>frankderuyck</dc:creator>
      <dc:date>2025-11-06T10:24:47Z</dc:date>
    </item>
  </channel>
</rss>

