|
Is there any way to refresh an equation? I had a set of data for a
certain time period and created "mean" variables based off that data. I am now extending the time period and adding more data to the original set (increasing the population). I want to be able to see, compute, the same means that I have for the original data for the new data. The only way I've been able to recreate these means is by rewriting the equation completely as if I were doing it for the first time. Is there a better way to do this or must I go through each equation and rewrite them? Greg Pace Research Analyst Lake Hospital System Research Services Dept. 440-354-1078 ph 440-354-1101 fx [hidden email] |
|
At 04:31 PM 6/14/2007, Greg.Pace wrote:
>Is there any way to refresh an equation? I had a set of data for a >certain time period and created "mean" variables based off that >data. I >am now extending the time period and adding more data to the original >set (increasing the population). I want to be able to see, compute, >the >same means that I have for the original data for the new data. The >only >way I've been able to recreate these means is by rewriting the >equation >completely as if I were doing it for the first time. Coincidentally, two postings today on essentially this point (see "'compute variable'"). The answer is, the computation should be in a syntax file; the syntax can then be run against whatever data you have, and run again whenever you've changed the data and wish an update in your computations. I recommend you set it up to read the data from a .SAV file on disk, not to assume it's in the Data Editor, and to save it with the computed variables under another name. -Cheers, and good luck, Richard |
|
In reply to this post by Greg.Pace
If you have saved the syntax file, you can just rerun it, of course. However, that syntax isn't part of your sav file, so there is no automatic way for SPSS to act like a spreadsheet.
However - and this won't help retroactively - if you can use the programmability features introduced in SPSS 14, there is a way to do this. The Transform module available from SPSS Developer Central (www.spss.com/devcentral), allows you to write transformations, including DO IF blocks, etc for COMPUTE, RECODE, and COUNT commands, and run them in a way that saves the formula as an attribute of a variable. Then when do data arrive, you can just tell the variables to update themselves, and the code get the formula from the specified variables and reruns it. And it keeps track of when it was last updated. There are some limitations here -- it's not a complete spreadsheet, but it can take a lot of the burden. These formulas can be seen via Display Dictionary, so you can use this for documentation, too. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Greg.Pace Sent: Thursday, June 14, 2007 3:31 PM To: [hidden email] Subject: [SPSSX-L] Refreshing equations Is there any way to refresh an equation? I had a set of data for a certain time period and created "mean" variables based off that data. I am now extending the time period and adding more data to the original set (increasing the population). I want to be able to see, compute, the same means that I have for the original data for the new data. The only way I've been able to recreate these means is by rewriting the equation completely as if I were doing it for the first time. Is there a better way to do this or must I go through each equation and rewrite them? Greg Pace Research Analyst Lake Hospital System Research Services Dept. 440-354-1078 ph 440-354-1101 fx [hidden email] |
| Free forum by Nabble | Edit this page |
