Coder Social home page Coder Social logo

zadrafi / concurve Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 3.0 74.25 MB

A repository for the 'concurve' R package which generates confidence distributions and likelihood functions. Includes documentation on how to do produce similar graphs for Stata.

Home Page: https://stat.lesslikely.com/concurve/

License: GNU General Public License v3.0

R 33.44% CSS 4.61% JavaScript 1.26% HTML 2.28% Makefile 0.19% TeX 58.21% Rez 0.02%
confidence-intervals compatibility-intervals stata confidence-distribution likelihood-functions bootstrap-method r frequentist-methods fiducial-distribution consonance

concurve's Introduction

concurve | Graph Frequentist Distributions of Parameters


CRAN status Lifecycle: maturing Monthly Downloads Total Downloads Rdoc License: GPL v3 Travis build status Codecov test coverage

Compute & Graph Confidence Distributions and Likelihood Functions

Sample image taken from Schweder T, Hjort NL. (2016)


For A Better Understanding of What These Are, See the Background Literature


Compare The Functions From Different Studies


Export Tables Easily For Word, Powerpoint, & TeX documents


Install the package from CRAN and check out the articles, which can also be found below.

(It is highly recommended that you look at the articles.)

install.packages("concurve")

Try the following script if you run into any installation issues:

install.packages("concurve", repos = "https://cloud.r-project.org/", dep = TRUE)

Install the developer version from GitHub using the following:

remotes::install_github("zadrafi/concurve@master", dependencies = TRUE)

See which versions of the package are currently supported here.


Articles

Check out the article on using Stata to obtain similar functions.

See the following articles:

Citation

To properly cite the package, please see the following page or run the R script below.

citation("concurve")

Code of Conduct

Please note that the concurve project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Environment

The package was currently run on:

## R version 4.0.2 (2020-06-22)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Catalina 10.15.6
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.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     
## 
## loaded via a namespace (and not attached):
##  [1] compiler_4.0.2    magrittr_1.5      credentials_1.3.0 htmltools_0.5.0   tools_4.0.2       yaml_2.2.1        stringi_1.5.3    
##  [8] rmarkdown_2.4     knitr_1.30        stringr_1.4.0     xfun_0.18         digest_0.6.25     rlang_0.4.7       openssl_1.4.3    
## [15] sys_3.4           evaluate_0.14     askpass_1.1

concurve's People

Contributors

arcaldwell49 avatar avigotsky avatar zadrafi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

concurve's Issues

Problem getting consonance intervals from rma.mh()

I am planning to produces consonance intervals for a meta-analysis Project. I need to use Mantel-Haenszel method to pool binary outcome. Here is an issue I ran in to.

library(metafor)
library(concurve)
#dataset from metafor
data(dat.linde2005) 
#pool binary outcomes using RR with fixed effects in linear model with rma.uni function
justsomeRR<-rma.uni(ai=ai,bi=(n1i-ai),ci=ci,di=(n2i-ci),data=dat.linde2005,measure="RR",add=0.5,digits=2,method="FE")
#get consonance intervals
metaf<-curve_meta(justsomeRR,steps=100)
#pool binary outcomes using RR based on fixed effects Mantel-Haenszel methods with rma.mh function
justsomeRR.2<-rma.mh(ai=ai,bi=(n1i-ai),ci=ci,di=(n2i-ci),data=dat.linde2005,measure="RR",add=0.5,digits=2)
#a problem with consonance intervals
metaf2<-curve_meta(justsomeRR.2,steps=100)

Concurve fails to compile on Catalina OS X

Describe the bug
install.packages("concurve")
ends with:

** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Users/torkarr/Library/R/3.6/library/systemfonts/libs/systemfonts.so':
  dlopen(/Users/torkarr/Library/R/3.6/library/systemfonts/libs/systemfonts.so, 6): Library not loaded: /opt/X11/lib/libfreetype.6.dylib
  Referenced from: /Users/torkarr/Library/R/3.6/library/systemfonts/libs/systemfonts.so
  Reason: image not found
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘concurve’

Additional context
Running R 3.6.1 and have this installed (probably via brew):

torkarr@xyz ~ % ls /usr/local/lib/libfree*
/usr/local/lib/libfreebl.a         /usr/local/lib/libfreetype.dylib
/usr/local/lib/libfreebl3.dylib    /usr/local/lib/libfreexl.1.dylib
/usr/local/lib/libfreetype.6.dylib /usr/local/lib/libfreexl.a
/usr/local/lib/libfreetype.a       /usr/local/lib/libfreexl.dylib

Concurve plots from summary statistics

Is your feature request related to a problem? Please describe.
No, not a problem just out of convenience.

Describe the solution you'd like
I think the plots concurve provides are very easy to interpret and visually pleasing. However, the curves can only be created if you have the original data. For example, for the functions for compare means you have to have two "vectors" of data x & y (I assume if paired the function calculates the difference scores). I think it would be helpful if there was an option/function that produces the consonance plots from the summary statistics (preferably the mean difference and standard error). With this option, data presented in the scientific literature (where the reader most likely does not have access to the existing data) could still be visualized with consonance plots. It would also provide more flexibility if the analyses individuals are performing aren't supported by the functions in the package (e.g., emmeans).

Describe alternatives you've considered
None at this time.

Additional context
I can start giving it look and help write the function if needed.

Great work on this package Andrew and Zad!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.