squidgroup/squidSim

speed up internal matrix functions

joelpick opened this issue · 3 comments

speed up internal matrix functions

maybe use mvnfast::rmvn its very fast :)

for predictors with no cov_str, switch to MASS::mvrnorm or mvnfast::rmvn, for ped and phylo probably switch to MCMCglmm::rbv. Problem is dominance and epistasis, and OU models. See what nadiv does for the former.

Not sure how best to do general cor_str - for big matrix, chol is very slow

chol seems to be quicker for cov_str matrices than I though, so using will stick mvnfast::rmvn with a wrapper function to allow 0s (0cf4fc6)