楼主: clearbetty
7331 5

The CLASS variable has more than two levels? [推广有奖]

  • 0关注
  • 0粉丝

初中生

85%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
455 点
帖子
28
精华
0
在线时间
8 小时
注册时间
2008-11-24
最后登录
2018-3-9

楼主
clearbetty 发表于 2009-6-23 02:01:21 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我在做SAS 的时候
proc ttest data= data06.ttest;
class dnum;
var se_vest2 ae_vest2;
run;
这一步说我——
The CLASS variable has more than two levels
请问是什么意思啊?
二维码

扫码加我 拉你入群

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

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

关键词:Variable Levels Level ABLE Than The Variable two Levels Class

回帖推荐

jingju11 发表于2楼  查看完整内容

Clearly here, t test can only be performed on the 2-level factor; but dnum has more than 2 levels. You can go to proc glm or anova for a F test on the >2 level variable.

本帖被以下文库推荐

沙发
jingju11 发表于 2009-6-23 02:28:38
clearbetty 发表于 2009-6-23 02:01
我在做SAS 的时候
proc ttest data= data06.ttest;
class dnum;
var se_vest2 ae_vest2;
run;
这一步说我——
The CLASS variable has more than two levels
请问是什么意思啊?
Clearly here, t test can only be performed on the 2-level factor; but dnum has more than 2 levels. You can go to proc glm or anova for a F test on the >2 level variable.
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

藤椅
clearbetty 发表于 2009-6-23 06:31:02
2# jingju11
但是我限定的不是两个变量么? var 只设了两个啊?

板凳
jingju11 发表于 2009-6-23 08:32:49
3# clearbetty

和变量个数无关。你的程序是在做two-sample independent t test.
whatever, you should read more about that.

报纸
jingju11 发表于 2009-6-23 08:39:16
if x be the indicator for the group, for example, x=1 is the group of male and x=2 is the group of  female.
y be the height for each student in both group . now you want to compare the means of height for each group.
so if the student is independent to each other and height is rougly normally distributed. then you can test that like the following:

proc ttest data=YourData;
class x;
var y;
run;
*again here, x only has value of 1 and 2, called two-level; y is the variable you want to compare;

地板
花姒浅 发表于 2015-10-23 09:28:29
看了看时间已经过去好几年了,挖个坟,因为我自己今天也遇到这个问题了
题目是 假说:“北方动物比南方动物具有较短的附肢。”为验证这一假说,调查了如下鸟翅长(mm)资料。北方的:120113125118116114119;南方的:116117121114116118123120。试验证这一假说。
我编的程序,开始是
data ttest_2;input temp long @@;
cards;
n 120 113 125 118 116 114 119
s 116 117 121 114 118 123 120
;
proc ttest;class temp;
var long;run;

然后就跳出来The CLASS variable has more than two levels
后来看了看书,发现  分组的符号貌似要用数字,每一个数据前面都要带上分组符号
我也不知道是不是因为这个,不过,后面程序运行成功了
修改后:
data ttest_2;input temp long @@;
cards;
1 120 1 113 1 125 1 118 1 116 1 114 1 119
2 116 2 117 2 121 2 114 2 118 2 123 2 120
;
proc ttest;class temp;
var long;run;


我刚刚开始接触SAS,才疏学浅,有什么不对的还请指正,可以加我扣扣号交流446974093


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

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