【发布时间】:2020-12-03 12:43:35
【问题描述】:
我有一个包含 8 个缺失值的因变量。它目前是一个定量变量。但是,我想将它们分成中位数及以下;并高于中位数,但同时保留 8 个缺失值。以下代码将缺失值替换为零,我不明白为什么。
data baseline_all_disc2;
set baseline_all3;
if health_state_m eq . then health_state_m_disc=.; /*This line of code doesn't seem to be working*/
if health_state_m LE 60 then health_state_m_disc=0;
else health_state_m_disc=1;
run;
请帮忙!
【问题讨论】:
标签: sas missing-data