Anytically speaking: Yes, it's the square matrix.You've done an impressive job, seriously. From a technial point of views: This cannot work for me: I need these Spearman matrices for several datasets with 100s of fields. I simply cannot change manually from triangular to square every time. I need to think of something else. @HadleyMyers wrote: Hi agian, It took a little manipulating, but see if you can make this work for you: dt = Open("$SAMPLE_DATA/Body Measurements.jmp");
dt_2 = dt << Multivariate(
Y(
:Name( "Mass" ),
:Name( "Fore" ),
:Name( "Bicep" ),
:Name( "Chest" )
),
Estimation Method( "Row-wise" ),
Matrix Format( "Square" ),
Scatterplot Matrix( 0 ),
Spearman's ρ(1)
);
report(dt_2)
[Outline Box("Correlations")][1, 1] << make into data table;
dt_spearman=Report( dt_2 )
[Outline Box( "Nonparametric: Spearman's ρ" )][Table Box( 1 )] <<
Make Into Data Table;
variables={"Mass","Fore","Bicep","Chest"};
For(i=1,i<=4,i++,
dt_spearman<<add rows(1);
Column(dt_spearman,1)[Nrows(dt_spearman)]=variables[i];
Column(dt_spearman,2)[Nrows(dt_spearman)]=variables[i];
Column(dt_spearman,3)[Nrows(dt_spearman)]=1;
);
Column(dt_spearman,1)<<Set Property("Value Ordering",{"Mass","Fore","Bicep","Chest"});
Column(dt_spearman,2)<<Set Property("Value Ordering",{"Mass","Fore","Bicep","Chest"});
dt_split= dt_spearman << Split(
Split By( :Variable ),
Split( :Spearman ρ ),
Group( :by Variable ),
Remaining Columns( Drop All ),
Sort by Column Property
);
For(i=2,i<=Nrows(dt_split),i++,
For(j=1,j<=Nrows(dt_split)-1,j++,
Column(dt_split,i)[j+1]=Column(dt_split,j+2)[i-1];
)
);
... View more