[R] heritability estimation

Moohbear acapron at resmaud.net
Fri Oct 14 19:44:45 CEST 2011


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



--
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.



More information about the R-help mailing list