사용자 지정 분위수에 변수를 사용하는 방법커뮤니티 여러분,
나는 한동안 어려움을 겪고 있으며, 아래의 하드 코딩 된 값 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 ") 및 두 개의 백분위 수 값이 모두 잘 검색됩니다 (같은 스크립트의 앞부분에있는 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>]
건배!