<?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: Scripting Equivalence Test: Equivalence Test function not evaluating variance type from a list in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802901#M97961</link>
    <description>&lt;P&gt;Below is a version of the script that will correctly handle the tostv list.&amp;nbsp; However, there is a logic problem with your "i" variable.&amp;nbsp; In your script, you are looping through your For loop 4 times, incrementing i by one each time, however you only have 2 levels of your tostv list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

tostv = {"Pooled Variance", "Unequal Variances"};
ksd = {12, 275};

dt = Current Data Table();
cnames = dt &amp;lt;&amp;lt; Get Column Names( string );
n = N Items( cnames );
i = 0;
anova = Fit Group(
	For( colnum = 4, colnum &amp;lt;= n, colnum++,
		i = i + 1;
		Eval(
			Eval Expr(
				Oneway(
					Y( Column( colnum ) ),
					X( :AgeClass ),
					All Pairs( 1 ),
					Means( 1 ),
					t Test( 1 ),
					Unequal Variances( 1 ),
					Std Dev Lines( 0 ),
					Mean Diamonds( 1 ),
					Connect Means( 1 ),
					Equivalence Tests(
						ksd[i],
						0.05,
						Expr( tostv[i] ),  //***need to fix to eval tostv
						"Equivalence",
						With Control( "Young" )
					),
					SendToReport(
						Dispatch( {}, "1", ScaleBox, {Minor Ticks( 0 )} ),
						Dispatch( {}, "Oneway Plot", FrameBox, ),
						Dispatch( {}, "Oneway Means Compare", FrameBox, ),
						Dispatch( {"Oneway Anova"}, "Summary of Fit", OutlineBox, {Close( 1 )} ),
						Dispatch( {"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close( 1 )} ),
						Dispatch( {"Oneway Anova"}, "Means for Oneway Anova", OutlineBox, {Close( 1 )} ),
						Dispatch( {}, "t Test", OutlineBox, {Close( 1 )} ),
						Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
					)
				)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Oct 2024 09:48:04 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-10-01T09:48:04Z</dc:date>
    <item>
      <title>Scripting Equivalence Test: Equivalence Test function not evaluating variance type from a list</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802812#M97945</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is a script that is automating equivalence testing in JMP on the example Auto Raw Data set (both script and data attached). My issue is line 27 of my script where I am specifying the variance type in the Equivalence test function. The equivalence test function is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;tostv = {"Pooled Variance", "Unequal Variances"};&lt;BR /&gt;ksd = {12,275};&lt;BR /&gt;&lt;BR /&gt;Equivalence Tests(
		ksd[i], 
		0.05,
		tostv[i], // ***need to fix
		"Equivalence",
		With Control( "Young" )
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However the tostv[i] is not getting evaluated properly, it is being ignored and the default pooled variance is being used. I assume I need some type of combination of eval functions but I cannot get it to work. See attached data and script. Thanks for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 18:34:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802812#M97945</guid>
      <dc:creator>Abby_Collins14</dc:creator>
      <dc:date>2024-09-30T18:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Equivalence Test: Equivalence Test function not evaluating variance type from a list</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802901#M97961</link>
      <description>&lt;P&gt;Below is a version of the script that will correctly handle the tostv list.&amp;nbsp; However, there is a logic problem with your "i" variable.&amp;nbsp; In your script, you are looping through your For loop 4 times, incrementing i by one each time, however you only have 2 levels of your tostv list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

tostv = {"Pooled Variance", "Unequal Variances"};
ksd = {12, 275};

dt = Current Data Table();
cnames = dt &amp;lt;&amp;lt; Get Column Names( string );
n = N Items( cnames );
i = 0;
anova = Fit Group(
	For( colnum = 4, colnum &amp;lt;= n, colnum++,
		i = i + 1;
		Eval(
			Eval Expr(
				Oneway(
					Y( Column( colnum ) ),
					X( :AgeClass ),
					All Pairs( 1 ),
					Means( 1 ),
					t Test( 1 ),
					Unequal Variances( 1 ),
					Std Dev Lines( 0 ),
					Mean Diamonds( 1 ),
					Connect Means( 1 ),
					Equivalence Tests(
						ksd[i],
						0.05,
						Expr( tostv[i] ),  //***need to fix to eval tostv
						"Equivalence",
						With Control( "Young" )
					),
					SendToReport(
						Dispatch( {}, "1", ScaleBox, {Minor Ticks( 0 )} ),
						Dispatch( {}, "Oneway Plot", FrameBox, ),
						Dispatch( {}, "Oneway Means Compare", FrameBox, ),
						Dispatch( {"Oneway Anova"}, "Summary of Fit", OutlineBox, {Close( 1 )} ),
						Dispatch( {"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close( 1 )} ),
						Dispatch( {"Oneway Anova"}, "Means for Oneway Anova", OutlineBox, {Close( 1 )} ),
						Dispatch( {}, "t Test", OutlineBox, {Close( 1 )} ),
						Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
					)
				)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Oct 2024 09:48:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802901#M97961</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-10-01T09:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Equivalence Test: Equivalence Test function not evaluating variance type from a list</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802947#M97968</link>
      <description>&lt;P&gt;Thanks so much Jim! And thanks for the catching the i logic issue- my original data set had a tostv list of 4 levels opposed the to 2 in this example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I greatly appreciate your help with the eval functions!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2024 14:42:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-Equivalence-Test-Equivalence-Test-function-not/m-p/802947#M97968</guid>
      <dc:creator>Abby_Collins14</dc:creator>
      <dc:date>2024-10-01T14:42:05Z</dc:date>
    </item>
  </channel>
</rss>

