On Oct 14, 2011, at 1:44 PM, Moohbear wrote:

Thanks for the sos function, I didn't know about it. Unfortunately, almost
all the entries listed are not relevant to my problem.
qgen seems to be doing what I want, but gives error message when I type library(qgen): "Error: package 'qgen' was built before R 2.10.0: please re-install it". I've tried and succeeded (I think) to install it from the
source, but I get the same error.
rrBLUP should in theory do, but the I don't really understand the sample code and it doesn't work either anyway (the sample code for mixed.solve).

G <- matrix(rep(0,200*1000),200,1000)
for (i in 1:200) {
+ G[i,] <- ifelse(runif(1000)<0.5,-1,1)
+ }
u <- rnorm(1000)
g <- as.vector(crossprod(t(G),u))
h2 <- 0.5
y <- g + rnorm(200,mean=0,sd=sqrt((1-h2)/h2*var(g)))
ans <- mixed.solve(y,Z=G)
Error in dim(x) : 'x' is missing

I'm not getting the same error with that code. I installed the binary rrBLUP_1.8 for Mac from a CRAN mirror with only a warning that it was compiled on R 2.13.2. The copy-pasted code runs without error on a slightly older version of R 2.13.1 in an even older version of my OS (Mac OS 10.5.8) on a three year-old machine. The next lines also run without error:

> accuracy <- cor(u,ans$u)
> accuracy
[1] 0.3117429




--
View this message in context: 
http://r.789695.n4.nabble.com/heritability-estimation-tp3904908p3905689.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to