Skip to content

Commit

Permalink
version 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jbe907 authored and gaborcsardi committed Apr 9, 2012
1 parent 9dfb1cd commit 2785286
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: rrBLUP
Title: Ridge regression and other kernels for genomic selection
Version: 3.6
Version: 3.7
Author: Jeffrey Endelman
Maintainer: Jeffrey Endelman <j.endelman@gmail.com>
Description: One application is to estimate marker effects by ridge
Expand All @@ -11,6 +11,6 @@ Description: One application is to estimate marker effects by ridge
Suggests: multicore
License: GPL-3
LazyLoad: yes
Packaged: 2012-04-03 15:31:52 UTC; jeffendelman
Packaged: 2012-04-09 20:10:22 UTC; jeffendelman
Repository: CRAN
Date/Publication: 2012-04-03 21:02:09
Date/Publication: 2012-04-10 04:27:07
6 changes: 3 additions & 3 deletions MD5
@@ -1,10 +1,10 @@
909f5f0706ea232931f64ee54eccdd1f *DESCRIPTION
c0676cc86141fd4e7f05f71b45b6d238 *DESCRIPTION
9983baa53027ec7ecc5c44dc94318515 *NAMESPACE
76fb9f9fdc5f599f1e738375331e9fc1 *NEWS
564add1473e8322fc4fec2d6a89648d1 *NEWS
3426a5afa2b38e987e53b354c267f488 *R/A.mat.R
48dcf02533fd05c528f6c6ea2cd022fb *R/GWA.R
f9b894abb6a3158ebfabe61486dccd94 *R/kinship.BLUP.R
0d21c26c501e27b2d61363e369edb57c *R/mixed.solve.R
60346207605422f7ea47a9848a817498 *R/mixed.solve.R
b74e4e9e2c643e550a83c5ee4eb7e905 *inst/CITATION
fbaf1e01452ed907bdb412ff35f3b067 *man/A.mat.Rd
89ab7c69f6c5dbfca37b5220dd14525b *man/GWA.Rd
Expand Down
4 changes: 4 additions & 0 deletions NEWS
@@ -1,3 +1,7 @@
Changes in 3.7:

* Improved handling of positive semi-definite kinship matrix in mixed.solve.

Changes in 3.6:

* Improved error handling in mixed.solve.
Expand Down
17 changes: 3 additions & 14 deletions R/mixed.solve.R
Expand Up @@ -44,23 +44,12 @@ if (n <= m + p) {
} else {
spectral.method <- "cholesky"
if (!is.null(K)) {
diag(K) <- diag(K) + 1e-6
B <- try(chol(K),silent=TRUE)
if (class(B)=="try-error") {
# K not positive definite
eig.K <- eigen(K,symmetric=TRUE)
if (min(eig.K$values) < -1e-6) {
stop("K not positive semi-definite")
} else {
# use pivoting
options(warn=-1) #disable warning
B <- chol(K,pivot=TRUE)
options(warn=0)
pivot <- attr(B,"pivot")
B <- B[,order(pivot)]
} #if min(eig.K)
} #if class(B)
if (class(B)=="try-error") {stop("K not positive semi-definite.")}
} # if is.null
}

if (spectral.method=="cholesky") {
if (is.null(K)) {
ZBt <- Z
Expand Down

0 comments on commit 2785286

Please sign in to comment.