有一组帖子询问如何限制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
