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;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.