We’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
jan_solo
Level III

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

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
Highlighted
jan_solo
Level III

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

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" )

View solution in original post

4 REPLIES 4
Highlighted
jan_solo
Level III

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?

Highlighted
jan_solo
Level III

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.

Highlighted
mpb
Super User mpb
Super User

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 )

                                )

                )

);

Highlighted
jan_solo
Level III

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

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" )

View solution in original post