LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Dec 2005 15:30:57 -0500
Reply-To:     "Osatuke, Katerine, VHACIN" <Katerine.Osatuke@va.gov>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Osatuke, Katerine, VHACIN" <Katerine.Osatuke@va.gov>
Subject:      how to fill blank line in .sav file by copying contents from line
              above
Content-Type: text/plain; charset="iso-8859-1"

Dear listserve,

I have a file with over 400 variables. In several cases that come in consecutive sequences from 2 to 9 lines, only the first case of each sequence has values filled in. In such cases, I'd like to copy values of previous (non-empty) lines into the empty lines. For all cases that belong to the same sequence, the first variable (ID) always has the same value, and is never missing; all the other variables have values only for the first case of each sequence, and system-missing values for all subsequent cases of the sequence.

I'm trying to fill in the blank lines using the lag function. I'd like NOT to list all my 400 variables but instead say (var2 to var400). Spss 11.5 does not like how I wrote this syntax; can anyone please tell me what I'm doing wrong?

If ID=lag(ID) (abbr TO oldcomp)=lag(abbr to oldcomp). Execute.

*abbr is the first variable I want to fill in, and oldcomp is the last; there are about 400 variables in between abbr and oldcomp.

Thanks for any advice!

Katerine Osatuke, PhD Postdoctoral Fellow VHA National Center for Organization Development 11500 Northlake Drive, Suite 230 Cincinnati, OH 45249 Phone: (513) 247-2255 Email: Katerine.Osatuke@va.gov


Back to: Top of message | Previous page | Main SPSSX-L page