yzhlinscau的个人博客分享 http://blog.sciencenet.cn/u/yzhlinscau

博文

ASReml-R与协变量模型分析

已有 2846 次阅读 2014-8-7 14:20 |个人分类:ASReml|系统分类:科研笔记

实际工作中,常常会遇到不同年份的试验,数据如何整合一起分析。这里举个简单的例子,有一片种源试验林,其中2块为8年林,一块为9年林。把上述3片林一起分析,进而选择表现好的种源。这时,就可以将年份作为协变量,引入线性模型中,消除年份的影响,从而可以筛选出目标种源。


首先,数据的部分格式如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
> head(df)
 Treeid Mum  Dad Provence Plustree Family Block Block1 Line
1  10001 263 <NA>       23      L60    263     B      2    8
2  10002 237 <NA>       23       L5    237     B      2    8
3  10003 234 <NA>       23       L2    234     B      2    8
4  10004 260 <NA>       23      L56    260     B      2    8
5  10005 236 <NA>       23       L4    236     B      2    8
6  10006 214 <NA>       22    22003    214     B      2    8
 Linetree Trail year  d10
1        1    gd    8 10.4
2       10    gd    8   NA
3       11    gd    8  5.2
4       12    gd    8 12.8
5       13    gd    8 12.2
6       14    gd    8 15.5

这里,使用种源、家系和个体模型,代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
## 种源模型
m1<-asreml(d10~year+Block, random=~Provence+Block:Line,
              data=df)
 
## 家系模型
m2<-asreml(d10~year+Block, random=~Provence+Provence/Family+Block:Line,
               data=df)
 
## 单株模型
m3<-asreml(d10~year+Block, random=~ped(Treeid)+Block:Line,
               ginverse=list(Treeid=pedinv),data=df)
 
 
summary(m1)$varcomp
wald(m1)

运行结果如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## 种源模型
> summary(m1)$varcomp
                          gamma component std.error
Provence!Provence.var 0.02190295 0.1751748 0.1139682
Block:Line!Block.var  0.20059090 1.6042807 0.2134393
R!variance            1.00000000 7.9977740 0.1953053
                       z.ratio constraint
Provence!Provence.var  1.537050   Positive
Block:Line!Block.var   7.516331   Positive
R!variance            40.950106   Positive
> wald(m1)
Wald tests for fixed effects
 
Response: d10
 
Terms added sequentially; adjusted for those above
 
             Df Sum of Sq Wald statistic Pr(Chisq)  
(Intercept)    1     39518         4941.1 < 2.2e-16 ***
year           1       511           63.9 1.332e-15 ***
Block         14      1260          157.6 < 2.2e-16 ***
residual (MS)            8                            
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 
## 家系模型
> summary(m2)$varcomp
                                 gamma component std.error
Provence!Provence.var        0.01663476 0.1247737 0.1130592
Provence:Family!Provence.var 0.07452158 0.5589699 0.1154963
Block:Line!Block.var         0.22213146 1.6661590 0.2170419
R!variance                   1.00000000 7.5007789 0.1869149
                              z.ratio constraint
Provence!Provence.var         1.103614   Positive
Provence:Family!Provence.var  4.839722   Positive
Block:Line!Block.var          7.676671   Positive
R!variance                   40.129378   Positive
> wald(m2)
Wald tests for fixed effects
 
Response: d10
 
Terms added sequentially; adjusted for those above
 
             Df Sum of Sq Wald statistic Pr(Chisq)  
(Intercept)    1     36040         4804.8 < 2.2e-16 ***
year           1       444           59.3 1.388e-14 ***
Block         14      1193          159.1 < 2.2e-16 ***
residual (MS)            8                            
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 
## 单株模型
> summary(m3)$varcomp
                        gamma component std.error   z.ratio
ped(Treeid)!ped      0.4356748  2.464560 0.4825557  5.107306
Block:Line!Block.var 0.2948261  1.667796 0.2172520  7.676779
R!variance           1.0000000  5.656878 0.4210363 13.435606
                    constraint
ped(Treeid)!ped        Positive
Block:Line!Block.var   Positive
R!variance             Positive
> wald(m3)
Wald tests for fixed effects
 
Response: d10
 
Terms added sequentially; adjusted for those above
 
             Df Sum of Sq Wald statistic Pr(Chisq)  
(Intercept)    1     51931         9180.1 < 2.2e-16 ***
year           1       491           86.8 < 2.2e-16 ***
Block         14       939          166.1 < 2.2e-16 ***
residual (MS)            6                            
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

从结果看,年份作为协变量的效应是显著的。


种源的筛选可以通过育种值来获取,将部分育种值展示如下。

1
2
3
4
5
6
7
> summary(m1,all=T)$coef.random[1:5,]
              solution std error    z ratio
Provence_11  0.26767555 0.2443300  1.0955494
Provence_12 -0.34572466 0.2500429 -1.3826613
Provence_13  0.03588465 0.2311507  0.1552435
Provence_15  0.24067021 0.2664837  0.9031329
Provence_17 -0.19850575 0.2324755 -0.8538781

此外,还有家系和个体模型,根据对应的育种值,也可筛选出优良的家系或个体。




https://wap.sciencenet.cn/blog-1114360-817794.html

上一篇:ASReml-R与阈性状(threshold trait)分析
下一篇:random regression model之ASReml V4篇
收藏 IP: 14.151.10.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-1 13:11

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部