Hello Community,
I had asked a related question to this yesterday and got great answers. However, I ran into problems when trying to implement the solution. After spending countless hours, I am asking for more help.
Here is the scenario.
I have a data table (attached) with the following columns and rows:
1. I would like to loop through each column at a time starting from column "fruit" and plot a Logistic plot by "location" and send the output to a journal.
2. I would like to completely remove the summary statistics which come with the plots using JSL.
I can do step 1 with no issues. Below is my code:
dt=open("$\fruit_drink.jmp");
colList = dt << Get Column Names();
For( i = 3, i <= Nitems( colList ), i++,
obj = Logistic(
Y( colList[i] ),
X( :Day ),
By( :location),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 35.2151394422311 )} ),
Dispatch(
{},
"FitNom Plot",
FrameBox,
{Marker Size( 4 ), Row Legend(
colList[i],
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Standard" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
obj << journal;
);
I get this output (there are more graphs with summary statistics, I just can't fit all of them here):
I tried to implement the following solution to remove the statistics (based on previous help I received from the JMP community).
dt=open("$\fruit_drink.jmp");
colList = dt << Get Column Names();
For( i = 3, i <= Nitems( colList ), i++,
obj = Logistic(
Y( colList[i] ),
X( :Day ),
By( :location),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 35.2151394422311 )} ),
Dispatch(
{},
"FitNom Plot",
FrameBox,
{Marker Size( 4 ), Row Legend(
colList[i],
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Standard" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
obj << journal;
jrn = New Window( "The Journal", <<journal );
For( i = 1, i <= N Items( obj ), i++,
obj[i] << journal;);
obj << close window;
For( i = 1, i <= N Items( obj ), i++,
jrn["Iterations"] << delete;
jrn["Whole Model Test"] << delete;
jrn["Parameter Estimates"] << delete;);
);
When I run this script, I get an infinite loop and had to terminate JMP. When I put the inner for loops on the outside, nothing happens, the summary statistics do not get removed.
Can someone help me?
Thanks.