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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.