<?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: How to insert additional column to Least Squares Means Table in Effect Details? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47132#M26860</link>
    <description>Thank you very much Jim</description>
    <pubDate>Sun, 12 Nov 2017 12:54:12 GMT</pubDate>
    <dc:creator>Kynda</dc:creator>
    <dc:date>2017-11-12T12:54:12Z</dc:date>
    <item>
      <title>How to insert additional column to Least Squares Means Table in Effect Details?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47124#M26855</link>
      <description>&lt;P&gt;I want to find the means of my each level of my design experiment. But in the report I only get Least Suare of Means.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Picture1.png" style="width: 299px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8311i97BA2DEA2B091795/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture1.png" alt="Picture1.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get the means of each level, is there any possibility to add additional colum to this table and get means?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 20:58:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47124#M26855</guid>
      <dc:creator>Kynda</dc:creator>
      <dc:date>2023-06-08T20:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert additional column to Least Squares Means Table in Effect Details?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47127#M26857</link>
      <description>&lt;P&gt;There is not an interactive option for adding the means to the table you are referencing, however there is a pretty simple script that can add it in&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kynda.PNG" style="width: 278px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8313iB274370D1F9E04EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Kynda.PNG" alt="Kynda.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
fm = dt &amp;lt;&amp;lt; Fit Model(
	Y( :weight ),
	Effects( :age, :sex, :sex * :age ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Effect Leverage" ),
	Run(
		:weight &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
		Lack of Fit( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
		Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
		Plot Effect Leverage( 1 ), Box Cox Y Transformation( 0 )}
	),
	SendToReport(
		Dispatch(
			{"Response weight", "sex*age"},
			"Least Squares Means Table",
			OutlineBox,
			{Close( 0 )}
		)
	)
);
// Calculate the means
Summarize( dt, bygroup = by( :sex, :age ), TheMeans = Mean( :Weight ) );
// Append the calculated means to the display table
Report( fm )["Sex*Age"]["Least Squares Means Table"][Table Box( 1 )] &amp;lt;&amp;lt;
append( Number Col Box( "Means", Eval( TheMeans ) ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 11:35:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47127#M26857</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-11-12T11:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert additional column to Least Squares Means Table in Effect Details?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47128#M26858</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;for the promt reply.&lt;/P&gt;&lt;P&gt;Unfortunately I'm not a computer guy.&lt;/P&gt;&lt;P&gt;If possible could you please guide me how can I add this script to my model (I mean where I have to write this commands?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, This will help me for all my analysis.&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 11:51:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47128#M26858</guid>
      <dc:creator>Kynda</dc:creator>
      <dc:date>2017-11-12T11:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert additional column to Least Squares Means Table in Effect Details?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47131#M26859</link>
      <description>&lt;P&gt;The script I included in my last response would not be added to the Fit Model.&amp;nbsp; It is a script that would be run instead of the model.&amp;nbsp; However, given your response, I suggest that what you do, is rather than working towards adding the means to the existing table, that you run a separate JMP Platform to generate the desired means.&amp;nbsp; If you run the Tablulate Platform, you can generate the means.&amp;nbsp; Below is an example, using the sample data that I have been using for the examples I have provided you.&amp;nbsp; The Tabulate Platform can be found in JMP at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Analyze==&amp;gt;Tabulate&lt;/P&gt;
&lt;P&gt;Here are the results&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kynda3.PNG" style="width: 468px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8314i58CDD62FC3000A2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="kynda3.PNG" alt="kynda3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Or if you really want to add the means to the LSMeans table, below is a script that you would have to modify based upon the columns you are running in your model, and then run the script to add the means to the output.&lt;/P&gt;
&lt;P&gt;The Script:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Calculate the means
Summarize(bygroup = by( :sex, :age ), TheMeans = Mean( :Weight ) );
// Append the calculated means to the display table
Window("big class - Fit Least Squares")["Sex*Age"]["Least Squares Means Table"][Table Box( 1 )] &amp;lt;&amp;lt;
append( Number Col Box( "Means", Eval( TheMeans ) ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What would have to be changed are the refernces to the columns.&amp;nbsp; In my Example, the Columns: sex, age and weight would have to be changes to your columns.&lt;/P&gt;
&lt;P&gt;Secondly, the Window reference of "big class - Fit Least Squares"&amp;nbsp; would have to be changed to the output window name from your analysis.&amp;nbsp; This is taken directly from the output display's window name at the top left area of the output&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kynda2.PNG" style="width: 378px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8315iBC1D4BBCAD4B0173/image-size/large?v=v2&amp;amp;px=999" role="button" title="Kynda2.PNG" alt="Kynda2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Once the changes to this simple script are made, you just need to run it, and it will add the means to your interaction MeansSquare table&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 12:48:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47131#M26859</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-11-12T12:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert additional column to Least Squares Means Table in Effect Details?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47132#M26860</link>
      <description>Thank you very much Jim</description>
      <pubDate>Sun, 12 Nov 2017 12:54:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-additional-column-to-Least-Squares-Means-Table-in/m-p/47132#M26860</guid>
      <dc:creator>Kynda</dc:creator>
      <dc:date>2017-11-12T12:54:12Z</dc:date>
    </item>
  </channel>
</rss>

