@Antoni wrote:
Hello,
it's 12hours since i'm trying to get over this problem. I need to write a report about credit scorring.There are values assigned as 'M' that represent missing data(some comedian did that). I need to get rid of both usual missing data which is "." and "M" so i can start calculating correlations and regression based on regular data. I tried to reasign those "M" values into regular ' ' in a range of variables that contain the "M" value but i'm constantly failing i have egsams soon and have to write this report till saturday but since 3 days i have about 8 lines.
This is my recent ceration but it fails:
data wanted;
set have( keep=act_age -- app_char_cars);
if (act_age -- app_char_cars)='M' then (act_age -- app_char_cars)=' ';
run;
Correlation will ignore variables with missing values. So I am not quite sure what the problem is.
And depending on the type of regression any record with a variable having a missing value on the model statement is also ignored by default. So I am not sure what you expect.
Correlations are NOT calculated between character variables in any manner either.
You may want to check on those M values. If the variable is numeric then the M could be appearing as a special missing which is not "comedy". It means that someone took notice that there was likely a documented reason that value is missing.
so i should find some assosiations, f.e. cramer v queries and run them on this data as it goes and it should give some reasonable results? what dou you recommend to do except v-crammer and regression to impress the professors, im no statistician either so help on this topic is also well received 😄 the thing is i have a similar report to look through but he does systemize this data, thats where my conclusion about getting rid of the missing values comes from. He uses macro to match observations to groups of variables then he uses this macro to chech for association of some variables via cramer v, then he measures correlation and finaly regression. Of course he has different data to work with and only partially his work matches my requirements but its hard to identify what and why he's doing it when i have never done such thing till now
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.