Installation

If you encounter any issues with installation, try the following script to see if it resolves your issue, as this will also install the other packages that are necessary for concurve to function.

install.packages("concurve", dep = TRUE)

If that doesn’t work, please try installing, and resinstalling R, and then installing the package again.

You can also try installing the developer version with

library(devtools)
install_github("zadchow/concurve")

Distorted Plots

If you encounter issues when plotting the functions, it is because there are a large number of points being plotted, which could lead to the graph being slightly distorted or not loading at all. The simplest solution to this is to refresh the plot and try the function again.

This applies to the ggcurve(), curve_compare(), and plot_compare() functions.

Slow Performance

Because this package is computing thousands of interval estimates via iterations and bootstrapping, it requires a lot of computational power. Luckily, concurve supports parallelization, although it is disabled by default because some users, such as those who use Windows, are unable to use it.

However, if you are able to use parallelization, you can enable it with the following script

library(parallel)
options(mc.cores = detectCores())

The script will detect the number of cores on your machine via the parallel package and use them to speed up the computations, especially for bootstrapping.

However, if you would like to speed up the computations and are unable to use parallelization, then you can reduce the number of steps in the each of the concurve functions, which will drastically reduce the time it takes to complete the operation. By default, most of the steps arguments are set to 10000.

For example, here I changed the number of steps to 100, which is the minimum needed to plot a function, and the process is now much quicker.

system.time(df1 <- curve_rev(point = 1.61, LL = 0.997, UL = 2.59, measure = "ratio", steps = 100))
#>    user  system elapsed 
#>   0.169   0.008   0.178

system.time(df1 <- curve_rev(point = 1.61, LL = 0.997, UL = 2.59, measure = "ratio", steps = 10000))
#>    user  system elapsed 
#>   0.025   0.002   0.027

Bugs

If you encounter any other bugs, please report them at https://github.com/zadchow/concurve/issues

Session info

#> R version 3.6.2 (2019-12-12)
#> Platform: x86_64-apple-darwin15.6.0 (64-bit)
#> Running under: macOS Catalina 10.15.2
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.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] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] concurve_2.4.0
#> 
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.3            lattice_0.20-38       tidyr_1.0.0          
#>  [4] zoo_1.8-7             assertthat_0.2.1      zeallot_0.1.0        
#>  [7] rprojroot_1.3-2       digest_0.6.23         R6_2.4.1             
#> [10] survminer_0.4.6       backports_1.1.5       evaluate_0.14        
#> [13] ggplot2_3.2.1         pillar_1.4.3          gdtools_0.2.1        
#> [16] rlang_0.4.2           lazyeval_0.2.2        uuid_0.1-2           
#> [19] rstudioapi_0.10       data.table_1.12.8     Matrix_1.2-18        
#> [22] flextable_0.5.6       rmarkdown_2.0         pkgdown_1.4.1        
#> [25] desc_1.2.0            splines_3.6.2         stringr_1.4.0        
#> [28] bcaboot_0.2-1         munsell_0.5.0         broom_0.5.3          
#> [31] compiler_3.6.2        xfun_0.12             pkgconfig_2.0.3      
#> [34] systemfonts_0.1.1     base64enc_0.1-3       ProfileLikelihood_1.1
#> [37] htmltools_0.4.0       tidyselect_0.2.5      tibble_2.1.3         
#> [40] gridExtra_2.3         km.ci_0.5-2           crayon_1.3.4         
#> [43] dplyr_0.8.3           ggpubr_0.2.4          MASS_7.3-51.5        
#> [46] grid_3.6.2            xtable_1.8-4          nlme_3.1-143         
#> [49] gtable_0.3.0          lifecycle_0.1.0       metafor_2.1-0        
#> [52] magrittr_1.5          KMsurv_0.1-5          scales_1.1.0         
#> [55] zip_2.0.4             stringi_1.4.5         ggsignif_0.6.0       
#> [58] fs_1.3.1              xml2_1.2.2            survMisc_0.5.5       
#> [61] vctrs_0.2.1           generics_0.0.2        boot_1.3-24          
#> [64] pbmcapply_1.5.0       tools_3.6.2           glue_1.3.1           
#> [67] officer_0.3.6         purrr_0.3.3           parallel_3.6.2       
#> [70] survival_3.1-8        yaml_2.2.0            colorspace_1.4-1     
#> [73] memoise_1.1.0         knitr_1.26