Hi all
I have got this issue when I run my code.
958,105 observations are not included because of missing values, and all observations are 1.1 million, in this case, a large number of data are not used in the analysis
So, I did this code to fix this problem but still the same, it is true the outputs are changed but the number of observation who are not used because of missing values still the same in the log
data milk;
set milk;
if a = . then a =' ';
if b = . then b =' ';
if c = . then c =' ';
if p = . then p =' ';
if peakyield = . then peakyield =' ';
run; quit;
regards
Your "fix" still leaves you with missing values. What non-missing value could you substitute? For example, would this make sense?
if a = . then a = 0;
"but the number of observation who are not used because of missing values still the same in the log "
Used by what? Many procedures have option, often named "missing" to include observations having missing-values.
You can not assign a string/char to a numeric variable.
EDIT: Added the missing NOT 😐
I'm using proc mixed !!
Your "fix" still leaves you with missing values. What non-missing value could you substitute? For example, would this make sense?
if a = . then a = 0;
' ' is the missing value for charcater variables while . is the missing value of numerics.
You cannot convert a numeric variable to character on the fly.
If you don't want the . to appear in reports you can use
option missing=' ';
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.