SAS预测 - 无有效观察

时间:2017-10-16 00:59:41

标签: sas regression linear-regression

我正在尝试使用拟合回归模型来根据特定值预测特定邮政编码的平均余额: 平均年龄 - 34岁, 平均教育 - 13年, 平均收入= 89000, Avg Homevalue - 160000 平均财富--140000

我有以下代码,但继续得到 错误:未找到有效的观察结果。

我的输出显示观察次数读数 - 1,使用的观测数量 - 0,缺失值的观测数量 - 1,但我不确定缺少什么。

TITLE "Assignment 5 - Banking";
data banking;
infile 'S:\Assignment4\Bankingfull.txt' delimiter='09'x MISSOVER;
input age education income homeval wealth balance;
run;

proc print; 
run; 

TITLE "Correlation Values"; 
proc corr; 
var age education income homeval wealth balance; 
run; 

TITLE "Scatterplots"; 
symbol value =dot color=black; 
proc gplot;
plot balance * (age education income homeval wealth);
run; 

TITLE "Regression"; 
proc reg; 
model balance = age education homeval wealth
    /clb;
plot student.*predicted.;
plot student.*(age education homeval wealth);
plot npp.*student.;
output student=resid;
run;

TITLE "Residuals";
proc reg; 
model balance = age education homeval wealth/stb;
run;

TITLE "Predictions"; 
data pred;
input balance age education income homeval wealth; 
datalines; 
. 34 13 89000 160000 140000
;
data new; 
set pred bank;
run;

proc reg; 
model balance = age education homeval wealth/p clm cli; 
run;

0 个答案:

没有答案