我有点迷茫,不得不将“ Pvalues”表附加到“响应筛选”中的新数据表中。我的脚本似乎缺少某些内容?需要帮助。谢谢!
For( i = 1, i <= N Items( new_b ), i++,
rsq = cor_tab << Response Screening(
Y( Column( cor_tab, new_t[i] ) ),
X( Column( cor_tab, ref_t[i] ) )
)
pv = data table("PValues");
newdt << concatenate( datatable(pv), append to first table(1) );
);
您已经非常接近您的需求。 您有一些不匹配的“()”,并且连接语句不在For()循环内。 以下是将代码重做为完整工作示例的示例。 我还添加了第二个版本,相信它将为您提供更多有用的结果。
Names Default To Here( 1 );
cor_tab = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Build the New_t and Ref_t lists
allCols = dt << get column names( continuous );
// Place every other column in the new_t and ref_t
new_t = {};
ref_t = {};
For( i = 1, i <= N Items( allCols ), i++,
If( Mod( i, 2 ) == 0,
Insert Into( ref_t, allCols[i] ),
Insert Into( new_t, allCols[i] )
)
);
dtFinal = New Table( "Together" );
For( i = 1, i <= N Items( new_t ), i++,
rsq = cor_tab << Response Screening(
Y( Column( cor_tab, new_t[i] ) ),
X( Column( cor_tab, ref_t[i] ) )
);
dtFinal << concatenate( Data Table( "PValues"), append to first table( 1 ) );
Close( Data Table( "PValues" ), nosave );
);
// Or if you did it this way, you would get more informative results table
cor_tab << Response Screening( Y( eval(new_t) ), X( eval(ref_t) ), Paired X and Y( 1 ) );