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;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.