thej022214 / OUwie

Estimates and compares rate differences of continuous character evolution under Brownian motion and a new set of Ornstein-Uhlenbeck (OU) models that allow the strength of selection and drift to vary across selective regimes.
8 stars 3 forks source link

Error in OUwie.boot #9

Closed jonnations closed 4 years ago

jonnations commented 4 years ago

Hi,

I am getting a consistent error in OUwie.boot() OUwie.boot() runs all of the boostrap analysis requested, but after it is finished, when parsing the output, it produces this error: Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to array extent

I am using OUwie v. 2.3

This example from the documentation always produces the error on my machine. I also tried adjusting a variety of OUwie() inputs to no avail. It seems like the # of parameters from OUwie doesn't match up with something?

library(OUwie)

data(tworegime)

pp <- OUwie(tree, trait, model = "OUM")

boot.reps <- OUwie.boot(tree,trait,model="OUM", nboot=10, alpha=pp$solution[1,], sigma.sq=pp$solution[2,],theta=pp$theta[,1], theta0=pp$theta[1,1])

Let me know if you would rather have me contact you via email than through a GitHub Issue. I am trying to make some revisions to a manuscript that require the OUwie.boot() ;) Thanks!

sessionInfo()


R version 4.0.1 (2020-06-06)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] OUwie_2.3          RColorBrewer_1.1-2 geiger_2.0.7       nloptr_1.2.2.2     corpcor_1.6.9      ape_5.4           

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5              compiler_4.0.1          lhs_1.0.2               bitops_1.0-6           
 [5] phytools_0.7-47         tools_4.0.1             digest_0.6.25           jsonlite_1.7.0         
 [9] nlme_3.1-148            lattice_0.20-41         png_0.1-7               pkgconfig_2.0.3        
[13] Matrix_1.2-18           fastmatch_1.1-0         igraph_1.2.5            parallel_4.0.1         
[17] mvtnorm_1.1-1           expm_0.999-5            xfun_0.16               interp_1.0-33          
[21] coda_0.19-3             knitr_1.29              gtools_3.8.2            maps_3.3.0             
[25] combinat_0.0-8          grid_4.0.1              scatterplot3d_0.3-41    deSolve_1.28           
[29] paleotree_3.3.25        plotrix_3.7-8           animation_2.6           phangorn_2.5.5         
[33] deldir_0.1-28           magrittr_1.5            MASS_7.3-51.6           mnormt_2.0.1           
[37] numDeriv_2016.8-1.1     quadprog_1.5-8          subplex_1.6             RCurl_1.98-1.2         
[41] tmvnsim_1.0-2           clusterGeneration_1.3.4```
thej022214 commented 4 years ago

I will work on this first thing tomorrow. Thank you for letting me know!

thej022214 commented 4 years ago

Fixed this bug. The issue was that it was looking for a root regime when it is no longer part of the theta output except in cases when specified (get.root.theta=TRUE). The version is committed and can be pulled or install directly from here using devtools.