カスタム分位数の変数の使用方法親愛なるコミュニティ、
私はしばらくの間苦労していて、以下のハードコードされた値0.95と0.99をアプリケーションの変数に置き換える方法を探していました。
Continuous Distribution(
Column( Eval( colSelect ) ),
Horizontal Layout( 0 ),
Histogram( 0 ),
Vertical( 0 ),
Std Error Bars( 1 ),
Count Axis( 1 ),
Show Percents( 1 ),
Show Counts( 1 ),
Axes on Left( 1 ),
Outlier Box Plot( 0 ),
Set Bin Width( 1 ),
Custom Quantiles( <FONT color="#339966"><STRONG>0.95, [0.95, 0.99]</STRONG></FONT> ),
<EM>// Custom Quantiles( <FONT color="#FF0000">( Eval( Percent1 ) /100 ), [( Eval( Percent1 ) /100 ), ( Eval( Percent2 ) /100 )]</FONT> ),</EM> Customize Summary Statistics(
Std Err Mean( 0 ),
Upper Mean Confidence Interval( 0 ),
Lower Mean Confidence Interval( 0 ),
Minimum( 1 ),
Maximum( 1 )
)
),
このダイアログスクリプトには、分析対象の列を含む一連のカスタム変数が付属しています( " colSelect ") 、および2つのパーセンタイル値。これらはすべて適切に取得されます(Show()、同じスクリプトの前半):
dt = DataTable("Dep0Times_Overall_IST5000");<BR />colSelect = "Total Time From Entrance Queue To First Pre-Sortation";<BR />Percent1 = 95;
Percent2 = 99;Eval()メソッドを使用して、または使用せずに上記の赤い線を試しても、以下と同じ厄介なエラーが発生します。
Invalid matrix token.
Line 50 Column 49: ...val( Percent1 ) /100 ), [►( Eval( Percent1 ) /100 )...
ありがとう!
スクリプティングRe:カスタム分位数の変数の使用方法パーセント値はマトリックス内の要素です。分布の前にマトリックスを作成する場合、それを使用するのは単純な置換です。
Names Default To Here( 1 );
dt = open("$SAMPLE_DATA/big class.jmp");
colSelect = "height";
percent1 = .95;
percent2 = .99;
perMatrix = Matrix( percent1 ) || Matrix( percent2 );
distribution(
Continuous Distribution(
Column( Eval( colSelect ) ),
Horizontal Layout( 0 ),
Histogram( 0 ),
Vertical( 0 ),
Std Error Bars( 1 ),
Count Axis( 1 ),
Show Percents( 1 ),
Show Counts( 1 ),
Axes on Left( 1 ),
Outlier Box Plot( 0 ),
Set Bin Width( 1 ),
Custom Quantiles( Percent1, perMatrix ),
// Custom Quantiles( ( Eval( Percent1 ) /100 ), [( Eval( Percent1 ) /100 ), ( Eval( Percent2 ) /100 )] ), Customize Summary Statistics(
Std Err Mean( 0 ),
Upper Mean Confidence Interval( 0 ),
Lower Mean Confidence Interval( 0 ),
Minimum( 1 ),
Maximum( 1 )
)
);Re:カスタム分位数の変数の使用方法ジム&すべて、
これは最終的に機能します(おそらく最もエレガントな構文ではありません)
Percent1 = 95;<BR />Percent2 = 99;<BR />percentMatrix = <FONT color="#008000">Matrix( {{ Percent1 /100 }, { Percent2 /100 }} )</FONT>;<BR />percentMatrix = [<FONT color="#008000">0.95, 0.99</FONT>]<BR />...<BR /> Custom Quantiles( ( Percent1 /100 ), percentMatrix ),<BR />の代わりに:
percentMatrix = <FONT color="#FF6600">Matrix( Percent1 /100 ) || Matrix( Percent2 /100 )</FONT>;<BR />percentMatrix = [<FONT color="#008000">0.95</FONT> <FONT color="#FF6600">0.99</FONT>]
乾杯!