|
Dear colisters:
I was advised to explain my question a little bit further. I apologize for the confusion. What I have on my current data set is from column Market to A2, and I'd like to generate a column A11 respond to A1, and A22 respond to A2. Time is my dependent variable which I'd like to take integral of. For example, for row 6, time at 4, A11 should calculate A1 (t=0) + A1 (t=1) +A1 (t=2) +A1 (t=3)+ A1 (t=4), which is equivalent to the summation of A1 from time 0 to time 4. Is the loop function the right direction? Thank you again for your help. MARKET PROD time A1 A2 A11 A22 A B 0 0 0 0 0 A B 1 0.00024 0.00001 0.00024 0.00001 A B 2 0.00059 0.00001 0.00084 0.00002 A B 3 0.00128 0.00005 0.00212 0.00006 A B 4 0.00198 0.00009 0.0041 0.00015 A B 5 0.00286 0.00015 0.00696 0.0003 A B 6 0.00364 0.00022 0.0106 0.00052 A B 7 0.00441 0.00029 0.01501 0.00082 A B 8 0.00531 0.00039 0.02032 0.0012 A B 9 0.00621 0.00049 0.02653 0.00169 ====================To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
I'm not sure if this is what you want, but look into using Time Series Transformation Functions
Cumulative sum. Cumulative sum of series values up to and including the current value. Go under Transform-->Create Time Series and follow the wizard. NOTE: I have never done this, but based on what you are asking, looked under SPSS Help to find what sounded like the right answer. If this is not the answer, someone else will have to chime in. Good luck. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Joanne Tsai Sent: Tuesday, April 29, 2008 3:22 PM To: [hidden email] Subject: [SPSSX-L] loop function for integral or summation? Dear colisters: I was advised to explain my question a little bit further. I apologize for the confusion. What I have on my current data set is from column Market to A2, and I'd like to generate a column A11 respond to A1, and A22 respond to A2. Time is my dependent variable which I'd like to take integral of. For example, for row 6, time at 4, A11 should calculate A1 (t=0) + A1 (t=1) +A1 (t=2) +A1 (t=3)+ A1 (t=4), which is equivalent to the summation of A1 from time 0 to time 4. Is the loop function the right direction? Thank you again for your help. MARKET PROD time A1 A2 A11 A22 A B 0 0 0 0 0 A B 1 0.00024 0.00001 0.00024 0.00001 A B 2 0.00059 0.00001 0.00084 0.00002 A B 3 0.00128 0.00005 0.00212 0.00006 A B 4 0.00198 0.00009 0.0041 0.00015 A B 5 0.00286 0.00015 0.00696 0.0003 A B 6 0.00364 0.00022 0.0106 0.00052 A B 7 0.00441 0.00029 0.01501 0.00082 A B 8 0.00531 0.00039 0.02032 0.0012 A B 9 0.00621 0.00049 0.02653 0.00169 ======= To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
