YinLiLin / hibayes

:swimmer: Individual-Level, Summary-Level and Single-Step Bayesian Regression Models for Genomic Prediction and Genome-Wide Association Studies
GNU General Public License v3.0
48 stars 7 forks source link

Errors from testing script #11

Open jguhlin opened 3 years ago

jguhlin commented 3 years ago

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)
YinLiLin commented 3 years ago

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.

jguhlin commented 3 years ago

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

YinLiLin commented 2 years ago

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