全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2353 1
2010-09-17
悬赏 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 ...
二维码

扫码加我 拉你入群

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

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

全部回复
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.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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