<?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 do I define effect columns once in a variable for use in model? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/949011#M109797</link>
    <description>&lt;P&gt;this can be tricky. &amp;nbsp;Here is one way to do it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;effect_list = {:run date, :reader, :sample bank, :plate dispense system, :dil_2_bot cap, :dil_2_bottle, :dil_2_nacl, :dil_2_proclin};


eff_expr=expr(Effects());

for each({effect, i}, effect_list, 
	Insert Into(eff_expr, name expr(effect))
);

Substitute(
		Expr(Fit Model(
			Y( :manual result 34.2 ),
			EEE,
			Target Level( "neg" ),
			Personality( "Nominal Logistic" ),
			Run( Likelihood Ratio Tests( 1 ), Wald Tests( 0 ) ),
			By( :genotype )
		)),
	Expr( EEE ), Name Expr( eff_expr )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2026 19:45:53 GMT</pubDate>
    <dc:creator>MathStatChem</dc:creator>
    <dc:date>2026-05-18T19:45:53Z</dc:date>
    <item>
      <title>How do I define effect columns once in a variable for use in model?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/948994#M109796</link>
      <description>&lt;P&gt;Hi everyone-&lt;/P&gt;
&lt;P&gt;I am losing my mind trying to figure this out. I believe the answer lies in some magical combination of Eval() and Expr() but I can't figure it out.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a list of columns I want to define at the beginning of the script and then reference for use as model effects, as shown below. How do I get the model to recognize the list as a list of columns to use as effects? Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP 19.1.0&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
effect_list = {:run date, :reader, :sample bank, :plate dispense system, :dil_2_bot cap, :dil_2_bottle, :dil_2_nacl, :dil_2_proclin};

Local( {obj},
obj = dt &amp;lt;&amp;lt; Fit Model(
Y( :manual result 34.2),
Effects( effect_list),
Target Level( "neg" ),
Personality( "Nominal Logistic" ),
Run( Likelihood Ratio Tests( 1 ), Wald Tests( 0 ) ),
By( :genotype )
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2026 18:21:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/948994#M109796</guid>
      <dc:creator>MuddyMaeSuggins</dc:creator>
      <dc:date>2026-05-18T18:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I define effect columns once in a variable for use in model?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/949011#M109797</link>
      <description>&lt;P&gt;this can be tricky. &amp;nbsp;Here is one way to do it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;effect_list = {:run date, :reader, :sample bank, :plate dispense system, :dil_2_bot cap, :dil_2_bottle, :dil_2_nacl, :dil_2_proclin};


eff_expr=expr(Effects());

for each({effect, i}, effect_list, 
	Insert Into(eff_expr, name expr(effect))
);

Substitute(
		Expr(Fit Model(
			Y( :manual result 34.2 ),
			EEE,
			Target Level( "neg" ),
			Personality( "Nominal Logistic" ),
			Run( Likelihood Ratio Tests( 1 ), Wald Tests( 0 ) ),
			By( :genotype )
		)),
	Expr( EEE ), Name Expr( eff_expr )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2026 19:45:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/949011#M109797</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2026-05-18T19:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I define effect columns once in a variable for use in model?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/949094#M109803</link>
      <description>&lt;P&gt;I'm not sure if Fit Model would work with Effects({columns}) (some platforms do) but it is safer to get rid of the list -&amp;gt; you can build the Effects part as an expression.&lt;/P&gt;
&lt;P&gt;Here is one one more option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
effect_list = {:run date, :reader, :sample bank, :plate dispense system, :dil_2_bot cap, :dil_2_bottle,
:dil_2_nacl, :dil_2_proclin};

effect_expr = Substitute(effect_list, List(), Expr(Effects))

obj = Eval(EvalExpr(
	dt &amp;lt;&amp;lt; Fit Model(
		Y(:manual result 34.2),
		Expr(NameExpr(effect_expr)),
		Target Level("neg"),
		Personality("Nominal Logistic"),
		Run(Likelihood Ratio Tests(1), Wald Tests(0)),
		By(:genotype)
	);	
));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2026 04:19:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-define-effect-columns-once-in-a-variable-for-use-in/m-p/949094#M109803</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-05-19T04:19:01Z</dc:date>
    </item>
  </channel>
</rss>

