标题: 求助,关于用sas 进行independent t test [打印本页] 作者: shiyiming 时间: 2009-3-8 08:36 标题: 求助,关于用sas 进行independent t test 需要处理一些数据,基本格式如下
var1 var2 var3
... ... ...
但independent t test不是需要 先将var1 var2 var3合成一个var,class后才进行下一步吗?
现在我的疑问就是:用sas怎么合成那个var呢?
谢谢各位了作者: shiyiming 时间: 2009-4-18 12:52 标题: Re: 求助,关于用sas 进行independent t test i will assume the three vars are the three classes for the same thing. for example, three levels of age.
first, you cannot do t test for more than 3 levels. if so ,that called anova.
if you want to combine the three columns into one you can do like that
data dset1(keep=class var1 rename=(var1=var)) dset2(keep=class var2 rename=(var2=var)) dset3(keep=class var3 rename=(var3=var));
set yourdata;
class=1;ouput dset1;
class=2; output dset2;
class=3;output dset3;
run;
data dset;
set dset1 dset2 dset3;
run;
proc glm;
class class;
model var=class;
run;