Hi,
If my data looks like follows, how do I drop permnos where (A200801--A200805) contains less than say 4 observations?
permno | A200801 | A200802 | A200803 | A200804 | A200805 | B200801 | B200802 | B200803 | B200804 | B200805 |
1 | ||||||||||
2 | ||||||||||
3 |
If those variables are numeric and you want to delete observations with less than 4 non missing values, then:
if n(of A200801 -- A200805) < 4 then delete;
If those variables are numeric and you want to delete observations with less than 4 non missing values, then:
if n(of A200801 -- A200805) < 4 then delete;
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: