3308_zh-TW
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