有一組帖子詢問如何限制col ...聚合特定子集的功能。
https://community.jmp.com/t5/Discussions/Compute-Column-Mean-while-restricting-observations-used/mp...
https://community.jmp.com/t5/Discussions/JMP10-Col-Max-and-Col-Min-functions-returned-the-data-from/...
https://community.jmp.com/t5/Discussions/Col-Functions-and-Row-States/td-p/351705
https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/mp/34840
https://community.jmp.com/t5/Discussions/Col-Functions-and-Row-States/mp/351705
https://community.jmp.com/t5/Discussions/Exclude-data-in-formula/td-p/512366
應用案例:
- 排除排除在外來自聚合的行:
Col Max(if(not(excluded()), :weight,.),: sex)
甚至更短(如果不需要排除行中的值);
Col Max(:weight, :sex, :excluded())
- 用參考數據集對一些數據進行基準測試(A國在這個郵政)
:data / Col Maximum(if(:country="A", :data,.))
正如上面示例中所見,簡單的解決方案是如果裡面的聲明列xyz聚合:
col Mean( if(:sex=="M", :weight,.), :age)
col Mean( if(not(excluded()), :weight,.), :age)
問題:
該方法非常慢 - 如果子集如果-條件包含一個字符串比較:
https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/mp/578576/highlight/true#M78599
然後時間與行數呈二次方關係,即使對於只有幾 1000 個條目的小數據集,計算也需要秒.
對於具有數百萬個條目的數據集,需要幾個月(!!!) - 但會因超時而停止並彈出錯誤消息。 不太好!
我的希望:
修復錯誤
更好的是:
提供額外的在哪裡選項列xyz聚合
- 自動修復時序問題:第一的限制數據集,然後應用聚合(--> 快得多,即使很酷的“col...”加速有一個錯誤)
- 這使得子集定義更容易,
而不是(*),你只需要:
col Mean(:weight, :age, where(:sex=="M"))
col Mean(:weight, :age, where(not(excluded())))
時序示例,複製自https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/mp/578576/highlight/true#M78599
