From: Yaw on
Dear All:

I have this clinical data set I want to subset.
I want to select observations that have complete data for all time
points I am interested in.


My variables are age (0-18yrs) and Htcm (40-190cm).

I started with

Data complete;
Set everybody;
if age and htcm ne .;
run;

I ended up with cases who had data from say age 12yr and up in
addition with all that had complete data.

Any ideas? Or any other expedient way around it.

Thanks in advance





From: Tom Abernathy on
You just need to be more precise in your logic.

IF age AND htcm NE . is parsed by SAS as IF (age NE 0) AND (htcm
NE .) ;

So you should change your program to:
IF (age ne .) AND (htcm ne .) ;

You could also use the N function and code this as :
IF N(age,htcm) =2 ;


On Apr 5, 5:35 pm, Yaw <link...(a)gmail.com> wrote:
> Dear All:
>
> I have this clinical data set  I want to subset.
> I want to select observations that have complete data for all  time
> points I am interested in.
>
> My variables are age (0-18yrs) and Htcm (40-190cm).
>
> I started with
>
> Data complete;
>      Set everybody;
>     if age and htcm ne .;
>    run;
>
> I ended up with cases who had data from say age 12yr and up in
> addition with all that had complete data.
>
> Any ideas? Or any other expedient way around it.
>
> Thanks in advance

 | 
Pages: 1
Prev: Dataset Comparision
Next: SAS - PDV