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;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: