smallcai_niao
smallcai_niao
采纳率50%
2016-12-18 11:23

刚接触matlab,就遇到这个问题,完全看不懂为什么会报这个错

已采纳

data develop;
input type gdp life rate zhrate@@;
cards;
1 41890 77.9 99.5 93.3
1 29461 79.1 99.2 88
1 23381 78.9 96 99
1 29663 79.4 92.5 87.3
1 28529 80.3 98.4 90.6
1 22029 77.9 99 96
2 6000 77.7 99.8 87.6
2 9060 71.9 97.3 76.8
2 8402 71.7 88.6 87.5
2 8677 69.6 92.6 71.2
2 5137 71 92.6 81.1
2 8407 71.4 87.4 68.7
3 1550 62.6 48.6 58.1
3 1128 46.5 69.1 56.2
3 2299 49.8 67.9 62.3
3 2370 64.6 49.9 40
3 3071 73.7 90.3 63.9
3 3843 69.7 90.4 68.2
. 31267 82.3 99 85.9
. 3452 63.7 61 63.8
. 6757 72.5 90.9 69.1
. 11110 50.8 82.4 77
;
proc discrim simple wcov distance list;/*simple:要求技术各类样品的简单描述统计量;选项WCOV要求计算类内协方差阵;选项DISTANCE要求计算马氏距离;选项LIST要求输出重复替换归类结果。由于没有给出方法选项,所以系统按缺省时的正态分布进行有关参数的估计和归类。*/
class type;
var gdp life rate zhrate;
run;

proc discrim pool=test slpool=0.05 list; /*simple: */
class type;
priors '1'=0.3 '2'=0.4 '3'=0.3 ;
run;

proc discrim method=npar k=2 list; /*simple: */
class type;
run;

proc candisc out=result ncan=2; /*simple: */
class type;
var gdp life rate zhrate;
run;
proc gplot data=reult;
plot can1*can2=type;
run;
proc discrim data=result distance list;
class type;
var can1 can2;
run;
未定义与 'char' 类型的输入参数相对应的函数 'data'。_

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

相关推荐