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=' ';
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.