楼主: fhr19
3214 12

[原创博文] Regression 问题 [推广有奖]

  • 0关注
  • 0粉丝

高中生

82%

还不是VIP/贵宾

-

威望
0
论坛币
9 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
265 点
帖子
32
精华
0
在线时间
22 小时
注册时间
2012-2-21
最后登录
2012-8-21

楼主
fhr19 发表于 2012-3-6 02:38:38 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

final data.xls (1.28 MB)



请教各位大牛,我的worksheet 在附件中,为什么我用这些变量做regression :

proc reg data=a;

model controlpremium= totaltransactionvalue priorcap percentsought totalcommonequity time sic beta gdp;

run;

会报错那?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:regression regressio regress ESS RES 错那

沙发
fhr19 发表于 2012-3-6 03:01:05
ERROR: Variable totaltransactionvalue in list does not match type prescribed for this list.
ERROR: Variable priorcap in list does not match type prescribed for this list.
ERROR: Variable percentsought in list does not match type prescribed for this list.
ERROR: Variable totalcommonequity in list does not match type prescribed for this list.
ERROR: Variable beta in list does not match type prescribed for this list.
这样的错误是不是变量类型有问题那?谢谢

藤椅
jingju11 发表于 2012-3-6 04:47:22
You are right. REG only takes numbers, not ones like numbers, '123', but true numbers, 123.
Jingju

板凳
fhr19 发表于 2012-3-6 04:52:07
jingju11 发表于 2012-3-6 04:47
You are right. REG only takes numbers, not ones like numbers, '123', but true numbers, 123.
Jingju
then how could i change the currently numbers into the form i need? is there any command to do so? could u please do me a favor to give out some codes to fulfill that? Thanks so much for your help.

报纸
fhr19 发表于 2012-3-6 05:02:07
jingju11 发表于 2012-3-6 04:47
You are right. REG only takes numbers, not ones like numbers, '123', but true numbers, 123.
Jingju
another question is that the numbers like, '123', can be calculated but cant do the regression right? cus i conducted calculation on the same dataset. it works, but when i wanna do regression it stuck there.

地板
jingju11 发表于 2012-3-6 05:24:22
Please google how to check and change variable types.
JingJu

7
fhr19 发表于 2012-3-6 05:36:06
jingju11 发表于 2012-3-6 05:24
Please google how to check and change variable types.
JingJu
could the char numbers be calculated? thx:)

8
jingju11 发表于 2012-3-6 05:40:35
what about thinking like that:
before REG fitting the model, it will check if the model was set correctly or not. one the checking rules is, all variables in the model statement have to be numeric type. but your code cannot pass the check-up.
for example,
age ='35'; *age is string;
age1 =input(age, best.); *age1 is numeric;
jingu

9
fhr19 发表于 2012-3-6 05:51:02
jingju11 发表于 2012-3-6 05:24
Please google how to check and change variable types.
JingJu
data a;
set 'D:\a';
totaltransactionvalue1=put(totaltransactionvalue, 66.);
put totaltransactionvalue1;
run;
is this the code for transfering the data format? but why it doesnot work? plz give me some suggestions.

10
491987939 发表于 2012-3-6 05:56:51
dddddddddddd

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 12:41