hibayes icon indicating copy to clipboard operation
hibayes copied to clipboard

Errors from testing script

Open jguhlin opened this issue 4 years ago • 3 comments

Running the following I'm getting based off of the newest github commit.

I also sometimes get recursive gc invocation but can't quite get the code down to reproduce it yet...

Warning: stack imbalance in '=', 2 then -74
library("hibayes")

set.seed(42)
n = 10000
m = 1000
k = 10
h2 = 0.5

n = 1000
m = 1000
Z = matrix(sample(c(0, 1, 2), n*m, prob=c(0.25, 0.5, 0.25), replace=TRUE), n)
Z = apply(Z, 2, function(x){x-mean(x)})
k = 10
qtl = sort(sample(1:m, k))
betaTrue = array(0,m)
betaTrue[qtl] = rnorm(k)
h2 = 0.5

g = Z%*%betaTrue
vg = var(g)
ve = (1-h2)/h2 * vg
y = g + rnorm(n,0,sqrt(ve))

fit = bayes(y=y, Z=Z, model="R", niter=1000, nburn=500)

jguhlin avatar Nov 12 '21 22:11 jguhlin

Thank you for trying, actually this error is caused by the unaccomplished project on GitHub, as i am updating hibayes with more features, so the version on Github is still on developing, some examples and input parameters may not work anymore. It won't take too much time, i will leave you a massage if i finished the final version.

YinLiLin avatar Nov 15 '21 01:11 YinLiLin

Ah, no worries then! I'll revert to an older commit for now. Cheers. :)

jguhlin avatar Nov 15 '21 02:11 jguhlin

Hi, the final version of hibayes has been completed, the latest version could be installed from GitHub, please feel free to have try. Cheers.

YinLiLin avatar Dec 07 '21 09:12 YinLiLin