Subscribe Bookmark RSS Feed

JSL New Formula Column

joeldomo

Community Trekker

Joined:

Aug 20, 2014

Hi, 

How do i script these keyclicks. With a numeric column, right click to access 'New Formula Column' -> 'Distributional'->'Johnson Normalizing'

 

What is the basic rule to script these options in the GUI? If i can be directed to a documentations that would be great! Thanks 

 

-Rgds, Joel

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

New Formula Column is not function that has been added to JSL. That is, as far as I can see.  How I would get what you are asking for, is to use the Distribution Platform to generate the new column

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO ) );
obj << Fit Distribution( JohnsonSu( Save Transformed ) );
obj << Close Window;

The pointer to the documentation for this is:

     Help==>Scripting Index==>Distribution==>Fit Distribution==>Save Transformed

Jim
4 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

New Formula Column is not function that has been added to JSL. That is, as far as I can see.  How I would get what you are asking for, is to use the Distribution Platform to generate the new column

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO ) );
obj << Fit Distribution( JohnsonSu( Save Transformed ) );
obj << Close Window;

The pointer to the documentation for this is:

     Help==>Scripting Index==>Distribution==>Fit Distribution==>Save Transformed

Jim
joeldomo

Community Trekker

Joined:

Aug 20, 2014

Hi txnelson,

Thanks. I'm ok with the added overhead of a distribution plots to get what i want if there is no direct access to the 'save transformed' clicks as in the gui.
pmroz

Super User

Joined:

Jun 23, 2011

Another way to get at the scripting for this function is:

 

1. Perform the operation manually on the table (i.e. New Formula Column' -> 'Distributional'->'Johnson Normalizing)

2. Click the red triangle next to the table name and select Copy Table Script

3. Open up a script window and paste the script in

4. Scroll down to the bottom and you'll see something like this (using the Cities.jmp dataset as an example)

	New Column( "Johnson Su[CO]",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula(
			ArcSinH( (:CO - 3.46504509514207) / 2.33960293388985 ) *
			1.77414644201164 + (-2.38210320696422)
		)
	),

So, if you want to script this separately you can say

dt = open("$sample_data/Cities.jmp");

dt << New Column( "Johnson Su[CO]", Numeric, "Continuous",
		Format( "Best", 12 ),
		Formula(
			ArcSinH( (:CO - 3.46504509514207) / 2.33960293388985 ) *
			1.77414644201164 + (-2.38210320696422)
		)
	);
joeldomo

Community Trekker

Joined:

Aug 20, 2014

Hi Pmroz, 

 

I got your points. Because of data volume, it should be more productive for me to script what i can. I'm interested in the transform formula and getting it by '<<get formula' with the objective of applying it to do back transformation to my volume data.