Skip to content

Commit

Permalink
Merge pull request #5 from Zadchow/testing
Browse files Browse the repository at this point in the history
Testing Developments Pushed to Master
  • Loading branch information
zadrafi authored Dec 4, 2019
2 parents 11fd615 + 3e7c4e7 commit 7536dd0
Show file tree
Hide file tree
Showing 159 changed files with 24,114 additions and 3,057 deletions.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
^codecov\.yml$
^_config\.yml$
^docs$
^examples$
^_pkgdown\.yml$
^README\.Rmd$
^README-.*\.png$
Expand All @@ -19,3 +20,9 @@
^\.RData$
^\.Rhistory$
^\.circleci$
^revdep$
^Makefile$
^\.covrignore$
^LICENSE\.md$
^usethis\.R$

2 changes: 2 additions & 0 deletions .covrignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
R/deprec-*.R
R/compat-*.R
48 changes: 48 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to concurve

This outlines how to propose a change to concurve. For more detailed
info about contributing to this, and other tidyverse packages, please see the
[**development contributing guide**](https://rstd.io/tidy-contrib).

### Fixing typos

Small typos or grammatical errors in documentation may be edited directly using
the GitHub web interface, so long as the changes are made in the _source_ file.

* YES: you edit a roxygen comment in a `.R` file below `R/`.
* NO: you edit an `.Rd` file below `man/`.

### Prerequisites

Before you make a substantial pull request, you should always file an issue and
make sure someone from the team agrees that it’s a problem. If you’ve found a
bug, create an associated issue and illustrate the bug with a minimal
[reprex](https://www.tidyverse.org/help/#reprex).

### Pull request process

* We recommend that you create a Git branch for each pull request (PR).
* Look at the Travis and AppVeyor build status before and after making changes.
The `README` should contain badges for any continuous integration services used
by the package.
* New code should follow the tidyverse [style guide](https://style.tidyverse.org).
You can use the [styler](https://CRAN.R-project.org/package=styler) package to
apply these styles, but please don't restyle code that has nothing to do with
your PR.
* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with
[Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html),
for documentation.
* We use [testthat](https://cran.r-project.org/package=testthat). Contributions
with test cases included are easier to accept.
* For user-facing changes, add a bullet to the top of `NEWS.md` below the
current development version header describing the changes made followed by your
GitHub username, and links to relevant issue(s)/PR(s).

### Code of Conduct

Please note that the concurve project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.

### See tidyverse [development contributing guide](https://rstd.io/tidy-contrib)
for further details.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Please briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on <https://stackoverflow.com/> or <https://community.rstudio.com/>.

Please include a minimal reproducible example (AKA a reprex). If you've never heard of a [reprex](https://reprex.tidyverse.org/) before, start by reading <https://www.tidyverse.org/help/#reprex>.

---

Brief description of the problem

```r
# insert reprex here
```
35 changes: 35 additions & 0 deletions .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Getting help with concurve

Thanks for using concurve. Before filing an issue, there are a few places
to explore and pieces to put together to make the process as smooth as possible.

Start by making a minimal **repr**oducible **ex**ample using the
[reprex](https://reprex.tidyverse.org/) package. If you haven't heard of or used
reprex before, you're in for a treat! Seriously, reprex will make all of your
R-question-asking endeavors easier (which is a pretty insane ROI for the five to
ten minutes it'll take you to learn what it's all about). For additional reprex
pointers, check out the [Get help!](https://www.tidyverse.org/help/) section of
the tidyverse site.

Armed with your reprex, the next step is to figure out [where to ask](https://www.tidyverse.org/help/#where-to-ask).

* If it's a question: start with [community.rstudio.com](https://community.rstudio.com/),
and/or StackOverflow. There are more people there to answer questions.
* If it's a bug: you're in the right place, file an issue.
* If you're not sure: let the community help you figure it out! If your
problem _is_ a bug or a feature request, you can easily return here and
report it.

Before opening a new issue, be sure to [search issues and pull requests](https://github.com/tidyverse/concurve/issues) to make sure the
bug hasn't been reported and/or already fixed in the development version. By
default, the search will be pre-populated with `is:issue is:open`. You can
[edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/)
(e.g. `is:pr`, `is:closed`) as needed. For example, you'd simply
remove `is:open` to search _all_ issues in the repo, open or closed.


If you _are_ in the right place, and need to file an issue, please review the
["File issues"](https://www.tidyverse.org/contribute/#issues) paragraph from
the tidyverse contributing guidelines.

Thanks for your help!
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.Rhistory
.RData
.Ruserdata
inst/doc
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
sudo: false
cache: packages

r_packages:
- covr

after_success:
- Rscript -e 'library(covr); codecov()'
- Rscript -e 'covr::coveralls()'
matrix:
include:
- r: devel
- r: release
after_success:
- Rscript -e 'covr::codecov()'
- r: oldrel
- r: 3.4
- r: 3.3
- r: 3.2
100 changes: 71 additions & 29 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,35 +1,77 @@
Package: concurve
Type: Package
Date: 2019-09-18
Title: Computes and Plots Consonance (Confidence) Intervals, P-Values, and S-Values to Form Consonance and Surprisal Functions
Version: 2.1.0
Authors@R: c(
person("Zad R.", "Chow", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-1545-8199")
),
person("Andrew D.", "Vigotsky", role = "aut",
comment = c(ORCID = "0000-0003-3166-0688")
)
)
Package: concurve
Title: Computes and Plots Compatibility (Confidence) Intervals,
P-Values, S-Values, & Likelihood Intervals to Form Consonance,
Surprisal, & Likelihood Functions
Version: 2.3.0
Date: 2019-12-04
Authors@R:
c(person(given = "Zad R.",
family = "Chow",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-1545-8199")),
person(given = "Andrew D.",
family = "Vigotsky",
role = "aut",
comment = c(ORCID = "0000-0003-3166-0688")))
Maintainer: Zad R. Chow <[email protected]>
Description: Allows one to compute consonance (confidence) intervals for various statistical tests along with their corresponding P-values and S-values. The intervals can be plotted to create consonance and surprisal functions allowing one to see what effect sizes are compatible with the test model at various consonance levels rather than being limited to one interval estimate such as 95%. These methods are discussed by Poole C. (1987) <doi:10.2105/AJPH.77.2.195>, Schweder T, Hjort NL. (2002) <doi:10.1111/1467-9469.00285>, Singh K, Xie M, Strawderman WE. (2007) <arXiv:0708.0976>, Rothman KJ, Greenland S, Lash TL. (2008, ISBN:9781451190052), Amrhein V, Trafimow D, Greenland S. (2019) <doi:10.1080/00031305.2018.1543137>, Greenland S. (2019) <doi:10.1080/00031305.2018.1529625>, Chow ZR, Greenland S. (2019) <arXiv:1909.08579>, and Greenland S, Chow ZR. (2019) <arXiv:1909.08583>.
Imports: parallel,
ggplot2,
metafor,
dplyr,
tibble,
survival,
survminer,
scales
Description: Allows one to compute consonance (confidence)
intervals for various statistical tests along with their corresponding
P-values, S-values, and likelihoods. The intervals can be plotted to
create consonance, surprisal, and likelihood functions allowing one to
see what effect sizes are compatible with the test model at various
consonance levels rather than being limited to one interval estimate
such as 95%. These methods are discussed by Poole C. (1987)
<doi:10.2105/AJPH.77.2.195>, Schweder T, Hjort NL. (2002)
<doi:10.1111/1467-9469.00285>, Singh K, Xie M, Strawderman WE. (2007)
<arXiv:0708.0976>, Rothman KJ, Greenland S, Lash TL. (2008,
ISBN:9781451190052), Amrhein V, Trafimow D, Greenland S. (2019)
<doi:10.1080/00031305.2018.1543137>, Greenland S. (2019)
<doi:10.1080/00031305.2018.1529625>, Chow ZR, Greenland S. (2019)
<arXiv:1909.08579>, and Greenland S, Chow ZR. (2019)
<arXiv:1909.08583>.
License: GPL-3 | file LICENSE
URL: https://data.lesslikely.com/concurve/,
https://github.com/zadchow/concurve, https://lesslikely.com/
BugReports: https://github.com/zadchow/concurve/issues
Imports:
bcaboot,
boot,
compiler,
dplyr,
flextable,
ggplot2,
knitr,
metafor,
officer,
parallel,
pbmcapply,
ProfileLikelihood,
rlang (>= 0.1.2),
scales,
survival,
survminer,
tibble,
tidyr,
MASS,
methods
Suggests:
covr,
roxygen2,
spelling,
testthat,
knitr,
covr
License: GPL-3 | file LICENSE
URL: https://data.lesslikely.com/concurve/, https://github.com/Zadchow/concurve, https://lesslikely.com/
BugReports: https://github.com/Zadchow/concurve/issues
VignetteBuilder: knitr
rmarkdown,
Lock5Data
VignetteBuilder:
knitr
ByteCompile: true
Encoding: UTF-8
Language: en-US
LazyData: true
RoxygenNote: 6.1.1
X-schema.org-keywords: confidence, compatibility, consonance, surprisal, interval, function, curve
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.0.2
X-schema.org-keywords: confidence, compatibility, consonance,
surprisal, interval, function, curve
Depends:
R (>= 3.2)
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# h/t to @jimhester and @yihui for this parse block:
# https://github.com/yihui/knitr/blob/dc5ead7bcfc0ebd2789fe99c527c7d91afb3de4a/Makefile#L1-L4
# Note the portability change as suggested in the manual:
# https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-portable-packages
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`


all: check

build:
R CMD build .

check: build
R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz

install_deps:
Rscript \
-e 'if (!requireNamespace("remotes") install.packages("remotes")' \
-e 'remotes::install_deps(dependencies = TRUE)'

install: install_deps build
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz

clean:
@rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck
10 changes: 10 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
exportPattern("^[[:alpha:]]+")
import(parallel)
import(pbmcapply)
import(bcaboot)
import(boot)
import(ggplot2)
import(ProfileLikelihood)
import(dplyr)
import(tidyr)
import(flextable)
import(officer)
import(knitr)
import(tibble)
import(survival)
import(survminer)
import(metafor)
import(scales)
importFrom("stats", "coef", "confint", "confint.default", "confint.lm",
"lm", "quantile", "t.test", "cor.test", "qnorm")
importFrom("methods", "is")
importFrom("stats", "approxfun", "integrate")
importFrom("graphics", "axis", "par", "polygon", "text")
importFrom("stats", "logLik", "model.frame", "model.matrix",
"model.response", "na.fail")
Expand Down
17 changes: 17 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# concurve 2.3.0

## Major changes
* `ggconcurve()` is now `ggcurve()`.
* `ggcurve()` plots confidence (consonance) distributions, densities, likelihood, and deviance functions.
* `plot_curve()` is now deprecated. Please use `ggcurve()` instead.
* `curve_compare()` compares two functions and calculates the area between the curve.
* `plot_compare() `allows two separate functions to be plotted and compared simultaneously.
* `curve_table()` produces publication-ready tables of relevant statistics.
* `curve_boot()` uses bootstrapping to approximate the consonance functions via the [`boot`](https://cran.r-project.org/package=boot) and [`bcaboot`](https://cran.r-project.org/package=bcaboot) packages.
* `curve_lik()` produces likelihood functions by transforming the objects from the [`ProfileLikelihood`](https://cran.r-project.org/package=ProfileLikelihood) package.

## Minor changes

* All functions now provide progress on how long it will take to complete the task.
* Interval widths are now provided as measures of precision.

# concurve 2.1.0

## Major changes
Expand Down
Binary file modified R/.DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions R/concurve-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#' @keywords internal
"_PACKAGE"

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start
## usethis namespace: end
NULL
Loading

0 comments on commit 7536dd0

Please sign in to comment.