你好,
在条形图模式下使用 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 )
)
)