<?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: Missing Y Response Variable Fit Model Proportional Hazards in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483463#M72793</link>
    <description>&lt;P&gt;I cannot reproduce the problem if I change As Column to Column. Here is the full codes that I run. I just changed the last three As Column to Column.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Log();
dt = Current Data Table();

If( Not( Is Scriptable( dt ) ),
	dtsel = Pick File( "Open File", {"JMP|jmp", "All files|*"} );
	If( dtsel == "",
		Stop(),
		Try( dt = Open( dtsel ), Stop() )
	);
);


dtname = Data Table( dt ) &amp;lt;&amp;lt; Get Name;
validated = 0;

New Window( "Survival/Reliability",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;On Validate(
		survival = {};
		Insert Into( survival, Substitute( olb[List Box Box( 2 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Y() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 3 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Grouping() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 4 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Censor() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 5 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Freq() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 6 )] &amp;lt;&amp;lt; Get Items, {}, Expr( By() ) ) );
		Insert Into( survival, Insert( Expr( Censor Code() ), olb[Number Edit Box( 1 )] &amp;lt;&amp;lt; Get ) );
		
		Insert Into( survival, Insert( Expr( Plot failure instead of Survival() ), olb[Check Box Box( 1 )] &amp;lt;&amp;lt; Get ) );
		survival expr = Expr( Send( dt ) );
		Insert Into( survival expr, Substitute( survival, {}, Expr( Survival() ) ) );
		obj = survival expr;
		obj &amp;lt;&amp;lt; Save Estimates;
		validated = 1;
	),
	olb = Outline Box( "",
		dt &amp;lt;&amp;lt; Survival(
			Failure Plot( 1 ),
			Show Points( 1 ),
			Show Shaded Simultaneous CI( 1 ),
			Show Simultaneous CI( 1 ),
			Weibull Plot( 1 ),
			Weibull Fit( 1 )
			
		)
	)
);

If( !validated, Stop() );


dt2 = Data Table( dtname || " Survival" );
columnnamegroup = Column( dt2, 1 ) &amp;lt;&amp;lt; Get Name;
GroupID = Associative Array( Column( dt2, 1 ) ) &amp;lt;&amp;lt; Get Keys;
Show( GroupID );

n = N Items( GroupID );

Show( n );

Current Data Table( dt2 );
dt2 &amp;lt;&amp;lt; select where( As Column( columnnamegroup ) == "Combined" );
dt2 &amp;lt;&amp;lt; hide and exclude;
dt2 &amp;lt;&amp;lt; Clear Select;

Graph Builder(
	Variables( X( :"log(Time)"n ), Y( :"log(-log(Surv))"n ), Overlay( As Column( columnnamegroup ) ) ),
	Elements( Points( X, Y, Legend( 17 ) ), Line Of Fit( X, Y, Legend( 18 ) ) ),
	SendToReport(
		Dispatch(
			{}, "400", ScaleBox, 
			//{Legend Model(
			//	17,
			//	Base( 0, 0, 0, Item ID( "Op1", 1 ) ),
			//	Base( 1, 0, 0, Item ID( "Op2", 1 ) ),
			//	Base( 2, 0, 0, Item ID( "Op3", 1 ) )
			//)}
		)
	)
);



Ycolname = Arg( survival[1], 1 );
Effectname = Arg( survival[2], 1 );
Censorname = Arg( survival[3], 1 );
Freqname = Arg( survival[4], 1 );
Byname = Arg( survival[5], 1 );
CensorCodename = Arg( survival[6], 1 );

Show( Ycolname );

Current Data Table( dt );


Platform = dt &amp;lt;&amp;lt; Fit Model(
		//	Freq(),
	//	By(),
	Y(  Column( Ycolname ) ),
	Censor(  Column( Censorname ) ),
	Effects(  Column( Effectname ) ),
	Personality( "Proportional Hazard" ),
	Censor Code( "1" ),
	Run Model( Likelihood Ratio Tests( 1 ), Likelihood Confidence Intervals( 1 ), Risk Ratios( 1 ) ) 

);	&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here are my steps and what I saw. I have checked JMP14, JMP15, and JMP16. I believe your version is not further back due to how your codes use new name literals.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open Rats.jmp&lt;/LI&gt;
&lt;LI&gt;Run the script&lt;/LI&gt;
&lt;LI&gt;Specify the dialog when it pops up, then click OK&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1651499317582.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42157iB0130B831620A4B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1651499317582.png" alt="peng_liu_0-1651499317582.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Some reports show up. And this is the Fit Model launch dialog looks like:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_1-1651499389656.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42158i357CBDF8AA3E5693/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_1-1651499389656.png" alt="peng_liu_1-1651499389656.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you cannot see what I am seeing here, I can only suspect there is something that neither of us are aware of. If so, you may want to contact &lt;A href="mailto:support@jmp.com" target="_blank"&gt;support@jmp.com&lt;/A&gt; to get some help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2022 13:53:11 GMT</pubDate>
    <dc:creator>peng_liu</dc:creator>
    <dc:date>2022-05-02T13:53:11Z</dc:date>
    <item>
      <title>Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483266#M72764</link>
      <description>&lt;P&gt;I am trying to do some Survival analysis, where I am combining some analysis into one script. &amp;nbsp;So what I am trying to do, is they enter the columns into the Survival Platform, then I take those columns and use them in the Proportional Hazards Platform. &amp;nbsp;My script works great except for the Y, response, it will not find the Y response variable. &amp;nbsp; If I change&amp;nbsp;&lt;CODE class=" language-jsl"&gt;Y( As Column( Ycolname ) ), to&amp;nbsp;something&amp;nbsp;like&amp;nbsp;Y("Time&amp;nbsp;to&amp;nbsp;Failure"),&amp;nbsp;it&amp;nbsp;works&amp;nbsp;great.&amp;nbsp;&amp;nbsp;&amp;nbsp;But&amp;nbsp;when&amp;nbsp;I&amp;nbsp;try&amp;nbsp;to&amp;nbsp;use&amp;nbsp;the&amp;nbsp;variable,&amp;nbsp;it&amp;nbsp;does&amp;nbsp;not&amp;nbsp;work.&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;I have two questions - why does my method work for Censor and the Xs, but not the Ys.&lt;/P&gt;&lt;P&gt;Second question, if they do not enter a by or frequency column, how do I tell the fit model that there is not a column to enter. &amp;nbsp;If I use As Column (variable) it says it cannot find my column, which is right.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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 );
Clear Log();
dt = Current Data Table();

If( Not( Is Scriptable( dt ) ),
	dtsel = Pick File( "Open File", {"JMP|jmp", "All files|*"} );
	If( dtsel == "",
		Stop(),
		Try( dt = Open( dtsel ), Stop() )
	);
);


dtname = Data Table( dt ) &amp;lt;&amp;lt; Get Name;
validated = 0;

New Window( "Survival/Reliability",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;On Validate(
		survival = {};
		Insert Into( survival, Substitute( olb[List Box Box( 2 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Y() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 3 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Grouping() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 4 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Censor() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 5 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Freq() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 6 )] &amp;lt;&amp;lt; Get Items, {}, Expr( By() ) ) );
		Insert Into( survival, Insert( Expr( Censor Code() ), olb[Number Edit Box( 1 )] &amp;lt;&amp;lt; Get ) );
		
		Insert Into(
			survival,
			Insert( Expr( Plot failure instead of Survival() ), olb[Check Box Box( 1 )] &amp;lt;&amp;lt; Get )
		);
		survival expr = Expr( Send( dt ) );
		Insert Into( survival expr, Substitute( survival, {}, Expr( Survival() ) ) );
		obj = survival expr;
		obj &amp;lt;&amp;lt; Save Estimates;
		validated = 1;
	),
	olb = Outline Box( "",
		dt &amp;lt;&amp;lt; Survival(
			Failure Plot( 1 ),
			Show Points( 1 ),
			Show Shaded Simultaneous CI( 1 ),
			Show Simultaneous CI( 1 ),
			Weibull Plot( 1 ),
			Weibull Fit( 1 )
			
		)
	)
);

If( !validated, Stop() );
Eval(PH);

dt2 = Data Table( dtname || " Survival" );
columnnamegroup = Column( dt2, 1 ) &amp;lt;&amp;lt; Get Name;
GroupID = Associative Array( Column( dt2, 1 ) ) &amp;lt;&amp;lt; Get Keys;
Show( GroupID );

n = N Items( GroupID );

Show( n );

Current Data Table( dt2 );
dt2 &amp;lt;&amp;lt; select where( As Column( columnnamegroup ) == "Combined" );
dt2 &amp;lt;&amp;lt; hide and exclude;
dt2 &amp;lt;&amp;lt; Clear Select;

Graph Builder(
	Variables( X( :"log(Time)"n ), Y( :"log(-log(Surv))"n ), Overlay( As Column( columnnamegroup ) ) ),
	Elements( Points( X, Y, Legend( 17 ) ), Line Of Fit( X, Y, Legend( 18 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				17,
				Base( 0, 0, 0, Item ID( "Op1", 1 ) ),
				Base( 1, 0, 0, Item ID( "Op2", 1 ) ),
				Base( 2, 0, 0, Item ID( "Op3", 1 ) )
			)}
		)
	)
);


PH = Expr(
	Ycolname = Arg( survival[1], 1 );
	Effectname = Arg( survival[2], 1 );
	Censorname = Arg( survival[3], 1 );
	Freqname = Arg( survival[4], 1 );
	Byname = Arg( survival[5], 1 );
	CensorCodename = Arg( survival[6], 1 );

	Show( Ycolname );

	Current Data Table( dt );


	dt &amp;lt;&amp;lt; Fit Model(
		//	Freq(),
		//	By(),
		Y( As Column( Ycolname ) ),
		Censor( As Column( Censorname ) ),
		Effects( As Column( Effectname ) ),
		Personality( "Proportional Hazard" ),
		Censor Code( "1" ),
		Run Model( Likelihood Ratio Tests( 1 ), Likelihood Confidence Intervals( 1 ), Risk Ratios( 1 ) ) 

	);
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:58:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483266#M72764</guid>
      <dc:creator>lisamaley</dc:creator>
      <dc:date>2023-06-09T16:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483305#M72765</link>
      <description>&lt;P&gt;If you use Column, instead of As Column, do you get what you want? I don't actually see under what situation, one has to use As Column, rather than Column. Maybe, one of my colleagues who has more knowledge about this function can comment.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 02:43:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483305#M72765</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2022-05-01T02:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483400#M72779</link>
      <description>&lt;P&gt;Column does the same thing as As Column, it fills in the information except for the Y:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lisamaley_0-1651444765460.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42152iD05153BA5E3DB14E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lisamaley_0-1651444765460.png" alt="lisamaley_0-1651444765460.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 22:39:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483400#M72779</guid>
      <dc:creator>lisamaley</dc:creator>
      <dc:date>2022-05-01T22:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483404#M72782</link>
      <description>&lt;P&gt;Would you please double check your script? I don't see how to get to the dialog that you show here.&lt;/P&gt;
&lt;P&gt;I got an error message:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1651452575263.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42153i0807CB3BBEA75A6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1651452575263.png" alt="peng_liu_0-1651452575263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If I move Eval(PH) to the bottom of your script, and change As Column to Column, then I don't see the Fit Model dialog at all.&lt;/P&gt;
&lt;P&gt;BTW, I use Rats.jmp to test. "days" to Y, "Censor" to Censor, "Group" to Grouping.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 00:52:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483404#M72782</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2022-05-02T00:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483408#M72784</link>
      <description>&lt;P&gt;I know, I got the same thing where the fit model did not come up, if I moved Eval(PH) to the bottom, which is why I moved it where I did. &amp;nbsp;I also got the same error with Rats, but not this error with my files, not sure why. &amp;nbsp;If I take out the Expression and just let it run like this, then the error goes away and I get the same problem as before, without Expr(PH) is pasted below the screen shot, the other columns come through, but not the Y. &amp;nbsp;This script is correct and my most recent. &amp;nbsp;If you have any ideas, please let me know! &amp;nbsp;This is very frustrating for me and I have no idea of why!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lisamaley_0-1651458361947.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42154iC8156C9E8E746E79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lisamaley_0-1651458361947.png" alt="lisamaley_0-1651458361947.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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 );
Clear Log();
dt = Current Data Table();

If( Not( Is Scriptable( dt ) ),
	dtsel = Pick File( "Open File", {"JMP|jmp", "All files|*"} );
	If( dtsel == "",
		Stop(),
		Try( dt = Open( dtsel ), Stop() )
	);
);


dtname = Data Table( dt ) &amp;lt;&amp;lt; Get Name;
validated = 0;

New Window( "Survival/Reliability",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;On Validate(
		survival = {};
		Insert Into( survival, Substitute( olb[List Box Box( 2 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Y() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 3 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Grouping() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 4 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Censor() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 5 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Freq() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 6 )] &amp;lt;&amp;lt; Get Items, {}, Expr( By() ) ) );
		Insert Into( survival, Insert( Expr( Censor Code() ), olb[Number Edit Box( 1 )] &amp;lt;&amp;lt; Get ) );
		
		Insert Into( survival, Insert( Expr( Plot failure instead of Survival() ), olb[Check Box Box( 1 )] &amp;lt;&amp;lt; Get ) );
		survival expr = Expr( Send( dt ) );
		Insert Into( survival expr, Substitute( survival, {}, Expr( Survival() ) ) );
		obj = survival expr;
		obj &amp;lt;&amp;lt; Save Estimates;
		validated = 1;
	),
	olb = Outline Box( "",
		dt &amp;lt;&amp;lt; Survival(
			Failure Plot( 1 ),
			Show Points( 1 ),
			Show Shaded Simultaneous CI( 1 ),
			Show Simultaneous CI( 1 ),
			Weibull Plot( 1 ),
			Weibull Fit( 1 )
			
		)
	)
);

If( !validated, Stop() );


dt2 = Data Table( dtname || " Survival" );
columnnamegroup = Column( dt2, 1 ) &amp;lt;&amp;lt; Get Name;
GroupID = Associative Array( Column( dt2, 1 ) ) &amp;lt;&amp;lt; Get Keys;
Show( GroupID );

n = N Items( GroupID );

Show( n );

Current Data Table( dt2 );
dt2 &amp;lt;&amp;lt; select where( As Column( columnnamegroup ) == "Combined" );
dt2 &amp;lt;&amp;lt; hide and exclude;
dt2 &amp;lt;&amp;lt; Clear Select;

Graph Builder(
	Variables( X( :"log(Time)"n ), Y( :"log(-log(Surv))"n ), Overlay( As Column( columnnamegroup ) ) ),
	Elements( Points( X, Y, Legend( 17 ) ), Line Of Fit( X, Y, Legend( 18 ) ) ),
	SendToReport(
		Dispatch(
			{}, "400", ScaleBox, 
			//{Legend Model(
			//	17,
			//	Base( 0, 0, 0, Item ID( "Op1", 1 ) ),
			//	Base( 1, 0, 0, Item ID( "Op2", 1 ) ),
			//	Base( 2, 0, 0, Item ID( "Op3", 1 ) )
			//)}
		)
	)
);



Ycolname = Arg( survival[1], 1 );
Effectname = Arg( survival[2], 1 );
Censorname = Arg( survival[3], 1 );
Freqname = Arg( survival[4], 1 );
Byname = Arg( survival[5], 1 );
CensorCodename = Arg( survival[6], 1 );

Show( Ycolname );

Current Data Table( dt );


Platform = dt &amp;lt;&amp;lt; Fit Model(
		//	Freq(),
	//	By(),
	Y( As Column( Ycolname ) ),
	Censor( As Column( Censorname ) ),
	Effects( As Column( Effectname ) ),
	Personality( "Proportional Hazard" ),
	Censor Code( "1" ),
	Run Model( Likelihood Ratio Tests( 1 ), Likelihood Confidence Intervals( 1 ), Risk Ratios( 1 ) ) 

);	&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 May 2022 02:27:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483408#M72784</guid>
      <dc:creator>lisamaley</dc:creator>
      <dc:date>2022-05-02T02:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483463#M72793</link>
      <description>&lt;P&gt;I cannot reproduce the problem if I change As Column to Column. Here is the full codes that I run. I just changed the last three As Column to Column.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Log();
dt = Current Data Table();

If( Not( Is Scriptable( dt ) ),
	dtsel = Pick File( "Open File", {"JMP|jmp", "All files|*"} );
	If( dtsel == "",
		Stop(),
		Try( dt = Open( dtsel ), Stop() )
	);
);


dtname = Data Table( dt ) &amp;lt;&amp;lt; Get Name;
validated = 0;

New Window( "Survival/Reliability",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;On Validate(
		survival = {};
		Insert Into( survival, Substitute( olb[List Box Box( 2 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Y() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 3 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Grouping() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 4 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Censor() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 5 )] &amp;lt;&amp;lt; Get Items, {}, Expr( Freq() ) ) );
		Insert Into( survival, Substitute( olb[List Box Box( 6 )] &amp;lt;&amp;lt; Get Items, {}, Expr( By() ) ) );
		Insert Into( survival, Insert( Expr( Censor Code() ), olb[Number Edit Box( 1 )] &amp;lt;&amp;lt; Get ) );
		
		Insert Into( survival, Insert( Expr( Plot failure instead of Survival() ), olb[Check Box Box( 1 )] &amp;lt;&amp;lt; Get ) );
		survival expr = Expr( Send( dt ) );
		Insert Into( survival expr, Substitute( survival, {}, Expr( Survival() ) ) );
		obj = survival expr;
		obj &amp;lt;&amp;lt; Save Estimates;
		validated = 1;
	),
	olb = Outline Box( "",
		dt &amp;lt;&amp;lt; Survival(
			Failure Plot( 1 ),
			Show Points( 1 ),
			Show Shaded Simultaneous CI( 1 ),
			Show Simultaneous CI( 1 ),
			Weibull Plot( 1 ),
			Weibull Fit( 1 )
			
		)
	)
);

If( !validated, Stop() );


dt2 = Data Table( dtname || " Survival" );
columnnamegroup = Column( dt2, 1 ) &amp;lt;&amp;lt; Get Name;
GroupID = Associative Array( Column( dt2, 1 ) ) &amp;lt;&amp;lt; Get Keys;
Show( GroupID );

n = N Items( GroupID );

Show( n );

Current Data Table( dt2 );
dt2 &amp;lt;&amp;lt; select where( As Column( columnnamegroup ) == "Combined" );
dt2 &amp;lt;&amp;lt; hide and exclude;
dt2 &amp;lt;&amp;lt; Clear Select;

Graph Builder(
	Variables( X( :"log(Time)"n ), Y( :"log(-log(Surv))"n ), Overlay( As Column( columnnamegroup ) ) ),
	Elements( Points( X, Y, Legend( 17 ) ), Line Of Fit( X, Y, Legend( 18 ) ) ),
	SendToReport(
		Dispatch(
			{}, "400", ScaleBox, 
			//{Legend Model(
			//	17,
			//	Base( 0, 0, 0, Item ID( "Op1", 1 ) ),
			//	Base( 1, 0, 0, Item ID( "Op2", 1 ) ),
			//	Base( 2, 0, 0, Item ID( "Op3", 1 ) )
			//)}
		)
	)
);



Ycolname = Arg( survival[1], 1 );
Effectname = Arg( survival[2], 1 );
Censorname = Arg( survival[3], 1 );
Freqname = Arg( survival[4], 1 );
Byname = Arg( survival[5], 1 );
CensorCodename = Arg( survival[6], 1 );

Show( Ycolname );

Current Data Table( dt );


Platform = dt &amp;lt;&amp;lt; Fit Model(
		//	Freq(),
	//	By(),
	Y(  Column( Ycolname ) ),
	Censor(  Column( Censorname ) ),
	Effects(  Column( Effectname ) ),
	Personality( "Proportional Hazard" ),
	Censor Code( "1" ),
	Run Model( Likelihood Ratio Tests( 1 ), Likelihood Confidence Intervals( 1 ), Risk Ratios( 1 ) ) 

);	&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here are my steps and what I saw. I have checked JMP14, JMP15, and JMP16. I believe your version is not further back due to how your codes use new name literals.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open Rats.jmp&lt;/LI&gt;
&lt;LI&gt;Run the script&lt;/LI&gt;
&lt;LI&gt;Specify the dialog when it pops up, then click OK&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1651499317582.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42157iB0130B831620A4B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1651499317582.png" alt="peng_liu_0-1651499317582.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Some reports show up. And this is the Fit Model launch dialog looks like:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_1-1651499389656.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42158i357CBDF8AA3E5693/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_1-1651499389656.png" alt="peng_liu_1-1651499389656.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you cannot see what I am seeing here, I can only suspect there is something that neither of us are aware of. If so, you may want to contact &lt;A href="mailto:support@jmp.com" target="_blank"&gt;support@jmp.com&lt;/A&gt; to get some help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 13:53:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483463#M72793</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2022-05-02T13:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483474#M72797</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;I know I tried this and it did not work for me, but when I &amp;nbsp;pasted your code it worked perfectly. &amp;nbsp;I have no idea of why, but it works so THANK YOU!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 02 May 2022 17:30:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483474#M72797</guid>
      <dc:creator>lisamaley</dc:creator>
      <dc:date>2022-05-02T17:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483975#M72836</link>
      <description>&lt;P&gt;Did you have any suggestions on my second question?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if they do not enter a by or frequency column, how do I tell the fit model that there is not a column to enter. &amp;nbsp;If I use Column (variable) it says it cannot find my column, which is right.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 18:53:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/483975#M72836</guid>
      <dc:creator>lisamaley</dc:creator>
      <dc:date>2022-05-03T18:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/484111#M72844</link>
      <description>&lt;P&gt;I am not sure that I understand the problem. Here is what I have tried and seen.&lt;/P&gt;
&lt;P&gt;I first modify Rats.jmp to mock up a case so I can test your codes:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1651666684248.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42222i4B30467940028195/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1651666684248.png" alt="peng_liu_0-1651666684248.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I added a column By and evenly split the data into two groups.&lt;/P&gt;
&lt;P&gt;I modified the last piece of your codes to the following.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
if (isempty(byname), 
	Platform = dt &amp;lt;&amp;lt; Fit Model(
			//	Freq(),
			//	By(),
		Y(  Column( Ycolname ) ),
		Censor(  Column( Censorname ) ),
		Effects(  Column( Effectname ) ),
		Personality( "Proportional Hazard" ),
		Censor Code( "1" ),
		Run Model( Likelihood Ratio Tests( 1 ), Likelihood Confidence Intervals( 1 ), Risk Ratios( 1 ) ) 

	),
	Platform = dt &amp;lt;&amp;lt; Fit Model(
			//	Freq(),
		By( column(byname) ),
		Y(  Column( Ycolname ) ),
		Censor(  Column( Censorname ) ),
		Effects(  Column( Effectname ) ),
		Personality( "Proportional Hazard" ),
		Censor Code( "1" ),
		Run Model( Likelihood Ratio Tests( 1 ), Likelihood Confidence Intervals( 1 ), Risk Ratios( 1 ) ) 

	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tried two paths to execute the codes:&lt;/P&gt;
&lt;P&gt;First, run the code and enter roles as follows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_1-1651666859134.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42223iC2FED0913CEB7D40/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_1-1651666859134.png" alt="peng_liu_1-1651666859134.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;No "By". and the behavior of the codes is as what was before.&lt;/P&gt;
&lt;P&gt;Second, run the code and enter roles as follows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_2-1651666940618.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42224i96538A796045FE14/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_2-1651666940618.png" alt="peng_liu_2-1651666940618.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With "By", and I see an error message in the end:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_3-1651666971365.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42225i6CF61DF7ACEB8AA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_3-1651666971365.png" alt="peng_liu_3-1651666971365.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I guess the intermediate results are different, and your codes have not handled the situation correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 12:23:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/484111#M72844</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2022-05-04T12:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Y Response Variable Fit Model Proportional Hazards</title>
      <link>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/484209#M72857</link>
      <description>&lt;P&gt;Thanks for your guidance, you have been extremely helpful!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem was - &amp;nbsp;if on the first screen there was no column put into frequency,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freqname = &lt;SPAN&gt;Arg&lt;/SPAN&gt;( survival[&lt;SPAN&gt;4&lt;/SPAN&gt;], &lt;SPAN&gt;1 &lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would would return as empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if I tried to run the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Platform = dt &amp;lt;&amp;lt; &lt;SPAN&gt;Fit Model&lt;/SPAN&gt;(&lt;/P&gt;&lt;P&gt;Freq( &lt;SPAN&gt;Column&lt;/SPAN&gt;( Freqname ) ),&lt;/P&gt;&lt;P&gt;By( &lt;SPAN&gt;Column&lt;/SPAN&gt;( Byname ) ),&lt;/P&gt;&lt;P&gt;Y( &lt;SPAN&gt;Column&lt;/SPAN&gt;( Ycolname ) ),&lt;/P&gt;&lt;P&gt;Censor( &lt;SPAN&gt;Column&lt;/SPAN&gt;( Censorname ) ),&lt;/P&gt;&lt;P&gt;Effects( &lt;SPAN&gt;Column&lt;/SPAN&gt;( Effectname ) ),&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Personality( &lt;/SPAN&gt;"Proportional Hazard"&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Censor Code( &lt;SPAN&gt;"1"&lt;/SPAN&gt; ),&lt;/P&gt;&lt;P&gt;Run Model( Likelihood Ratio Tests( &lt;SPAN&gt;1 &lt;/SPAN&gt;), Likelihood Confidence Intervals( &lt;SPAN&gt;1 &lt;/SPAN&gt;), Risk Ratios( &lt;SPAN&gt;1 &lt;/SPAN&gt;) )&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;It would say there is not column for frequency, which was true.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I did was to put 8 nested if loops looking to see which columns were empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not exactly the best way maybe, but it worked.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 16:48:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Missing-Y-Response-Variable-Fit-Model-Proportional-Hazards/m-p/484209#M72857</guid>
      <dc:creator>lisamaley</dc:creator>
      <dc:date>2022-05-04T16:48:40Z</dc:date>
    </item>
  </channel>
</rss>

