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
- :
- Scripting error: "Control limits out of order: must be LCL<=Avg<=UCL" - BUT: LCL...

Topic Options

- Start Article
- 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

Feb 25, 2014 6:10 AM
(4647 views)

Hi everyone,

I'm brand new to the JMP scripting (now doing it for 2 days). I have absolutely no idea about statistics, which makes the job harder.

Anyway, for my colleagues I'm creating a script that puts the test results in a graph and displays the limits on it. For some graphs, this works perfectly, but some give the error:

Error for Control Chart on data table Averages Table 2: Control limits out of order: must be LCL<=Avg<=UCL

I have checked the limits (LCL and UCL) and calculated the Mean(<ColumnName>). The outcome is that LCL <= Mean <= UCL. So I don't know what is happening and why it is failing.

since LCL<=Mean<=UCL fits, there will probably be a statistical difference between Mean and Average. Can someone please explain this to me?

If this is not the case, why do I get this error? There are no NULL-values in the table used to create the chart. The error seems to come from this part of the script:

ch = Control Chart(

Group Size( 1 ),

KSigma( K_Sigma ),

Chart Col(

AvgTableColumnNames*,*

Individual Measurement(

LCL( As Column( dt3, AvgTableColumnNames* )[1] ), *

UCL( As Column( dt3, AvgTableColumnNames* )[2] ) *

)

),

SendToReport( Dispatch({},

"2",

ScaleBox,

{Format( "Fixed Dec", 12, 0 ), Min( LowerBoundery ),

Max( UpperBoundery ), Inc( 1 ), Minor Ticks( 0 )}))

);

Eval( Substitute( Name Expr( ch ), Expr( LowerBoundery ), LowerBoundery ) );

Eval( Substitute( Name Expr( ch ), Expr( UpperBoundery ), UpperBoundery ) );

I'm sure the variables used have the correct values (I showed them in the log). So please can someone tell me whats going on...

Thanx!

Best regards,

J.

1 ACCEPTED SOLUTION

Accepted Solutions

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

Thx for the reply. I needed it to work so I changed the entire setup. Now I get my limits from a table and it works. The only downside is that I open the same table twice, once to use the table and once to save and close it. It seems If I give an open table to the Get Limits function the limits are not collected:

ch = Control Chart(

Sample Label( :MyColumn ), // X-axis

Chart Col( AvgTableColumnNames* , Individual Measurement ), // Chart data (y-axis), Chart type*

Get Limits( "c:\temp\limits.jmp" )

4 REPLIES 4

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

Re: Scripting error: "Control limits out of order: must be LCL<=Avg<=UCL" - BUT: LCL<=Avg<=UCL...

If I remove the fixed control limits (LCL and UCL) from Individual Measurement, I get all the charts (with auto-calculated control limits). No errors... However, I want to display the company's control limits not the one that JMP thinks I should use...

Could there be an error if the fixed limits differ too much from the calculated limits?

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

Re: Scripting error: "Control limits out of order: must be LCL<=Avg<=UCL" - BUT: LCL<=Avg<=UCL...

Still having problems setting manual limits:

Error for Control Chart on data table LimitsDB: Control limits out of order: must be LCL<=Avg<=UCL

ColMinValue = 0.00756999989971519;

ColMaxValue = 0.104999996721745;

LimMinValue = 0;

LimMaxValue = 0.91;

According to me:

0.008 (Column minimum) > 0 (Lower limit) AND

0.1 (Column maximum) < 0.9 (Upper limit)

The avg should ly between the highest column value and the lowest column value.

According to JMP, this is not the case???? Please help.

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

Re: Scripting error: "Control limits out of order: must be LCL<=Avg<=UCL" - BUT: LCL<=Avg<=UCL...

What happens when you run this (where :Y is one of the columns you are charting and the lower and upper control limits are 0 and 0.9?)

lclVal = 0;

uclVal = 0.9;

Control Chart(

Group Size( 1 ),

KSigma( 3 ),

Chart Col(

:Y,

Individual Measurement(

LCL( lclVal ),

UCL( uclVal )

)

)

);

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

Thx for the reply. I needed it to work so I changed the entire setup. Now I get my limits from a table and it works. The only downside is that I open the same table twice, once to use the table and once to save and close it. It seems If I give an open table to the Get Limits function the limits are not collected:

ch = Control Chart(

Sample Label( :MyColumn ), // X-axis

Chart Col( AvgTableColumnNames* , Individual Measurement ), // Chart data (y-axis), Chart type*

Get Limits( "c:\temp\limits.jmp" )