Likelihood evaluation failed with fault 333 ; trying with reduced updates
asreml软件报错:
Likelihood evaluation failed with fault 333 ; trying with reduced updates
Error in asreml(trait1 ~ Block/Rep, random = ~vm(ID, ainv), data = nested) :
ASReml failed to build MME (XXG); try increasing ‘workspace’.
十有八九:
看一下ainv有没有数值:
> head(ainv)
Row Column Ainverse
说明构建逆矩阵出错。
狗血的解决方案:
重启R语言,在运行一下。
怀疑的bug:
ainverse间歇性神经!!!
另外的解决方式:
运行下面命令,查看ainv有无结果,如果有,就说嘛ainverse
能用了。
library(asreml)
data("harvey")
ped = harvey.ped
head(ped)
str(ped)
ainv = ainverse(ped)
head(ainv)
str(ainv)
sessionInfo()
显示信息:
> library(asreml)
> data("harvey")
>
> ped = harvey.ped
> head(ped)
Calf Sire Dam
1 101 Sire_1 0
2 102 Sire_1 0
3 103 Sire_1 0
4 104 Sire_1 0
5 105 Sire_1 0
6 106 Sire_1 0
> str(ped)
'data.frame': 65 obs. of 3 variables:
$ Calf: int 101 102 103 104 105 106 107 108 109 110 ...
$ Sire: chr "Sire_1" "Sire_1" "Sire_1" "Sire_1" ...
$ Dam : int 0 0 0 0 0 0 0 0 0 0 ...
>
> ainv = ainverse(ped)
> head(ainv)
Row Column Ainverse
[1,] 1 1 3.666667
[2,] 2 2 3.666667
[3,] 3 3 2.666667
[4,] 4 4 3.666667
[5,] 5 5 3.333333
[6,] 6 6 3.000000
> str(ainv)
'matrix' num [1:139, 1:3] 1 2 3 4 5 6 7 8 9 10 ...
- attr(*, "inbreeding")= Named num [1:74] 0 0 0 0 0 ...
..- attr(*, "names")= chr [1:74] "Sire_1" "Sire_2" "Sire_3" "Sire_4" ...
- attr(*, "logdet")= num -18.7
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:3] "Row" "Column" "Ainverse"
- attr(*, "rowNames")= chr [1:74] "Sire_1" "Sire_2" "Sire_3" "Sire_4" ...
- attr(*, "geneticGroups")= num [1:2] 0 0
>
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] asreml_4.1.0.143 Matrix_1.2-18
loaded via a namespace (and not attached):
[1] lattice_0.20-41 dplyr_1.0.2 crayon_1.3.4 grid_4.0.3 R6_2.5.0
[6] jsonlite_1.7.1 lifecycle_0.2.0 gtable_0.3.0 magrittr_2.0.1 scales_1.1.1
[11] pillar_1.4.7 ggplot2_3.3.2 rlang_0.4.9 rstudioapi_0.13 data.table_1.13.2
[16] generics_0.1.0 vctrs_0.3.5 ellipsis_0.3.1 tools_4.0.3 glue_1.4.2
[21] purrr_0.3.4 munsell_0.5.0 compiler_4.0.3 pkgconfig_2.0.3 colorspace_2.0-0
[26] tidyselect_1.1.0 tibble_3.0.4