squidgroup / squidSim

squidSim in tool for simulating data from multi-level/hierarchical models, including genetic, phylogenetic, temporal and spatial effects
Other
6 stars 0 forks source link

speed up internal matrix functions #11

Closed joelpick closed 2 years ago

joelpick commented 2 years ago

maybe use mvnfast::rmvn its very fast :)

joelpick commented 2 years ago

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

joelpick commented 2 years ago

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)