你好,
在條形圖模式下使用 Graph Builder 時,條形類型設置為間隔,我們可以顯示一些良好的 2 邊置信區間並比較/對比各種屬性。 在某些情況下,我寧願做同樣的事情,但要有片面的信心。 但是,將“另一邊”設置為非常大的值是不可取的,因為它會弄亂 Graph Builder 的 Y 變量比例。 我們目前已經集中在將 1 邊區間的“另一邊”設置為等於平均值,但在這種情況下不希望出現“橫桿”。 所以下圖顯示了一個單邊的上區間,但 Graph Builder 仍然顯示“下區間交叉條”,因為在區間類型的當前實現中需要兩個交叉條。

有沒有更好的方法在 Graph Builder 中顯示一組單邊間隔? 可以選擇將間隔下半部分的顏色設置為與間隔的上半部分不同 - 一半為黑色,另一半為白色(如果有簡單的方法,則可以使用圖形背景顏色) )... 可能是控制是否允許顯示橫桿的選項... 不知道!
簡而言之,我們正在尋找想法,但希望有一些靈活性來顯示單邊間隔!
謝謝,
邁克爾
如果您擁有 JMP 16 並且喜歡冒險,則可以嘗試 Points 元素中的新形狀表達式功能,您可以在其中使用 JSL 命令替換整個標記繪圖。 這是一個繪製 T 形的示例。
Graph Builder(
Size( 579, 502 ),
Variables( Y( :Column 1 ) ),
Elements(
Points(
Y,
Legend( 2 ),
Summary Statistic( "Mean" ),
Set Shape Expression(
Expr(
Function( {this seg, this row, x, y, size, row state},
Local( {se},
se = Col Std Dev( :column 1 ) /
Sqrt( Col Number( :column 1 ) );
Line(
Eval List( {x, y} ),
Eval List( {x, y + 2.576 * se} )
);
Line(
Eval List( {x - 0.2, y + 2.576 * se} ),
Eval List( {x + 0.2, y + 2.576 * se} )
);
)
)
)
)
),
Points( Y, Legend( 3 ) )
)
);
感謝您提供詳細的示例,邁克爾。 我沒有很好的答案,我希望我們將來能提供更好的東西。
目前,一種想法是覆蓋兩個間隔,一個沒有端蓋,一個高度為零(min==max)。 您可以在錯誤欄的自定義設置中關閉收頭。 要製作零高度間隔,您可以製作另一個包含單個值的合成列,並將標記大小設置為點。
對於下圖,我在調用新列“One Sided Interval 2”後這樣做了。
另一個想法是覆蓋兩個條形元素,一個使用浮動樣式,一個使用範圍樣式,並自定義寬度。

Graph Builder(
Set α Level( 0.01 ),
Variables(
Y( :One Sided Interval ),
Y( :Column 1, Position( 1 ) ),
Y( :One Sided Interval 2, Position( 1 ) )
),
Elements(
Points(
Y( 1 ),
Legend( 2 ),
Summary Statistic( "Median" ),
Error Interval( "Range" )
),
Points( Y( 2 ), Legend( 3 ) ),
Points(
Y( 3 ),
Legend( 4 ),
Summary Statistic( "Mean" ),
Error Interval( "Range" )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
2,
Properties(
0,
{Line Color( 5 )},
Item ID( "Median(One Sided Interval)", 1 )
)
), Legend Model(
3,
Properties( 0, {Line Color( 0 )}, Item ID( "Column 1", 1 ) )
), Legend Model(
4,
Properties(
0,
{Line Color( 5 ), Marker Size( 0 )},
Item ID( "Mean(One Sided Interval 2)", 1 )
)
)}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Reference Line Order( 3 ), DispatchSeg(
BarSeg( 1 ),
{Error Bar Cap( "None" )}
)}
)
)
)
這是一個示例數據文件,說明了為什麼這很有用。
New Table( "one sided intervals are hard to make",
Add Rows( 13 ),
New Script(
"Two Sided Interval - easy!",
Graph Builder(
Set α Level( 0.01 ),
Variables( Y( :Column 1 ) ),
Elements(
Points(
Y,
Legend( 2 ),
Summary Statistic( "Mean" ),
Error Interval( "Confidence Interval" )
),
Points( Y, Legend( 3 ) )
),
SendToReport(
Dispatch(
{},
"Column 1",
ScaleBox,
{Add Ref Line( 0, "Solid", "Black", "", 1 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Reference Line Order( 3 )}
)
)
)
),
New Script(
"Attempt at One Sided Interval",
Graph Builder(
Set α Level( 0.01 ),
Variables( Y( :One Sided Interval ), Y( :Column 1, Position( 1 ) ) ),
Elements(
Points(
Y( 1 ),
Legend( 2 ),
Summary Statistic( "Median" ),
Error Interval( "Range" )
),
Points( Y( 2 ), Legend( 3 ) )
),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Reference Line Order( 4 )}
)
)
)
),
New Script(
"Second Attempt at One-Sided Interval - Manually drawing white lines over the lower bound",
Graph Builder(
Set α Level( 0.01 ),
Variables( Y( :One Sided Interval ), Y( :Column 1, Position( 1 ) ) ),
Elements(
Points(
Y( 1 ),
Legend( 2 ),
Summary Statistic( "Median" ),
Error Interval( "Range" )
),
Points( Y( 2 ), Legend( 3 ) )
),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Reference Line Order( 4 ),
{Add Line Annotation(
Line( {237, 300}, {183, 300} ),
Color( "White" ),
Thick( 1 )
), Add Line Annotation(
Line( {244, 299}, {299, 299} ),
Color( "White" ),
Thick( 1 )
)}}
)
)
)
),
New Column( "Column 1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[0.01, 0.02, 0.04, 0.07, 0.1, 0.13, 0.18, 0.25, 0.4, 0.67, 0.93, 1.25, 2
]
),
Set Display Width( 75 )
),
New Column( "One Sided Interval",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[0.4653846, 0.4653846, 0.913051508927084, ., ., ., ., ., ., ., ., ., .]
),
Set Display Width( 137 )
),
New Column( "Comment",
Character,
"Nominal",
Set Values(
{"Mean", "Mean",
"manually calculated upper bound: .4653846 + t Quantile(0.99,12) * 0.6020467/sqrt(13)",
"", "", "", "", "", "", "", "", "", ""}
),
Set Display Width( 430 )
)
)