我有點迷茫,不得不從“響應篩選”中將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 ) );