3308_zh-CN
Col Sum功能问题我正在公式编辑器中构建一个列公式,并且遇到了Col Sum函数的问题。
我的数据集结构如下:
要求一个 b
3154 1.5 10000
844 .5 1000000
7311 1.5 1000000
22777 .5 10000
。。。
我想根据函数求值:
总和i = 1到n {log(claim_i / b)* [(b / claim_i)^ a + 1] ^( - 1)}。
声明值将对我的数据集中的所有行求和,因此Col Sum函数似乎是自然选择。但是,我不想按行对a和b变量求和 - 我只想将每个a和b的行值包含在公式中。
通常我会使用代数操作来使a和b常数超出求和范围。但是,考虑到这个公式的复杂性,这不是一个选择。
是否有可能排除 Col Sum函数的列变量?
非常感谢,
罗伯特Re:Col Sum功能问题工作得很完美!
谢谢PMrozRe:Col Sum功能问题
style =“font-size:10pt; font-family:”Courier New“; color:black;”>您的
公式将类似于以下内容:
style =“font-size:10pt; font-family:”Courier New“; color:black;”> dt
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> =
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“;颜色:rgb(0,0,221);”>当前
数据表
style =“font-size:10pt; font-family:”Courier New“; color:black;”>()
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>;
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”> mysum
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> =
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:teal;”> 0
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>;
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:rgb(0,0,221);”> for
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
( 一世
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> =
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:teal;”> 1
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>,
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
一世
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> <=
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:rgb(0,0,221);”> nrows
style =“font-size:10pt; font-family:”Courier New“; color:black;”>(
style =“font-size:10pt; font-family:”Courier New“; color:black;”> dt )
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>,
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
一世
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> ++,
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
风格= “”>
claim_i
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> =
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“;颜色:rgb(0,0,221);”>列
style =“font-size:10pt; font-family:”Courier New“; color:black;”>(
style =“font-size:10pt; font-family:”Courier New“; color:black;”> dt
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>,
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:purple;”>“Claim”
style =“font-size:10pt; font-family:”Courier New“; color:black;”>)[
style =“font-size:10pt; font-family:”Courier New“; color:black;”> i ]
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>;
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
风格= “”>
mysum
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> =
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
mysum
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> +
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:rgb(0,0,221);”> log
style =“font-size:10pt; font-family:”Courier New“; color:black;”>(
style =“font-size:10pt; font-family:”Courier New“; color:black;”> claim_i
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> /:
style =“font-size:10pt; font-family:”Courier New“; color:black;”> b )
style =“font-size:10pt; font-family:”Courier New“;颜色:海军;”> *
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
((
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>:
style =“font-size:10pt; font-family:”Courier New“; color:black;”> b
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> /
style =“font-size:10pt; font-family:”Courier New“; color:black;”> claim_i )
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> ^:
style =“font-size:10pt; font-family:”Courier New“; color:black;”> a
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> +
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:teal;”> 1
style =“font-size:10pt; font-family:”Courier New“; color:black;”>)
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> ^
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
(
style =“font-size:10pt; font-family:”Courier New“; color:navy;”> -
style =“font-size:10pt; font-family:”Courier New“; color:teal;”> 1
style =“font-size:10pt; font-family:”Courier New“; color:black;”>)
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”>)
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>;
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
style =“font-size:10pt; font-family:”Courier New“; color:black;”> mysum
style =“font-size:10pt; font-family:”Courier New“; color:navy;”>;
style =“font-size:10pt; font-family:”Courier New“; color:black;”>
Re:Col Sum功能问题是的,除了我不想在每一行上加上a和b的总和。
例如,第一行的总和(其中a = 1.5和b = 10,000)
将会:
SUM1 =
log(3154/10000)* [(10000/3154)^ 1.5 + 1] ^( - 1)+
log(844/10000)* [(10000/844)^ 1.5 + 1] ^( - 1)+
log(7311/10000)* [(10000/7311)^ 1.5 + 1] ^( - 1)+
log(22777/10000)* [(10000/22777)^ 1.5 + 1] ^( - 1)+。。。
和第二行的总和(其中a = .5和b = 1,000,000)
将会:
SUM2 =
log(3154/1000000)* [(1000000/3154)^。5 + 1] ^( - 1)+
log(844/1000000)* [(1000000/844)^。5 + 1] ^( - 1)+
log(7311/1000000)* [(1000000/7311)^。5 + 1] ^( - 1)+
log(22777/1000000)* [(1000000/22777)^。5 + 1] ^( - 1)+。。。
我不确定JMP能否实现这种总和。Re:Col Sum功能问题那么这会让你的公式真的如此
log(claim_i / b_i)* [(b_i / claim_i)^ a_i + 1] ^( - 1)
如果是的话,你可以使用吗?
sum(log(claim / b)* [(b / claim)^ a + 1] ^( - 1))
Comments
There are no comments yet