Re: Urgent help needed SOLVED

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Urgent help needed SOLVED

Eduard Bonet
Hello. I have just solved my question using the lag function.

Thanks, anyway.



Eduard Bonet

Linux user n.444814
(K)Ubuntu user  12888


2008/12/4 Eduard Bonet <[hidden email]>

> Hello list members.
>
> I am new in this list, and a bit desperate with what I need to do. I need
> to recode one variable and I cannot do it.
> An extract of my data is as follows:
>
> R_id       Imp         Ran          Select
> 1              1          1,00           1,00
> 1              2                .             ,00
> 1              3                .             ,00
> 1              4                .             ,00
> 1              5                .             ,00
> 2              1            ,00             ,00
> 2              2               .              ,00
> 2              3               .              ,00
> 2              4               .              ,00
> 2              5               .              ,00
> 3              1          1,00           1,00
> 3              2               .              ,00
> 3              3               .              ,00
> 3              4               .              ,00
> 3              5               .              ,00
>
> "R_id" stands for Respondent identification; as you can see there are five
> cases per respondent, and each case is distinguished by the value of the
> variable "Imp". The first case of every respondent has a value (0 or 1) in
> the variable "Ran". What I need to do is to recode the variable "Select"
> according to the value of "Ran": if "Ran" has the value 1 for the case
> R_id=1 & Imp=1, I wish that "Select" takes the value 1 for all the remaining
> cases of R_id=1.
> Generalizing this, and appying the proper formula, the data should appear
> like this:
>
> R_id       Imp         Ran          Select
> 1              1          1,00           1,00
> 1              2                .           1,00
> 1              3                .           1,00
> 1              4                .           1,00
> 1              5                .           1,00
> 2              1            ,00             ,00
> 2              2               .              ,00
> 2              3               .              ,00
> 2              4               .              ,00
> 2              5               .              ,00
> 3              1          1,00           1,00
> 3              2               .            1,00
> 3              3               .            1,00
> 3              4               .            1,00
> 3              5               .            1,00
>
>
> Could anyone give an indication on how to proceed?
>
> Thanks in advance.
>
>
> --
> Eduard Bonet
>
>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD