|Date: ||Fri, 24 May 2002 10:59:38 -0400|
|Reply-To: ||"Goodwin, Jay" <JGoodwin@air.org>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||"Goodwin, Jay" <JGoodwin@air.org>|
|Subject: ||Re: missing in string variables|
|Content-Type: ||text/plain; charset="iso-8859-1"|
Instead of MISSING(currency) use...
if (company eq lag(company)) and (length(rtrim(ltrim(currency))) eq 0)
currency = lag(currency).
From: Paul Mcgeoghan [mailto:Mcgeoghan@Cardiff.ac.uk]
Sent: Friday, May 24, 2002 11:06 AM
Subject: missing in string variables
If I have data as follows:
Company Currency Value CurrDate
A EUR 10 1-Jan-1999
A 20 1-Feb-1999
A 15 1-Mar-1999
A EUR 30 1-April-1999
A 20 1-May-1999
B IRE 10 1-Jan-1999
B 20 1-Feb-1999
B 25 1-Mar-1999
I am trying to fill in the currencies so that if company=lag(company) and
currency is missing then currency=lag(currency)
How do I tell handle missing in a string variable?
The syntax is therefore something like:
IF (company=lag(company)&missing(currency)) currency = lag(currency) .
SPSS doesn't like the missing(currency) bit as it is expecting currency to
I have got around this before but can't remember how I did it.
Thanks in advance,
Application support specialist
(Statistics and Databases),