adw96 / breakaway

Species richness with high diversity
68 stars 18 forks source link

No plot associated with Poisson model #88

Closed aguang closed 4 years ago

aguang commented 4 years ago

I ran breakaway on a frequency count table I have. It selected the Poisson model. When I try to plot the estimated_richness I get NULL as opposed to what happens in the intro vignette. Is this expected behavior? My breakaway version is 4.6.16.

ft <- data.frame(Var1=1:33,Freq = c(684036, 38866, 12840, 6454, 3818, 
2575, 1893, 1354, 1042, 843, 688, 537, 433, 344, 337, 267, 221, 
207, 172, 144, 138, 115, 99, 82, 74, 68, 47, 65, 41, 37, 30, 
32, 27))
estimated_richness <- breakaway(ft)
> plot(estimated_richness)
NULL
> estimated_richness$model
[1] "Poisson"
> R.version
               _                           
platform       x86_64-apple-darwin15.6.0   
arch           x86_64                      
os             darwin15.6.0                
system         x86_64, darwin15.6.0        
status                                     
major          3                           
minor          6.2                         
year           2019                        
month          12                          
day            12                          
svn rev        77560                       
language       R                           
version.string R version 3.6.2 (2019-12-12)
nickname       Dark and Stormy Night 

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.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/3.6/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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] vegan_2.5-6                 lattice_0.20-41             permute_0.9-5               pheatmap_1.0.12            
 [5] gridExtra_2.3               DESeq2_1.26.0               SummarizedExperiment_1.16.1 DelayedArray_0.12.3        
 [9] BiocParallel_1.20.1         matrixStats_0.56.0          Biobase_2.46.0              GenomicRanges_1.38.0       
[13] GenomeInfoDb_1.22.1         IRanges_2.20.2              S4Vectors_0.24.4            BiocGenerics_0.32.0        
[17] forcats_0.5.0               stringr_1.4.0               dplyr_0.8.5                 purrr_0.3.4                
[21] readr_1.3.1                 tidyr_1.0.2                 tibble_3.0.1                ggplot2_3.3.0              
[25] tidyverse_1.3.0             magrittr_1.5                breakaway_4.6.16           

loaded via a namespace (and not attached):
  [1] colorspace_1.4-1       ellipsis_0.3.0         htmlTable_1.13.3       XVector_0.26.0         base64enc_0.1-3       
  [6] fs_1.4.1               rstudioapi_0.11        farver_2.0.3           bit64_0.9-7            AnnotationDbi_1.48.0  
 [11] fansi_0.4.1            lubridate_1.7.8        xml2_1.3.2             codetools_0.2-16       splines_3.6.2         
 [16] geneplotter_1.64.0     knitr_1.28             ade4_1.7-15            Formula_1.2-3          jsonlite_1.6.1        
 [21] phyloseq_1.30.0        annotate_1.64.0        broom_0.5.6            cluster_2.1.0          dbplyr_1.4.3          
 [26] png_0.1-7              compiler_3.6.2         httr_1.4.1             backports_1.1.6        assertthat_0.2.1      
 [31] Matrix_1.2-18          cli_2.0.2              acepack_1.4.1          htmltools_0.4.0        tools_3.6.2           
 [36] igraph_1.2.5           gtable_0.3.0           glue_1.4.0             GenomeInfoDbData_1.2.2 reshape2_1.4.4        
 [41] Rcpp_1.0.4.6           cellranger_1.1.0       vctrs_0.2.4            Biostrings_2.54.0      multtest_2.42.0       
 [46] ape_5.3                nlme_3.1-147           iterators_1.0.12       xfun_0.13              openxlsx_4.1.4        
 [51] rvest_0.3.5            lifecycle_0.2.0        XML_3.99-0.3           zlibbioc_1.32.0        MASS_7.3-51.6         
 [56] scales_1.1.0           hms_0.5.3              biomformat_1.14.0      rhdf5_2.30.1           RColorBrewer_1.1-2    
 [61] yaml_2.2.1             memoise_1.1.0          rpart_4.1-15           RSQLite_2.2.0          latticeExtra_0.6-29   
 [66] stringi_1.4.6          genefilter_1.68.0      foreach_1.5.0          checkmate_2.0.0        zip_2.0.4             
 [71] rlang_0.4.6            pkgconfig_2.0.3        bitops_1.0-6           evaluate_0.14          Rhdf5lib_1.8.0        
 [76] labeling_0.3           htmlwidgets_1.5.1      bit_1.1-15.2           tidyselect_1.0.0       plyr_1.8.6            
 [81] R6_2.4.1               generics_0.0.2         Hmisc_4.4-0            DBI_1.1.0              pillar_1.4.4          
 [86] haven_2.2.0            foreign_0.8-76         withr_2.2.0            mgcv_1.8-31            survival_3.1-12       
 [91] RCurl_1.98-1.2         nnet_7.3-14            modelr_0.1.7           crayon_1.3.4           rmarkdown_2.1         
 [96] jpeg_0.1-8.1           locfit_1.5-9.4         grid_3.6.2             readxl_1.3.1           data.table_1.12.8     
[101] blob_1.2.1             digest_0.6.25          reprex_0.3.0           xtable_1.8-4           munsell_0.5.0       
adw96 commented 4 years ago

Hi @aguang ! Sorry for the delay. Yes, this is expected behaviour. The plots correspond to the methods that estimate parameters via nonlinear least squares. The Poisson model is fit via maximum likelihood, hence, no plot.

I'm going to close this issue but I'm happy to answer further questions.

Amy