Subscribe Bookmark RSS Feed

parameters from variables

peder

Community Trekker

Joined:

Jul 27, 2013

Hi all,

I would like to enter parameters for a distribution plot from a variable. But I can't seem to do it right.

It is in the Tolerance Interval line where I'd like to enter the Proportion value.

I have tried the eval() function, but no luck yet.

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

ppm=1-2*3.4E-6;

Distribution(
Continuous Distribution(
  Column( :height ),
  Tolerance Interval( Alpha( 0.95 ), Proportion( 0.9999932 ), Upper ) // <- Here I want to enter the variable ppm instead of a number
)
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Not sure this is the optimum combination of eval, expr etc, but it works:

dt = Open( "$sample_data/Big Class.jmp" );

ppm = 1 - 2 * 3.4E-6;

dist_expr = Expr(

     Distribution(

           Continuous Distribution(

                Column( :height ),

                Tolerance Interval( Alpha( 0.95 ), Proportion( Expr( ppm ) ), Upper )

           )

     )

);

Eval( Eval Expr( dist_expr ) );

2 REPLIES
Solution

Not sure this is the optimum combination of eval, expr etc, but it works:

dt = Open( "$sample_data/Big Class.jmp" );

ppm = 1 - 2 * 3.4E-6;

dist_expr = Expr(

     Distribution(

           Continuous Distribution(

                Column( :height ),

                Tolerance Interval( Alpha( 0.95 ), Proportion( Expr( ppm ) ), Upper )

           )

     )

);

Eval( Eval Expr( dist_expr ) );

peder

Community Trekker

Joined:

Jul 27, 2013

Thank you! It works very well.