<?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: Summary Statistics of all numeric columns by grouping variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807545#M98686</link>
    <description>&lt;P&gt;The JSL for a JMP Platform that generates an Analysis of Variance is missing from the code.&amp;nbsp; The way the variable "vv" is being used in your supplied JSL seems to be pointing to the Output Display from a Oneway analysis or a Fit Model.&amp;nbsp; I find no such reference in the code you supplied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have made a guess and added in a Oneway to the code.&amp;nbsp; It generates output, but you need to verify that it is what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Input = Dialog( "Please Set Pvalue Limit", Pvalue_Threshold = EditNumber( 0.15 ), Button( "OK" ), Button( "Cancel" ) );

Pvaluelimit = Input[1];

vl = V List Box( Text Box( "Vmap Comparison" ) );
vl1 = V List Box();
vl2 = V List Box();
counter = 0;

i = 0;
k = 0;
j = 0;
w = 0;

WorkTable= current data table();
GetColName = WorkTable &amp;lt;&amp;lt; get column names( Numeric );

Show( GetColName );
SumDT = New Table( "SummaryData" );
SumDT &amp;lt;&amp;lt; New Column( "MDUT_Data", Character, Nominal, width( 30 ), values( GetColName ) );
SumDT &amp;lt;&amp;lt; New Column( "P-Value", Numeric, Continuous );
nc1 = 1;
Temp = Data Table( WorkTable ) &amp;lt;&amp;lt; Summary( Group( SPLIT ) );
nsplits = N Row( Temp );
SplitDef = Column( 1 ) &amp;lt;&amp;lt; Get As Matrix;
Show( SplitDef, nsplits );
Close( Temp, no save );

For( i = 1, i &amp;lt;= nsplits, i++,
    MeanCol = "Mean of " || Splitdef[i];
    SumDT &amp;lt;&amp;lt; New Column( MeanCol );
);

For( i = 1, i &amp;lt;= nsplits, i++,
    SigmaCol = "Sigma of " || Splitdef[i];
    SumDT &amp;lt;&amp;lt; New Column( SigmaCol );
);

Current Data Table( SumDT );
For Each Row(

    CurrentMDUT = Column( SumDT, "MDUT_Data" )[];
    Current Data Table( WorkTable );
    MeanCal = Summarize(
        ExpCol = by( SPLIT ),
        c = count,
        meanD = Mean( Eval( CurrentMDUT ) ),
        Sig = Std Dev( Eval( CurrentMDUT ) )
    );

    Current Data Table( SumDT );
    For( w = nc1 + 2, w &amp;lt;= nsplits + nc1 + 1, w++,
        BB = meanD[w - nc1 - 1];
        Column( w )[] = BB;
        CC = Sig[w - nc1 - 1];
        Column( w + nsplits )[] = CC;
    );

    Current Data Table( WorkTable );
    vx=worktable &amp;lt;&amp;lt; Oneway( Y( column(SumDT:MDUT_Data[row()]) ), X( :Split ), Means( 1 ), Mean Diamonds( 1 ) );
    vv=report(vx);
    Pvalue = vv["Analysis of Variance"][Number Col Box( 5 )] &amp;lt;&amp;lt; get( 1 );
    Current Data Table( SumDT );
    Column( nc1 + 1 )[] = Pvalue;
    Current Data Table( WorkTable );
    vv &amp;lt;&amp;lt; close window;

    If( Pvalue &amp;lt; Pvaluelimit,
        counter = counter + 1;
        layoutflag = Mod( counter, 2 );
        If( layoutflag &amp;gt; 0,
            vl1 &amp;lt;&amp;lt; append( vv ),
            vl2 &amp;lt;&amp;lt; append( vv )
        );
    );
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Oct 2024 20:50:36 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-10-22T20:50:36Z</dc:date>
    <item>
      <title>Summary Statistics of all numeric columns by grouping variable</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807530#M98682</link>
      <description>&lt;P&gt;I borrowed a section of another JSL that someone wrote a while back, but unfortunately has left the company now.&lt;/P&gt;&lt;P&gt;Original JSL creates box plots along with a table with summary statistics of all numeric columns by grouping variable ("split").&lt;/P&gt;&lt;P&gt;My goal is to get only the summary table with&amp;nbsp;Summary Statistics (Mean, Std-dev) of all numeric columns by grouping variable.&lt;/P&gt;&lt;P&gt;I am using JMP16.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample input data table has 200 numeric columns, thousands of rows with 5 unique value of&amp;nbsp;grouping character variable ("split").&lt;/P&gt;&lt;P&gt;output summary table should have 200 rows with 5 columns for Mean &amp;amp;&amp;nbsp;5 columns for std-dev, where each of the new columns (10) is Mean/Std-dev of each numeric column grouped by each&amp;nbsp;unique value of&amp;nbsp;grouping character variable ("split").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 20:01:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807530#M98682</guid>
      <dc:creator>vikramavtar</dc:creator>
      <dc:date>2024-10-22T20:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Statistics of all numeric columns by grouping variable</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807541#M98683</link>
      <description>&lt;P&gt;Forgot to post the error I get with the JSL&lt;/P&gt;&lt;P&gt;Thanks&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="Screenshot 2024-10-22 150540.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69427iA39C2D5DF74C1C29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-10-22 150540.png" alt="Screenshot 2024-10-22 150540.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 20:06:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807541#M98683</guid>
      <dc:creator>vikramavtar</dc:creator>
      <dc:date>2024-10-22T20:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Statistics of all numeric columns by grouping variable</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807545#M98686</link>
      <description>&lt;P&gt;The JSL for a JMP Platform that generates an Analysis of Variance is missing from the code.&amp;nbsp; The way the variable "vv" is being used in your supplied JSL seems to be pointing to the Output Display from a Oneway analysis or a Fit Model.&amp;nbsp; I find no such reference in the code you supplied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have made a guess and added in a Oneway to the code.&amp;nbsp; It generates output, but you need to verify that it is what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Input = Dialog( "Please Set Pvalue Limit", Pvalue_Threshold = EditNumber( 0.15 ), Button( "OK" ), Button( "Cancel" ) );

Pvaluelimit = Input[1];

vl = V List Box( Text Box( "Vmap Comparison" ) );
vl1 = V List Box();
vl2 = V List Box();
counter = 0;

i = 0;
k = 0;
j = 0;
w = 0;

WorkTable= current data table();
GetColName = WorkTable &amp;lt;&amp;lt; get column names( Numeric );

Show( GetColName );
SumDT = New Table( "SummaryData" );
SumDT &amp;lt;&amp;lt; New Column( "MDUT_Data", Character, Nominal, width( 30 ), values( GetColName ) );
SumDT &amp;lt;&amp;lt; New Column( "P-Value", Numeric, Continuous );
nc1 = 1;
Temp = Data Table( WorkTable ) &amp;lt;&amp;lt; Summary( Group( SPLIT ) );
nsplits = N Row( Temp );
SplitDef = Column( 1 ) &amp;lt;&amp;lt; Get As Matrix;
Show( SplitDef, nsplits );
Close( Temp, no save );

For( i = 1, i &amp;lt;= nsplits, i++,
    MeanCol = "Mean of " || Splitdef[i];
    SumDT &amp;lt;&amp;lt; New Column( MeanCol );
);

For( i = 1, i &amp;lt;= nsplits, i++,
    SigmaCol = "Sigma of " || Splitdef[i];
    SumDT &amp;lt;&amp;lt; New Column( SigmaCol );
);

Current Data Table( SumDT );
For Each Row(

    CurrentMDUT = Column( SumDT, "MDUT_Data" )[];
    Current Data Table( WorkTable );
    MeanCal = Summarize(
        ExpCol = by( SPLIT ),
        c = count,
        meanD = Mean( Eval( CurrentMDUT ) ),
        Sig = Std Dev( Eval( CurrentMDUT ) )
    );

    Current Data Table( SumDT );
    For( w = nc1 + 2, w &amp;lt;= nsplits + nc1 + 1, w++,
        BB = meanD[w - nc1 - 1];
        Column( w )[] = BB;
        CC = Sig[w - nc1 - 1];
        Column( w + nsplits )[] = CC;
    );

    Current Data Table( WorkTable );
    vx=worktable &amp;lt;&amp;lt; Oneway( Y( column(SumDT:MDUT_Data[row()]) ), X( :Split ), Means( 1 ), Mean Diamonds( 1 ) );
    vv=report(vx);
    Pvalue = vv["Analysis of Variance"][Number Col Box( 5 )] &amp;lt;&amp;lt; get( 1 );
    Current Data Table( SumDT );
    Column( nc1 + 1 )[] = Pvalue;
    Current Data Table( WorkTable );
    vv &amp;lt;&amp;lt; close window;

    If( Pvalue &amp;lt; Pvaluelimit,
        counter = counter + 1;
        layoutflag = Mod( counter, 2 );
        If( layoutflag &amp;gt; 0,
            vl1 &amp;lt;&amp;lt; append( vv ),
            vl2 &amp;lt;&amp;lt; append( vv )
        );
    );
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Oct 2024 20:50:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807545#M98686</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-10-22T20:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Statistics of all numeric columns by grouping variable</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807580#M98691</link>
      <description>&lt;P&gt;Thank you for quick response.&lt;/P&gt;&lt;P&gt;New JSL works and provides the desired results, but I think it is slow.&lt;BR /&gt;I am looking to use this script for a very large dataset.&lt;/P&gt;&lt;P&gt;Are there any options to improve performance ? Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 03:11:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807580#M98691</guid>
      <dc:creator>vikramavtar</dc:creator>
      <dc:date>2024-10-23T03:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Statistics of all numeric columns by grouping variable</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807642#M98698</link>
      <description>&lt;P&gt;The script would run much faster by using the Response Screening platform to get the p-Values.&amp;nbsp; It would also be more efficient to use the Tabulate platform to generate the means and standard deviations&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of how to create the Summary table using the above suggestions.&amp;nbsp; I have excluded the PValue limiting, since it did nothing in the original script.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1729659650228.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69434i80A40D8FDCD0E656/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1729659650228.png" alt="txnelson_0-1729659650228.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
WorkTable = Current Data Table();
GetColName = WorkTable &amp;lt;&amp;lt; get column names( Numeric );

// Generate the mean/std table
tab = WorkTable &amp;lt;&amp;lt; (Tabulate(
	Add Table(
		Column Table( Grouping Columns( :split ), Statistics( Mean ) ),
		Column Table( Grouping Columns( :split ), Statistics( Std Dev ) ),
		Row Table( Analysis Columns( Eval( GetColName ) ) )
	)
));
tab &amp;lt;&amp;lt; Make Into Data Table;
tab &amp;lt;&amp;lt; close window;
SumDT = Current Data Table();
SumDT &amp;lt;&amp;lt; set name( "SummaryData" );

// Generate the p-values
rs = WorkTable &amp;lt;&amp;lt; Response Screening(
	Y( Eval( GetColName ) ),
	X( :split ),
	PValues Table on Launch( 1 )
);

ResponseDT = rs &amp;lt;&amp;lt; get PValues;
Report( rs ) &amp;lt;&amp;lt; close window;

ResponseDT &amp;lt;&amp;lt; select columns( {"Y", "PValue"} );
ResponseDT &amp;lt;&amp;lt; Invert Column Selection;
ResponseDT &amp;lt;&amp;lt; delete columns;
ResponseDT:Y &amp;lt;&amp;lt; set name( "Analysis Columns" );

SumDT &amp;lt;&amp;lt; Update( With( ResponseDT ), Match Columns( :Analysis Columns = :Analysis Columns ) );

SumDT &amp;lt;&amp;lt; Select columns( :PValue );
SumDT &amp;lt;&amp;lt; Move Selected Columns( After( :Analysis Columns ) );
Close( ResponseDT, nosave );
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It should give you a leg up on completing the script to meet your exact specifications.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you take the time to read through the scripting guide, found in the JMP Documentation Library under the Help Pull Down Menu.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 05:03:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807642#M98698</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-10-23T05:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Statistics of all numeric columns by grouping variable</title>
      <link>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807762#M98718</link>
      <description>&lt;P&gt;As an alternative suggestion, you can generate a temporary stacked table&amp;nbsp; - and use &lt;STRONG&gt;Tables/Summary&lt;/STRONG&gt; in combination with the options &lt;STRONG&gt;Group&lt;/STRONG&gt; (original column) and &lt;STRONG&gt;Subgroup&lt;/STRONG&gt; (split):&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="hogi_0-1729692591275.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69448i4CC974DF24EA12BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1729692591275.png" alt="hogi_0-1729692591275.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

tmp = dt &amp;lt;&amp;lt;
Stack(
	columns( Column Group( "Processes" ) )
);

tmp &amp;lt;&amp;lt; Summary(
	Group( :Label ),
	Mean( :Processes ),
	Std Dev( :Processes ),
	Subgroup( :SITE ),
	statistics column name format( "stat" )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 14:11:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summary-Statistics-of-all-numeric-columns-by-grouping-variable/m-p/807762#M98718</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-10-23T14:11:10Z</dc:date>
    </item>
  </channel>
</rss>

