|
I'm a new SPSS user, and having previously used Excel for statistical analysis am seriously struggling with what seem to be some really basic things! The main issue that I have at the moment is that while inputting the results of a series of likert scale questions, I want SPSS to caculate a total of the scores for each question. In Excel I would simply use a cell reference formula to generate a sum, and this would update itself as I went along. The compute variable idea in SPSS however doesn't seem to update itself, or even keep a record of the sum computed... am I doing something wrong here??
Any help would be really greatly appreciated! Becky :-) |
|
At 04:49 AM 6/15/2007, Beckybg wrote:
>I have previously used Excel for statistical analysis and am seriously >struggling with some really basic things! > >The main issue that I have at the moment is that while inputting the >results of a series of likert scale questions, I want SPSS to caculate >a total of the scores for each question. In Excel I would simply use a >cell reference formula to generate a sum, and this would update itself >as I went along. The compute variable idea in SPSS however doesn't >seem to update itself, or even keep a record of the sum computed... am >I doing something wrong here?? Part I: ....... You're hitting that SPSS 'thinks' differently from Excel, and from any spreadsheet program. The main advantages of how SPSS does it (and I don't blame you if you thank 'advantage' is a contradiction in terms, right now) are, . It handles very large files far better and more efficiently . It enforces some important disciplines, like guaranteeing that a computed variable is computed exactly the same way in every row. The SPSS screen that looks like a spreadsheet isn't a sheet but a file. That is, a) It can contain only values, i.e. numbers or strings, not formulas (I think you've found this) b) A 'column' is enforced to have the same data type throughout. (That's another useful discipline enforced.) NOW, how computations are done: First, the computation code doesn't 'live' in the file. That's a contrast to a spreadsheet, where the formulae 'live' in the cells for which they compute values. Computations 'live' in a file of syntax code. (That isn't obvious, if you click up a 'compute' from the menus, but it's what happens.) Second, computations are not done during data entry, but together, during the reading of a file from beginning to end. (That's one main reason SPSS handles very large files so much better.) .......... (And I'd love to give you the full solution, but time has run out for the moment.) |
|
The full solution, to wit, is using, as you guessed, the COMPUTE
command (or the corresponding option in the TRANSFORM menu). The expression for your variable is the sum of all the variables you want to add up. In principle SPSS will add up (for each case) all variables with valid values, ignoring the variables for which that case has missing values. However, depending on specifications, you can command that such cases result in a missing sum if so you wish. This again is slightly different and more flexible than what Excel does. If you do this for a set of data, and then later you add more subjects (rows) to the file, the sum for these new rows will be blank. You should re-compute the sum variable. In that case the variable will be computed for both the old and the new rows, thus not only computing it for the first time in the new rows, but also updating the value of the sum in the old rows, just in case there has been some change in the component variables for the old rows. Hector -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Richard Ristow Sent: 15 June 2007 14:18 To: [hidden email] Subject: Re: 'compute variable' At 04:49 AM 6/15/2007, Beckybg wrote: >I have previously used Excel for statistical analysis and am seriously >struggling with some really basic things! > >The main issue that I have at the moment is that while inputting the >results of a series of likert scale questions, I want SPSS to caculate >a total of the scores for each question. In Excel I would simply use a >cell reference formula to generate a sum, and this would update itself >as I went along. The compute variable idea in SPSS however doesn't >seem to update itself, or even keep a record of the sum computed... am >I doing something wrong here?? Part I: ....... You're hitting that SPSS 'thinks' differently from Excel, and from any spreadsheet program. The main advantages of how SPSS does it (and I don't blame you if you thank 'advantage' is a contradiction in terms, right now) are, . It handles very large files far better and more efficiently . It enforces some important disciplines, like guaranteeing that a computed variable is computed exactly the same way in every row. The SPSS screen that looks like a spreadsheet isn't a sheet but a file. That is, a) It can contain only values, i.e. numbers or strings, not formulas (I think you've found this) b) A 'column' is enforced to have the same data type throughout. (That's another useful discipline enforced.) NOW, how computations are done: First, the computation code doesn't 'live' in the file. That's a contrast to a spreadsheet, where the formulae 'live' in the cells for which they compute values. Computations 'live' in a file of syntax code. (That isn't obvious, if you click up a 'compute' from the menus, but it's what happens.) Second, computations are not done during data entry, but together, during the reading of a file from beginning to end. (That's one main reason SPSS handles very large files so much better.) .......... (And I'd love to give you the full solution, but time has run out for the moment.) |
| Free forum by Nabble | Edit this page |
