罗罗
我将数据导入SAS,存在work下的a数据集中,数据是这样的:
x y
3.239 1.345
3.731 1.64
2.98 1.316
2.977 1.383
2.041 2.207
. .
9.132 4.411
10.198 4.733
8.727 4.343
8.123 4.458
7.379 3.957
. .
12.828 7.277
15.591 7.473
12.762 6.715
12.621 7.697
11.892 7.141
. .
11.787 7.492
13.854 9.83
11.513 7.455
10.789 8.772
10.485 7.138
. .
13.729 10.2
15.9462 9.006
. .
12.566 8.72
11.852 7.472
. .
15.75 10.053
. .
. .
. .
. .
. .
18.889 12.833
. .
. .
. .
. .
. .
我编写的程序是这样的:
data new1;
infile 'work.new';
input d h @ @;
proc mi data=a seed=1000 out=outnew1;
var d h;
run;
但每次运行它都说“ERROR: Each observation has analysis variables either all missing or all observed in the data set.
NOTE: The data set WORK.OUTNEW1 has 0 observations and 3 variables.
”。
这个数据插补都弄三天了,赶着写论文用,我都快疯了。请高手帮忙指点一下这个程序该怎样运行。
firelife
mi procedure我不懂,mi过程估计也缺了什么参数
data new1;
infile 'work.new';分号
input d h @ @;两个@@不用了
proc mi data=a(new1)这里应该是new1 seed=1000 out=outnew1;
var d h;
run;
罗罗
还是不行 依然出现“ERROR: Each observation has analysis variables either all missing or all observed in the data set.
NOTE: The data set WORK.OUTNEW1 has 0 observations and 7 variables.”
我的导入的数据中只有两个变量呀,怎么系统说在outnew1里有7个变量(和0条观测值)
我的过程:
data new1;
infile 'new1';
input d h;
proc mi data=new1 seed=1000 out=outnew1;
var d h;
run;
rtist
Error的原因已经写得很清楚了。
为什么7个变量可以看置顶贴。
你的分析最终是做什么?
btw:同一个问题不要发多个贴。
liuzzz6
Each observation has analysis variables either all missing or all observed in the data set.
这句是说,你的变量要么整例全失,要么整例全齐,无法计算缺失值。要想补出缺失值,每例至少有一个变量是不缺失的。
至于The data set WORK.OUTNEW1 has 0 observations and 7 variables,我也是不明白,望高手解释一下,谢谢啊。
罗罗
谢谢指点 一下子云开雾散见太阳了