全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3534 5
2012-10-23
分析线性回归和平方回归时 用 contrast语句,后面还要配相应的系数,系数的获得是用这样的语句,
proc iml;
x={2 4 6};
xp=orpol(x,2);
print xp;
run;

由获得的系数再用在contrast 语句后,做线性和平方回归的分析,有谁用过这个呢?
contrast "zuhe linear" zuhe -0.707107        0        0.7071068;
contrast "zuhe quadratic" zuhe 0.4082483        -0.816497        0.4082483;

二维码

扫码加我 拉你入群

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

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

全部回复
2012-11-12 20:02:17
where is the contrast statement
二维码

扫码加我 拉你入群

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

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

2012-11-17 00:30:59
大数据之魂 发表于 2012-11-12 20:02
where is the contrast statement
proc GLM;
class         zuhe        youshi        junyundu;
model net =        zuhe junyundu youshi zuhe*junyundu/ss4;
random youshi/q;
lsmeans zuhe junyundu;
means zuhe junyundu/duncan;

contrast "zuhe linear" zuhe -0.707107        0        0.7071068;
contrast "zuhe quadratic" zuhe 0.4082483        -0.816497        0.4082483;

run;

这是我的程序,您能帮我分析下这个可行吗
二维码

扫码加我 拉你入群

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

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

2012-11-17 04:04:36
you are right. since your test variable is equally spaced, i.e., { 2 4 6}, so all contrasts written like the following forms
Linear   -1   0   1   &       Quad      1  -2   1
were correct to test linear &  quad trend.
we know that the constrast does not matter about a factor added, for example {-1 0 1} == {-1.234 0 1.234}, and so on.

Jingju
二维码

扫码加我 拉你入群

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

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

2012-11-17 09:57:19
continue on the last post:
I saw an interaction term  zuhe*junyundu. so i doubt the above code is proper to test linear trend for ' zuhe', but i dont know how to adjust for it.
\jingju
二维码

扫码加我 拉你入群

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

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

2012-11-17 10:04:43
jingju11 发表于 2012-11-17 09:57
continue on the last post:
I saw an interaction term  zuhe*junyundu. so i doubt the above code is p ...
ok, thanks very much, you are a very nice man~~
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群