<?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 Pass Variables to the X Parameter in Fit Life by X? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/765308#M94490</link>
    <description>&lt;P&gt;This is another workaround as well. Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 03:47:29 GMT</pubDate>
    <dc:creator>Arthur</dc:creator>
    <dc:date>2024-06-13T03:47:29Z</dc:date>
    <item>
      <title>How to Pass Variables to the X Parameter in Fit Life by X?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762105#M94062</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to dynamically pass variables to the X parameter in the &lt;CODE&gt;fit life by x&lt;/CODE&gt; function. The first part of my code generates the analysis report as expected, but the second part only brings up the startup window without a report.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here’s what my code looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open( "$sample_data/big class.jmp" );

x_var = "sex";
y_var = "weight";

obj1 = dt &amp;lt;&amp;lt; Fit Life by X(
	Distribution( Weibull ),
	Nested Model Tests( Location and Scale ),
	Y( Eval(y_var) ),
	X( :sex ),
);

wait(2);

obj2 = dt &amp;lt;&amp;lt; Fit Life by X(
	Distribution( Weibull ),
	Nested Model Tests( Location and Scale ),
	Y( :weight ),
	X( Eval(x_var) ),
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Has anyone encountered this issue or knows how to correctly pass the variables to the X parameter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 12:04:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762105#M94062</guid>
      <dc:creator>Arthur</dc:creator>
      <dc:date>2024-05-31T12:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables to the X Parameter in Fit Life by X?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762109#M94065</link>
      <description>&lt;P&gt;This anomaly appears to be a bug. The Nested Model Tests argument is not recognized in the second case. Please report this to JMP Technical Support (&lt;A href="mailto:support@jmp.com" target="_blank"&gt;support@jmp.com&lt;/A&gt;) so it can be entered as a defect and tracked.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 12:34:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762109#M94065</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-05-31T12:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables to the X Parameter in Fit Life by X?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762113#M94068</link>
      <description>&lt;P&gt;This seems to require a bit more work to workaround as "normal" forcing won't work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$sample_data/big class.jmp");

x_var = "sex";
y_var = "weight";

myexpr = EvalExpr(dt &amp;lt;&amp;lt; Fit Life by X(
	Distribution( Weibull ),
	Nested Model Tests( Location and Scale ),
	Y( :weight ),
	X(Expr(NameExpr(AsColumn(dt, x_var)))),
));
show(myexpr);
obj = Eval(myexpr);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the extremely rare cases where I would say to use Eval(Parse()) (evil parse) but this seems to work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$sample_data/big class.jmp");

x_var = "sex";
y_var = "weight";

obj2 = Eval(Parse(Eval Insert("\[dt &amp;lt;&amp;lt; Fit Life by X(
	Distribution(Weibull),
	Nested Model Tests(Location and Scale),
	Y(:weight),
	X(:^x_var^)
)]\")));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 May 2024 14:05:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762113#M94068</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-05-31T14:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables to the X Parameter in Fit Life by X?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762508#M94193</link>
      <description>&lt;P&gt;Please see the following.&lt;/P&gt;
&lt;P&gt;Because "Relationship" is missing, the codes is trying to make the best guess based on X. But at the place where the codes checks on X, X is not a valid column yet, in this case. So, providing complete information, the codes don't need to walk into the trap.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open( "$sample_data/big class.jmp" );

x_var = "sex";
y_var = "weight";

obj1 = dt &amp;lt;&amp;lt; Fit Life by X(
	Distribution( Weibull ),
	Relationship( Location and Scale ),
	Nested Model Tests( Location and Scale ),
	Y( Eval(y_var) ),
	X( :sex ),
);

wait(2);

obj2 = dt &amp;lt;&amp;lt; Fit Life by X(
	Distribution( Weibull ),
	Relationship( Location and Scale ),
	Nested Model Tests( Location and Scale ),
	Y( :weight ),
	X( Eval(x_var) ),
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Jun 2024 20:23:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/762508#M94193</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2024-06-04T20:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables to the X Parameter in Fit Life by X?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/765307#M94489</link>
      <description>&lt;P&gt;Oh, this is exactly the right answer. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 03:46:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/765307#M94489</guid>
      <dc:creator>Arthur</dc:creator>
      <dc:date>2024-06-13T03:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Pass Variables to the X Parameter in Fit Life by X?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/765308#M94490</link>
      <description>&lt;P&gt;This is another workaround as well. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 03:47:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Pass-Variables-to-the-X-Parameter-in-Fit-Life-by-X/m-p/765308#M94490</guid>
      <dc:creator>Arthur</dc:creator>
      <dc:date>2024-06-13T03:47:29Z</dc:date>
    </item>
  </channel>
</rss>

