如何从测试报告中提取概率>|t|?这可能是一个非常简单的问题,但是有没有一种简单的方法可以从测试报告中提取 prob > |t| ?从这一行中提取完整的报告。:
dt1 = rpt[大纲框( "t检验" )][表格框( 1 )];
具有较少 X 和 Y 数量的完整脚本:
// Entrer analyse et column switchers
Oneway(
Y(:Name("553")),
X(:Name("1")),
t Test(1),
Column Switcher(:Name("1"), {:Name("1"), :Name("2"), :Name("3")}),
Column Switcher(:Name("553"), {:Name("553"), :Name("554")}));
//Report
rpt = Current Report();
colswitcher_obj = rpt[ColumnSwitcherCOntextOutlinebox( 1 )] << get scriptable object;
colswitcher_obj2 = rpt[ColumnSwitcherCOntextOutlinebox( 2 )] << get scriptable object;
colswitch_list = colswitcher_obj << get list;
colswitch_list2 = colswitcher_obj2 << get list;
// Loop column switcher 1
For(j = 1, j <= N Items(colswitch_list2), j++,
// Loop column switcher 2
For(k = 1, k <= N Items(colswitch_list), k++,
// Changer le test ici
dt1 = rpt[Outline Box( "t Test" )][Table Box( 1 )];
// Concatenate table
If(j == 1 & k == 1,
main_tb = dt1;
main_tb << Set Name( "All" );
,
Try( main_tb << Concatenate( dt1, Append to First Table ) );
Close( dt1, No Save );
);
colSwitcher_obj << Next;
wait(0);
);
colSwitcher_obj2 << Next;
wait(0);
);自动化和脚本回复:如何从测试报告中提取概率>|t|?这可能不是很可靠的方法,但提供了一个可能的想法
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
ow = dt << Oneway(
Y(:height),
X(:sex),
t Test(1),
);
tb = Report(ow)[OutlineBox("t Test"), Table Box(1)];
vals = tb[ColStackBox(2), NumberColBox(2)] << get;
prob = vals[1];
一个不错的选择通常是使用 << Make Into Data Table 将表格框转换为数据表,然后从中提取值。获得值后,记得关闭表格。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
ow = dt << Oneway(
Y(:height),
X(:sex),
t Test(1),
);
dt_ttest = Report(ow)[OutlineBox("t Test"), Table Box(1)] << Make Into Data Table(Invisible(1));
val = dt_ttest[3, 6];
Close(dt_ttest, no save);
通过检查 Prob > |t| 的位置,可以使两者都更加稳健。