Missing Y Response Variable Fit Model Proportional HazardsI am trying to do some Survival analysis, where I am combining some analysis into one script. 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. My script works great except for the Y, response, it will not find the Y response variable. If I change Y( As Column( Ycolname ) ), to something like Y("Time to Failure"), it works great. But when I try to use the variable, it does not work.
</CODE></P><P>I have two questions - why does my method work for Censor and the Xs, but not the Ys.</P><P>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. If I use As Column (variable) it says it cannot find my column, which is right.</P><P> </P><P> </P><P> </P><PRE><CODE class=" language-jsl">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 ) << Get Name;
validated = 0;
New Window( "Survival/Reliability",
<<MODAL></MODAL>
AnalyticsmacOSScriptingRe: Missing Y Response Variable Fit Model Proportional HazardsIf 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.
Re: Missing Y Response Variable Fit Model Proportional HazardsColumn does the same thing as As Column, it fills in the information except for the Y:

Re: Missing Y Response Variable Fit Model Proportional HazardsWould you please double check your script? I don't see how to get to the dialog that you show here.
I got an error message:

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.
BTW, I use Rats.jmp to test. "days" to Y, "Censor" to Censor, "Group" to Grouping.
Re: Missing Y Response Variable Fit Model Proportional HazardsI 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. I also got the same error with Rats, but not this error with my files, not sure why. 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. This script is correct and my most recent. If you have any ideas, please let me know! This is very frustrating for me and I have no idea of why!

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 ) << Get Name;
validated = 0;
New Window( "Survival/Reliability",
<<MODAL></MODAL>