Subscribe Bookmark RSS Feed

JMP Scripting Save(Standardized) from One Way

craig_bernier

Community Trekker

Joined:

Feb 9, 2015

I am running a one way ANOVA via Ft Y by X.  Then I want to save the standardized values to a column which can easily be done by right clicking the red triangle.

I would really want to automate the Save(Standardized) by adding it to the script:

Oneway( Y( :Y ), X( :X ) )

I have been browsing through information on this the last couple days but am stuck at this point.  Does anyone have any guidance?

Thanks in advance,

Craig Bernier

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Craig,

You can use the Save Standardized(1) option in the Oneway call or send it as a message to the platform object (after the platform call). See code below.

Hope that helps,

Michael

dt = open( "$SAMPLE_DATA/Big Class.jmp" );

Oneway( Y( :height ), X( :sex ), Save Standardized( 1 ) );

//OR:

ow = dt << Oneway( Y( :height ), X( :sex ) );

ow << Save Standardized( 1 );

Michael Crotty
Sr Statistical Writer
JMP Development
3 REPLIES
Solution

Hi Craig,

You can use the Save Standardized(1) option in the Oneway call or send it as a message to the platform object (after the platform call). See code below.

Hope that helps,

Michael

dt = open( "$SAMPLE_DATA/Big Class.jmp" );

Oneway( Y( :height ), X( :sex ), Save Standardized( 1 ) );

//OR:

ow = dt << Oneway( Y( :height ), X( :sex ) );

ow << Save Standardized( 1 );

Michael Crotty
Sr Statistical Writer
JMP Development
craig_bernier

Community Trekker

Joined:

Feb 9, 2015

Michael,

Yes I got the first approach to work no problem.

The second way is not as familiar to me in the way you, I think, 'define' the data table dt.  But I will look at it further for my understanding.

In any case, you have answered the question I had.  Thaks a lot.

Craig

michael_jmp

Staff

Joined:

Jun 23, 2011

Craig,

Glad that you are able to get one of the approaches to work for your situation. I'm not really sure if there's much difference in performance between the two approaches or not.

However, I'll elaborate on the dt reference just a bit. So, dt is a JSL variable that is a reference to the data table Big Class. This allows you to refer to the data table later on in your script. (This is useful, because otherwise you would have to rely on referring to it by name or relying on the data table of interest being the current data table. Both of these approaches are less reliable than using a variable to reference the data table, in my opinion.)

In the first approach in my first response, I could have added dt << before the Oneway() call. The << is called the "Send" operator; its purpose is to send a message to a JSL object. In this case, dt is the object, a data table, and we are sending it the Oneway() platform call. This allows you to explicitly run Oneway on the data table dt, rather than relying on dt being the current data table.

In the second line of the second approach, the Send operator is used again. This time, we are sending the Save Standardized(1) message to the ow object, which is a Oneway object that was created as a reference to the Oneway platform created in the line above.

Regards,
Michael

Michael Crotty
Sr Statistical Writer
JMP Development