Displaying 1 result from an estimated 1 matches for "schcode".
Did you mean:
pchcode
2003 Oct 07
3
Problem getting an ifelse statment to work
...two variables, qs2 and qs9, which have
> the following frequencies.
>
> > table(qs2)
> qs2
> 1 2 3 4
> 40 22 11 29
>
> > table(qs9)
> qs9
> 1 2 3 4
> 162 172 91 179
>
> I simply want to create a new variable which I have called
> SchCode that would be filled based on the following logic
> (written in Systat syntax):
>
> if qs2 = 1 or qs9 = 1 then let SchCode = 1
> if qs2 = 2 or qs9 = 2 then let SchCode = 2
> if qs2 = 3 or qs9 = 3 then let SchCode = 3
> if qs2 = 4 or qs9 = 4 then let SchCode = 4
>
> I ha...