I have come up recently with a problem. I have the education of
differentpeople for different years. Some years have missing values at the begining but not afterwards for example: year education person1 1995 missing person1 1996 missing person1 1997 3 person1 1998 3 person1 1999 2 person2 1996 missing person2 1998 2 person2 2000 1 I would like to give the value 3 (of year 1997) to the missing values (of years 1995 and 1996) for person1. For person2 I want to give the value 2 (of year 1998) to the missing value of year 1996, and so on. I want to repeat that for every person. Does anyone have a command I can write to the spss' syntax? Thanks in advance! _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
Seems to me that you would want to use a lag function. You would need
to determine the best sort order so that what get's lagged is the correct information and you may have reasons that you would not want to do a particular sort order (e.g. if the number changes in a given year you would not change the missing for the prior year?) Anyway, To get the changes you specify with the example below, you would Sort cases by person (a) year (d). If (person=lag(person) and missing(education)) education=lag(education). Exe. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Dimitris Nikolaou Sent: Saturday, September 30, 2006 6:56 AM To: [hidden email] Subject: [SPSSX-L] Missing values for education I have come up recently with a problem. I have the education of differentpeople for different years. Some years have missing values at the begining but not afterwards for example: year education person1 1995 missing person1 1996 missing person1 1997 3 person1 1998 3 person1 1999 2 person2 1996 missing person2 1998 2 person2 2000 1 I would like to give the value 3 (of year 1997) to the missing values (of years 1995 and 1996) for person1. For person2 I want to give the value 2 (of year 1998) to the missing value of year 1996, and so on. I want to repeat that for every person. Does anyone have a command I can write to the spss' syntax? Thanks in advance! _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ 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. |
Free forum by Nabble | Edit this page |