Hi,
My data looks like follows,
PERMNO | T1 | T2 | upto T516 |
1 | |||
2 | |||
3 |
Now, I want to delete permno's if all observations from T1 through T516 are missing.
And then I also want to delete permno's which have less than 24 observations from T1 through T516 (as there are missing values in my data set)
Can someone suggest on how to do this?
Thanks.
data want;
set have;
array t {*} t1-t516;
if n (of t{*}) > 24;
run;
data want;
set have;
array t {*} t1-t516;
if n (of t{*}) > 24;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.