Compute in SPSS

Compute in SPSS - PH 647A Spring 2008 COMPUTE IN SPSS There...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
PH 647A Spring 2008 jcwolf 1 COMPUTE IN SPSS There may be times when you want make changes to the variables in your data set that are not simply recodes. For example, you may need to use only the month from a date or perhaps you need to add three months to a date variable. You can manipulate a variable to extract the third digit of a nine digit number – perhaps the third digit of a longer number verifies that your data represents the correct group of individuals. You can also do simple arithmetic; for example you can convert dollars in millions to dollars in thousands. All of these changes are performed using the “Compute Variable” command. Suppose you want to create a new variable that represents charges per day. Assuming you have a variable with charges and one with length of stay, you can compute a new variable with charges per day. BUT, think first. If you run a frequency of charges, you may discover that some of the cases have $0 charges. If you use $0 in a division equation, you will get an error message (much like you did in Excel when you attempted to calculate the ratio of costs to charges for Kaiser hospitals). You will need to recode your charges variable to make all the $0 charges system-missing. (In other words, you do not want SPSS to use these cases in the calculations.) Begin by recoding the variable “charge.” 1 3 2 6 5 8 9 10 4 7
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/25/2010 for the course PH 647 taught by Professor Wolff during the Spring '09 term at San Diego State.

Page1 / 7

Compute in SPSS - PH 647A Spring 2008 COMPUTE IN SPSS There...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online