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;
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: