Hello programmers,
I have a dataset in the form displayed in the pic and i am trying to select only observation in "Label1" that have the "Mean" and "Std Deviation".
Here's a syntax of the code i've written but i'm getting error messages.
861 Data moment11; set moment1;
862 If 'N''Skewness''Uncorrected SS' 'Coeff Variation' ne. Label1 then delete;
-----------------
388
200
76
ERROR 388-185: Expecting an arithmetic operator.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 76-322: Syntax error, statement will be ignored.
863 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.MOMENT11 may be incomplete. When this step was stopped there were 0
observations and 12 variables.
WARNING: Data set WORK.MOMENT11 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.04 secondsData moment11; set moment1;
If 'N''Skewness''Uncorrected SS' 'Coeff Variation' ne. Label1 then delete;
run;Please what's wrong with my code? I want to leave only observations with Mean and Std deviation in the dataset.
I want to leave only observations with Mean and Std deviation in the dataset.
if label1 in ('Mean','Std Deviation');
Please note that (at least in the above code) capitalization, punctuation, location of spaces, etc. must exactly match the values in LABEL1.
I want to leave only observations with Mean and Std deviation in the dataset.
if label1 in ('Mean','Std Deviation');
Please note that (at least in the above code) capitalization, punctuation, location of spaces, etc. must exactly match the values in LABEL1.
You rock. Thanks!
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.