转|Singularity in AI matrix when fitting ANIMAL model

Question: I want to estimate the heritability of fish body weight but get the ASReml error Singularity in Average Information Matrix The asreml manual suggests I need to modify the model but the model is very simple. How can I get the heritability of body weight? [from https://www.vsni.co.uk/forum/viewtopic.php?t=144]

My ASReml job is

Data analysis for Flounder 
animal !A !P 
sire !A !P 
dam !A !P 
tank * !I 
age 
bl 
wt 
yaping.dat !ALPHA !SKIP 1 !MAKE 
yaping.dat !SKIP 1 !MAXIT 500 
wt ~ mu age !r animal 

Note that !A is not required with !P since the fact that the fields are alphanumeric is declared by the !ALPHA qualifier on the pedigree file line.

Answer

This is a common problem which arises because of the nature of the animal model.
What is happening?
Looking at the iteration summary we see

1 LogL=-3727.99 S2= 105.60 1298 df 0.1000 1.000
2 LogL=-3698.00 S2= 99.129 1298 df 0.1296 1.000
3 LogL=-3644.01 S2= 86.829 1298 df 0.2218 1.000
4 LogL=-3594.78 S2= 72.626 1298 df 0.4400 1.000
5 LogL=-3560.18 S2= 54.273 1298 df 1.062 1.000
6 LogL=-3545.76 S2= 35.421 1298 df 2.550 1.000
7 LogL=-3540.01 S2= 18.033 1298 df 6.809 1.000
8 LogL=-3537.88 S2= 5.9630 1298 df 24.47 1.000
9 LogL=-3537.25 S2= 0.84544 1298 df : 1 components restrained
10 LogL=-3537.16 S2= 0.53997E-01 1298 df : 1 components restrained
11 LogL=-3537.15 S2= 0.34172E-02 1298 df 0.4607E+05 1.000

Notice that the residual is shrinking as the variance ratio explodes. It fails because the residual has become too small.
The singularity in AI matrix did not appear in the first iteration so the problem is not structural (a common couse of this message) but data dependent.

Why is it happening?

The summary of the structure of the pedigree (given in ASReml 3) is

1339 identities in the pedigree over 1 generations
Sires SiresofSire DamsofSire Dams SiresofDam DamsofDam
26 0 0 13 0 0

There is no pedigree on the parents, and it looks like there are 26 families. After defining sire and dam as

animal !P
sire !A
dam !A

Using tabulate wt ~ sire dam confirms that there are 13 dams and 2 sires per dam.
Fitting the model wt ~ mu age !r sire dam, the model converges to give

10 LogL=-3534.80 S2= 77.627 1298 df 0.6284 1.006 1.000

      • Results from analysis of wt - - -

Approximate stratum variance decomposition
Stratum Degrees-Freedom Variance Component Coefficients
dam 11.17 11412.2 128.1 65.2 1.0
sire 12.88 3545.87 0.0 44.4 1.0
Residual Variance 1273.94 77.6266 0.0 0.0 1.0

Source Model terms Gamma Component Comp/SE % C
dam 13 13 0.628358 48.7773 1.19 0 P
sire 26 26 1.00558 78.0599 2.48 0 P
Variance 1300 1298 1.00000 77.6266 25.24 0 P

Wald F statistics
Source of Variation NumDF DenDF Fic Prob
8 mu 1 11.0 71.29 <.001
5 age 1 13.8 0.34 0.568

Fitting just sire gives

11 LogL=-3535.74 S2= 77.624 1298 df 1.586 1.000
Final parameter values 1.5864 1.0000

      • Results from analysis of wt - - -

Source Model terms Gamma Component Comp/SE % C
sire 26 26 1.58636 123.139 3.42 0 P
Variance 1300 1298 1.00000 77.6240 25.24 0 P

which is almost the same LogL. In the sire + dam model, the actual sire variance is 126.84 (48.78+78.06) and the covariance between families with the same dam is 48.78. Assuming no covariance between families with the same dam, the sire variance is 123.14.
The animal model is based on the genetic assumption that the sire variance represents 0.25 ó2A and the residual represents ó2E+0.75ó2A【这一点不懂】 . This gives ó2A=4 cross 123.14 = 492.56 and ó2E= 77.62 - 369.42 = -291.8. The animal model falls over because ASReml can't estimate a negative residual variance directly【奇异的原因是残差方差为负】.
The bottom line is that there appears to be family effects over and above simple genetic effects. Maybe you need to replicate at the family level so that you can partition the variance better.

What else is happening?

A plot of the residuals against fitted values shows a few (at least 5) fish that are very large relative to their full sibs. Additionally, there is a general fanning of the residuals (but age was not significant) so that heavier families are more variable. This suggests a sqrt transformation might be in order (after fixing outliers).

Plot of Residuals [ -24.7561 63.3026] vs Fitted values [ 6.6769 43.7587] RE11
------------1-----------------------------------------------
. .
. 1 .
. 1 .
. 1 .
. 1 1 .
. 1 .
. 1 .
. 1
. 1 1 1
. 1 2 .
. 1 1 11 1 2 2 1 11
. 1 2 1 2 1 2 23
. 1 121 2 1 1 4 22 1 5 6 22
. 33 43 115 5 4 3 43 1 2 54
. 3 243 *5 365 127 3 53 1 2 4 31

    • 2 7 7 683 587 4 7 5 5 5 *2
      • 2 9 989 755 8 9 4 7 7 36
        -------1--9--87---46-----6-56------8-----3----3--8
        7 7 9 *** ** 8** 668 8 82 8 * 3 33
        . 1 3 554 7 737 78 7 45 4 4 7 37
        . 1 11 194 3 31 3 4 4 34
        . 21 2 25 3 3 4 22
        . 11 5 1 1 12
        -------------------------------------------------------1--31

See Also
Work through the ASReml tutorial B2 and B3 on the sire and animal model for further explanation.


Further to my response last night,

What if genetic is just the dam component?

I am not very familiar with fish experiments but I understand that sometimes families are raised in different tubs. Since in this case, families are represented by sires, if these families were raised in different tubs, then the sire variance is tub variance (in the sire dam model), and the dam variance is primarily genetic. Under this scenario, sire is analgous to 'maternal environment' effects in animal experiments.
I have therefore fitted sire + dam (allowing for 6 outliers and on the log scale with the model, see below)
log(wt) ~ mu age out(53) out(301) out(302) out(342) out(1004) out(631) !r sire dam

This gives
Source Model terms Gamma Component Comp/SE % C
dam 13 13 0.747327 0.104939 1.09 0 P
sire 26 26 1.40185 0.196846 2.50 0 P
Variance 1300 1292 1.00000 0.140419 25.18 0 P

The dam variance is still too large to provide a plausible heritability though. That is, the residual still goes to the boundary in the 'sire + animal' model because 0.104939 > 0.140419/3
The bottom line is that there appears to be family effects over and above simple genetic effects. Maybe you need to replicate at the family level so that you can partition the variance better.

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,193评论 6 498
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,306评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,130评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,110评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,118评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,085评论 1 295
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,007评论 3 417
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,844评论 0 273
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,283评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,508评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,667评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,395评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,985评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,630评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,797评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,653评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,553评论 2 352

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,322评论 0 10
  • 今天日记赶了个早…… 王嘉琪今天表现不错,尤其在朗读群里。从早晨读到晚上,趁我不注意就拿走手机,在那一个劲的背,更...
    琪子妈阅读 109评论 1 6
  • 你说过你后悔遇见了我 你说过让我离开你身边 你说爱情 像掉落在悬崖下面的针 会突然的就消失不见了 你说隔壁的花匠已...
    不像冬天丶阅读 142评论 4 2
  • 福康吉利小火锅双十二活动来袭,吃一百返三十,上不封顶以此类推,套餐不参与活动,吃货们赶紧吧[勾引]转发朋友圈即送肥...
    福康吉利阅读 302评论 0 0
  • 2017年9月20日晚8时许,太康县教体局副主任科员孙峰松、教体局办公室负责人高同厂、李放一行三人,到毛庄...
    人生如梦789阅读 1,431评论 0 0