Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- I have a script that runs perfectly in JMP 12.0 but it doesn't work properly wi...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jul 1, 2015 4:23 PM
(3741 views)

The following script works perfectly in JMP 11 and JMP 12.0, but it only produces blank report windows in JMP 12.1 and JMP 12.1 Pro:

dt = Current Data Table();

nco = n col(dt);

modelscript = dt << Get Property("Model");

Insert Into(modelscript,Expr(Run));

obj = Eval(modelscript);

obj << Residuals();

obj << close window;

ncf = n col(dt);

rc = ncf - nco;

for (idx = ncf,idx>nco,idx--,

ColName = Column(idx) << Get Name;

Distribution(

Column( Eval(ColName) ),

Quantiles( 0 ),

Summary Statistics( 0 ),

Histogram( 0 ),

Outlier Box Plot( 0 ),

Normal Quantile Plot( 1 ),

SendToReport(

Dispatch(

{},

"Distributions",

OutlineBox,

{Set Title( "Normal Probability Plot" )}

)

)

);

);

for (idx = ncf,idx>nco,idx--,

dt<<delete column(idx); // delete residual columns

);

The problem appears to be with the line in red. If I explicitly name a column, it works correctly.

Does anyone know what tI can do to make this script run in JMP 12.1?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jul 2, 2015 11:01 AM
(5900 views)
| Posted in reply to message from Craige_Hales 07/02/2015 01:04 PM

Thank you for looking at this, Craig.

I tried your advice but it did not help. After a lot of playing around I discovered that JMP 12.1 does not allow the plots to exist after the data columns are deleted. I journaled the plots and then closed the original windows to solve the problem.

For anyone who is interested, this script works:

for (idx = ncf,idx>nco,idx--,

np = Expr(

CName = Column Name(idx);

Distribution(

Continuous Distribution(

Column( CName ),

Quantiles( 0 ),

Summary Statistics( 0 ),

Histogram( 0 ),

Outlier Box Plot( 0 ),

Normal Quantile Plot( 1 ),

SendToReport(

Dispatch(

{},

"Distributions",

OutlineBox,

{Set Title( "Normal Probability Plot" )}

),

)

);

);

);

np = Eval(np);

jour = np << Get Journal;

New Window("Normal Probability Plot", Journal Box(jour));

np << Close Window;

);

for (idx = ncf,idx>nco,idx--,

dt<<delete column(idx); // delete residual columns

);

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

try adding an explicit data table: ColName = Column( **dt,** idx) << Get Name;

If it is still a problem, print the value in ColName after the assignment, before the Distribution and see what's wrong.

Craige

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jul 2, 2015 11:01 AM
(5901 views)
| Posted in reply to message from Craige_Hales 07/02/2015 01:04 PM

Thank you for looking at this, Craig.

I tried your advice but it did not help. After a lot of playing around I discovered that JMP 12.1 does not allow the plots to exist after the data columns are deleted. I journaled the plots and then closed the original windows to solve the problem.

For anyone who is interested, this script works:

for (idx = ncf,idx>nco,idx--,

np = Expr(

CName = Column Name(idx);

Distribution(

Continuous Distribution(

Column( CName ),

Quantiles( 0 ),

Summary Statistics( 0 ),

Histogram( 0 ),

Outlier Box Plot( 0 ),

Normal Quantile Plot( 1 ),

SendToReport(

Dispatch(

{},

"Distributions",

OutlineBox,

{Set Title( "Normal Probability Plot" )}

),

)

);

);

);

np = Eval(np);

jour = np << Get Journal;

New Window("Normal Probability Plot", Journal Box(jour));

np << Close Window;

);

for (idx = ncf,idx>nco,idx--,

dt<<delete column(idx); // delete residual columns

);