How to copy upper value to missing

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to copy upper value to missing

Max Jasper
Hi all,
 
SPSS syntax question:
 
Variable V1 has missing values between case(m) and case(n):
What is the syntax for replacing missing values of V1 between case(m+1) to case(n-1) with its value at case(m)?
 
Many thanks,
Mike.
Reply | Threaded
Open this post in threaded view
|

Re:How to copy upper value to missing

Jerabek Jindrich
Hello Max,

with lag function you can copy the value of var between cases.
IF missing(V1) V1 = lag(V1,1).
EXEC.

HTH
Jindra

> ------------ Původní zpráva ------------
> Od: Max Jasper <[hidden email]>
> Předmět: How to copy upper value to missing
> Datum: 22.11.2006 22:25:01
> ----------------------------------------
> Hi all,
>
> SPSS syntax question:
>
> Variable V1 has missing values between case(m) and case(n):
> What is the syntax for replacing missing values of V1 between case(m+1) to
> case(n-1) with its value at case(m)?
>
> Many thanks,
> Mike.
>
>
>