BookmarkSubscribeSubscribe to RSS Feed
peder

Community Trekker

Joined:

Jul 27, 2013

parameters from variables

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
pmroz

Super User

Joined:

Jun 23, 2011

Solution

Re: parameters from variables

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
pmroz

Super User

Joined:

Jun 23, 2011

Solution

Re: parameters from variables

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

Re: parameters from variables

Thank you! It works very well.