cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Hauskov
Level I

Using variables i JSL

Hi

 

I'm new to jsl but have a hard time understanding how it deals with variables. In the example below I define an LSL and alpha-value. It seems arbitrary to me, when jmp will use the defined variables and when it won't. 

  • It has no problem using myLSL in Process Capability
  • It wont use myAlpha under Tolerance Interval. Instead, it will use the default value (but does not throw an error saying e.g. that the variable is unknown). If I put in a value directly, it works, but I want to be able to define a variable that I can then reference throughout the script. 

Can someone help explain this to a novice jsl user? Or provide a relevant reference. Thank you!

 

 

myLSL = 2.1; myAlpha = 0.8;

// Distribution and Tolerance Interval
Current Data Table(dt);
Distribution(
	Continuous Distribution(
		Column("ColumnName"),
		Fit Distribution( Normal( Spec Limits( LSL( myLSL ) ) ) ),
		Process Capability( LSL( myLSL ), Target( . ), USL( . ) ),
		Tolerance Interval(
			Alpha( myAlpha ),
			Proportion( 0.90 ),
			Lower,
			Parametric Normal
		)
	),
);

 

 

 

3 REPLIES 3

Re: Using variables i JSL

There remains inconsistencies in whether arguments can be variables or they must be literals. The Alpha() argument takes a literal argument. So you must substitute the value in the variable into the expression to make it literal.

 

Names Default to Here( 1 );

// example data set
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

myLSL = 50; myAlpha = 0.8;

// Distribution and Tolerance Interval
dist = dt << Distribution(
	Continuous Distribution(
		Column( :height ),
		Fit Normal( Process Capability( LSL( myLSL ), Target( . ), USL( . ) ) )
	)
);

Eval(
	Substitute(
		Expr(
			dist << Tolerance Interval(
				Alpha( aaa ),
				Proportion( 0.9 ),
				Lower,
				Parametric Normal
			)		),
		Expr( aaa ), myAlpha
	)
);
Craige_Hales
Super User

Re: Using variables i JSL

@Audrey_Shull 

Craige

Re: Using variables i JSL

Thank you for reporting this issue. JMP still has some inconsistencies regarding evaluation of JSL variables. However I can confirm that, in our next available release of JMP 16.1, the tolerance interval for Process capability will evaluate a variable for the alpha argument.