<?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 Summarize function in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10522#M10192</link>
    <description>&lt;P&gt;I need some help utilizing the summarize function and I will use the big class as an example dataset.&amp;nbsp; The below example works perfect but I need to summarize the data by sex.&amp;nbsp; When I use the BY(:Sex) operator I keep getting an error.&amp;nbsp; The purpose of me doing this is to output the results and use this in a calculated reference number per multiple variables for graphing purposes.&amp;nbsp; .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;DTData= Open( "$SAMPLE_DATA/Big Class.jmp" );
summarize(
(
Sigma=StdDev(:height),
Avg= mean(:height),
);
show(sigma,avg);
&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;&lt;SPAN style="color: #000080; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:23:18 GMT</pubDate>
    <dc:creator>david_w_westall</dc:creator>
    <dc:date>2023-06-09T23:23:18Z</dc:date>
    <item>
      <title>Summarize function</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10522#M10192</link>
      <description>&lt;P&gt;I need some help utilizing the summarize function and I will use the big class as an example dataset.&amp;nbsp; The below example works perfect but I need to summarize the data by sex.&amp;nbsp; When I use the BY(:Sex) operator I keep getting an error.&amp;nbsp; The purpose of me doing this is to output the results and use this in a calculated reference number per multiple variables for graphing purposes.&amp;nbsp; .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;DTData= Open( "$SAMPLE_DATA/Big Class.jmp" );
summarize(
(
Sigma=StdDev(:height),
Avg= mean(:height),
);
show(sigma,avg);
&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;&lt;SPAN style="color: #000080; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:23:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10522#M10192</guid>
      <dc:creator>david_w_westall</dc:creator>
      <dc:date>2023-06-09T23:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize function</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10523#M10193</link>
      <description>&lt;P&gt;Here are a couple of examples&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;///example from the scripting index for Summarize
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Summarize( exg = By( :sex ), exm = Mean( :height ) );
Eval List( {exg, exm} );

/// I like to put the stats into a data table instead of variables when I'm going to graph the results
Data Table( "Big Class" ) &amp;lt;&amp;lt; Summary( Group( :sex ), Mean( :height ), Std Dev( :weight ) );

///Graph Builder summarizes and makes a graph automatically
dt &amp;lt;&amp;lt; Graph Builder(
	Size( 249, 298 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :height ), Y( :weight ) ),
	Elements(
		Position( 1, 1 ),
		Bar( X, Y, Legend( 3 ), Bar Style( "Side by side" ), Summary Statistic( "Mean" ) )
	),
	Elements(
		Position( 1, 2 ),
		Bar( X, Y, Legend( 4 ), Bar Style( "Side by side" ), Summary Statistic( "Std Dev" ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 22:18:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10523#M10193</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2020-06-08T22:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize function</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10524#M10194</link>
      <description>&lt;P&gt;That works but I can't use it in matrix form for what I'm trying to do.&amp;nbsp; My goal is to output the mean and Std deviation of a height by the female population in a variables.&amp;nbsp; I then use those variables for a calculated reference line.&amp;nbsp;&amp;nbsp;&amp;nbsp; By population changes constantly and having a reference line that is dynamic is handy.&amp;nbsp; Here is my example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;DTData = Open( "$SAMPLE_DATA/Big Class.jmp" );
Summarize( sigma = Std Dev( :height ), avg = Mean( :height ) );
siglow = avg - sigma;
sighigh = avg + sigma;
Variability Chart(
	Y( xx ),
	X( :yyy, :zzz ),
	Max Iter( 100 ),
	Conv Limit( 0.00000001 ),
	Number Integration Abscissas( 128 ),
	Number Function Evals( 65536 ),
	Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
	Connect Cell Means( 1 ),
	Show Group Means( 1 ),
	Std Dev Chart( 0 ),
	Points Jittered( 1 ),
	AIAG Labels( 0 ),
	Dispatch(
		{},
		"2",
		ScaleBox,
		{Format( "Best" ), Add Ref Line(
			Eval( siglow ),
			dotted,
			{178, 0, 0},
			"Height Female -1 sigma"
		), Add Ref Line( Eval( sighigh ), dotted, {178, 0, 0}, "Height Female +1 sigma" ),
		Add Ref Line( Eval( avg ), solid, {255, 0, 0}, "mean height female" ),
		Show Major Grid( 1 ), Show Minor Grid( 1 )}
	),
	Where( :what == "why" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 22:19:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-function/m-p/10524#M10194</guid>
      <dc:creator>david_w_westall</dc:creator>
      <dc:date>2020-06-08T22:19:55Z</dc:date>
    </item>
  </channel>
</rss>

