楼主: O(∩_∩)O~!
2395 1

[原创博文] 求助:关于sas/iml中的designf函数 [推广有奖]

  • 0关注
  • 1粉丝

已卖:8份资源

讲师

18%

还不是VIP/贵宾

-

威望
0
论坛币
3994 个
通用积分
13.4290
学术水平
6 点
热心指数
16 点
信用等级
5 点
经验
8886 点
帖子
276
精华
0
在线时间
333 小时
注册时间
2010-8-5
最后登录
2022-8-16

楼主
O(∩_∩)O~! 发表于 2010-9-17 15:11:23 |AI写论文
50论坛币
下面的内容是在sas help里看到的,有些地方不太明白,请高手帮忙解释下,多谢!1  design matrix 指的是什么样的矩阵?
2  函数运行后的结果怎么来理解?
The DESIGNF FunctionThe DESIGNF function generates a full-rank design matrix, useful in calculating ANOVA tables. It has the general form

DESIGNF( column-vector );
For example, the following statement creates a full-rank design matrix for a one-way ANOVA, where the treatment factor has three levels and there are n1=3, n2=2, and n3=2 observations at the factor levels:     

   >  d=designf({1,1,1,2,2,3,3});              
D             7 rows      2 cols    (numeric)                                 
1         0                                 
1         0                                
1         0                                 
0         1                                 
0         1                                 
-1        -1                                
-1        -1

最佳答案

bobguy 查看完整内容

Here is a weblink for design matrix. http://en.wikipedia.org/wiki/Design_matrix The corresponding function in SAS for the example in the weblink is proc iml; d=design({1,1,1,2,2,3,3}); print d; quit; Since the intercept column will be a linear combination of other columns(note the moments will not be a full rank.). Usually SAS use the last level as a reference level. This s ...
关键词:Design sign ESI observations Calculating following function general creates example

沙发
bobguy 发表于 2010-9-17 15:11:24
O(∩_∩)O~! 发表于 2010-9-17 15:11
下面的内容是在sas help里看到的,有些地方不太明白,请高手帮忙解释下,多谢!1  design matrix 指的是什么样的矩阵?
2  函数运行后的结果怎么来理解?
The DESIGNF FunctionThe DESIGNF function generates a full-rank design matrix, useful in calculating ANOVA tables. It has the general form

DESIGNF( column-vector );
For example, the following statement creates a full-rank design matrix for a one-way ANOVA, where the treatment factor has three levels and there are n1=3, n2=2, and n3=2 observations at the factor levels:     

   >  d=designf({1,1,1,2,2,3,3});              
D             7 rows      2 cols    (numeric)                                 
1         0                                 
1         0                                
1         0                                 
0         1                                 
0         1                                 
-1        -1                                
-1        -1
Here is a weblink for design matrix.
http://en.wikipedia.org/wiki/Design_matrix

The corresponding function in SAS for the example in the weblink is

proc iml;
d=design({1,1,1,2,2,3,3});   
print d;

quit;

Since the intercept column will be a linear combination of other columns(note the moments will not be a full rank.). Usually SAS use the last level as a reference level. This setting sometime is called GLM setting. A design matrix can be set in many difference way. But all regression results should be equivelent. The explaination will be defferent in term of its design matrix.
已有 1 人评分热心指数 收起 理由
O(∩_∩)O~! + 1 谢谢!

总评分: 热心指数 + 1   查看全部评分

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

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