<?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 General script for fit model with saving student residuals for different variables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/General-script-for-fit-model-with-saving-student-residuals-for/m-p/827663#M100944</link>
    <description>&lt;P&gt;I am trying to create a script that I can use every time with minimum work to do ANOVA and Chi-sq directly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started the script:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt=Current Data Table();

dlg = Column Dialog(																	
			name = ColList( "Parameters", Min Col(1) ), 								
			subject = ColList( "Treatment", Min Col(1), MaxCol(1) ),
			Reffect = ColList( "Random", Min Col(0), MaxCol(2) )
			);

// Stop if the user did not press 'OK'		
If( dlg["Button"] != 1, Beep(); Throw());

name = dlg[ "name" ];
subject = dlg["subject"];
Reffect = dlg ["Reffect"];
show (name, subject, Reffect);

dt&amp;lt;&amp;lt;Fit Model(
	Y( name[1]),
	Effects( subject[1]),
	Random Effects( Reffect[1]),
	NoBounds( 1 ),
	Personality( "Standard Least Squares" ),
	Method( "REML" ),
	Emphasis( "Effect Leverage" ),
	Run(
		Profiler( 0 ),
		name[1] &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 0 ),
		Parameter Estimates( 1 ), Scaled Estimates( 0 ),
		Plot Actual by Predicted( 1 ), Plot Residual by Predicted( 1 ),
		Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
		Plot Residual by Normal Quantiles( 0 ), Interaction Plots( 0 ), AICc( 0 ),
		Show VIF( 0 )}
	)
);
obj &amp;lt;&amp;lt; Studentized Residuals;
//obj &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;However, there is an issue to do the fit model. The fit model box open only with the Y.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;on the Y most of the time I need to add more than 1 variable as well, so I will have more student residuals to save to be able to verify the outliers, then the normal distribuition and the equal variance.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your help :)&lt;/img&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 16 Jan 2025 20:46:33 GMT</pubDate>
    <dc:creator>Bmllnn</dc:creator>
    <dc:date>2025-01-16T20:46:33Z</dc:date>
    <item>
      <title>General script for fit model with saving student residuals for different variables</title>
      <link>https://community.jmp.com/t5/Discussions/General-script-for-fit-model-with-saving-student-residuals-for/m-p/827663#M100944</link>
      <description>&lt;P&gt;I am trying to create a script that I can use every time with minimum work to do ANOVA and Chi-sq directly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started the script:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt=Current Data Table();

dlg = Column Dialog(																	
			name = ColList( "Parameters", Min Col(1) ), 								
			subject = ColList( "Treatment", Min Col(1), MaxCol(1) ),
			Reffect = ColList( "Random", Min Col(0), MaxCol(2) )
			);

// Stop if the user did not press 'OK'		
If( dlg["Button"] != 1, Beep(); Throw());

name = dlg[ "name" ];
subject = dlg["subject"];
Reffect = dlg ["Reffect"];
show (name, subject, Reffect);

dt&amp;lt;&amp;lt;Fit Model(
	Y( name[1]),
	Effects( subject[1]),
	Random Effects( Reffect[1]),
	NoBounds( 1 ),
	Personality( "Standard Least Squares" ),
	Method( "REML" ),
	Emphasis( "Effect Leverage" ),
	Run(
		Profiler( 0 ),
		name[1] &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 0 ),
		Parameter Estimates( 1 ), Scaled Estimates( 0 ),
		Plot Actual by Predicted( 1 ), Plot Residual by Predicted( 1 ),
		Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
		Plot Residual by Normal Quantiles( 0 ), Interaction Plots( 0 ), AICc( 0 ),
		Show VIF( 0 )}
	)
);
obj &amp;lt;&amp;lt; Studentized Residuals;
//obj &amp;lt;&amp;lt; Close Window;&lt;/CODE&gt;&lt;/PRE&gt;&lt;DIV&gt;However, there is an issue to do the fit model. The fit model box open only with the Y.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;on the Y most of the time I need to add more than 1 variable as well, so I will have more student residuals to save to be able to verify the outliers, then the normal distribuition and the equal variance.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for your help :)&lt;/img&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jan 2025 20:46:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/General-script-for-fit-model-with-saving-student-residuals-for/m-p/827663#M100944</guid>
      <dc:creator>Bmllnn</dc:creator>
      <dc:date>2025-01-16T20:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: General script for fit model with saving student residuals for different variables</title>
      <link>https://community.jmp.com/t5/Discussions/General-script-for-fit-model-with-saving-student-residuals-for/m-p/827893#M100971</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Try adjusting the code to add eval(eval expr(expr))).&amp;nbsp; There's a blog post &lt;A href="https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/ta-p/48998" target="_self"&gt;here&lt;/A&gt; that explains a little about how this works.&amp;nbsp; Also, the way the column dialog window is set up allows multiple Ys to be selected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Eval(Eval Expr(obj=dt&amp;lt;&amp;lt;Fit Model(
	Y( expr(name)),
	Effects( expr(subject)),
	Random Effects( expr(Reffect)),
	NoBounds( 1 ),
	Personality( "Standard Least Squares" ),
	Method( "REML" ),
	Emphasis( "Effect Leverage" ),
	Run(
		Profiler( 0 ),
		name[1] &amp;lt;&amp;lt; {Summary of Fit( 1 ), Analysis of Variance( 0 ),
		Parameter Estimates( 1 ), Scaled Estimates( 0 ),
		Plot Actual by Predicted( 1 ), Plot Residual by Predicted( 1 ),
		Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
		Plot Residual by Normal Quantiles( 0 ), Interaction Plots( 0 ), AICc( 0 ),
		Show VIF( 0 )}
	)
)));&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 20:19:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/General-script-for-fit-model-with-saving-student-residuals-for/m-p/827893#M100971</guid>
      <dc:creator>HadleyMyers</dc:creator>
      <dc:date>2025-01-17T20:19:05Z</dc:date>
    </item>
  </channel>
</rss>

