| Date: | Tue, 1 Feb 2005 11:30:06 -0300 |
| Reply-To: | Hector Maletta <hmaletta@fibertel.com.ar> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Hector Maletta <hmaletta@fibertel.com.ar> |
| Subject: | Re: help with syntax |
|
| In-Reply-To: | <CF25F31EC35DD411B3A500B0D020F0F00D0D6938@mirage.fmhi.usf.edu> |
| Content-Type: | text/plain; charset="us-ascii" |
Use the following syntax:
IF (ID=LAG(ID) AND SYSMIS(COUNTY))COUNTY=LAG(COUNTY).
Hector
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]
> On Behalf Of Yampolskaya, Svetlena
> Sent: Tuesday, February 01, 2005 11:27 AM
> To: SPSSX-L@LISTSERV.UGA.EDU
> Subject: Re: help with syntax
>
>
> Dear List,
>
> I have the following problem that I cannot solve. I have
> three variables:
> (a) id for the child, (b) a specific placement for the child,
> and (c) county. Each line represents a record so if one child
> have 10 placements I would have ten lines for the same child.
> However only the first line has county. My data look like this:
>
>
> Id placement county
>
> 1 5 11
> 1 7 .
> 1 8 .
>
> 2 6 15
> 2 8 .
> 2 7 .
>
> I need to replace missing values in 'county' variable with
> the value in the first line for the same child.
>
> In other words, I want my data look like this:
>
> Id placement county
>
> 1 5 11
> 1 7 11
> 1 8 11
>
> 2 6 15
> 2 8 15
> 2 7 15
>
> It would not be a big problem if I have only two or three
> placements for one child but I have up to 35 placements.
>
> Thank you in advance,
>
> Lana
>
|