我保存了一些我在執行異常值分析時要使用的腳本。這些是Fit Model腳本,我想每次使用循環隱藏和排除值時運行1個腳本。但是,我已根據列名稱命名腳本。所以我希望腳本名稱與列名匹配,並只運行該腳本。我考慮過Linnerud樣本數據的一個例子。
dt = current data table();
col = dt << get column names( string );
nc = N Items( col );
For( i = 1, i <= nc, i++,
If( Contains( ColNames[i], "Outlier" ),
Col1 = Column(dt,i);
max = data table(dt);
max << select where(as column(Col1)==abs(Col Max( Col1 ))) << Hide and Exclude;
//Hide and exclude the MAX val from Outlier 1 Rest Pulse, and Run Outlier 1 Rest Pulse script
//Run Script("Outlier 1 Rest Pulse");
)
);這可能嗎?
試著看一下Summarize函數。這將幫助您獲得要循環的列中的級別列表。
檢查腳本索引以獲取示例