Skip to content

Commit

Permalink
Merge pull request #50 from zadrafi/testing
Browse files Browse the repository at this point in the history
release of version 2.7.7
  • Loading branch information
zadrafi authored Oct 12, 2020
2 parents 339bd29 + 50fec65 commit d9cce76
Show file tree
Hide file tree
Showing 182 changed files with 3,804 additions and 1,564 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
^\.github$
^Makefile$
^concurve\.pdf$
^R&G2020\.Rmd$
^supported\.Rmd$
^~/concurve/vignettes/supported\.Rmd$
14 changes: 7 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Type: Package
Package: concurve
Title: Computes & Plots Compatibility (Confidence),
Surprisal, & Likelihood Distributions
Version: 2.7.6
Date: 2020-10-06
Version: 2.7.7
Date: 2020-10-12
Authors@R:
c(person(given = "Zad",
family = "Rafi",
Expand All @@ -24,11 +24,11 @@ Maintainer: Zad Rafi <[email protected]>
Description: Computes compatibility (confidence) distributions along with their corresponding P-values,
S-values, and likelihoods. The intervals can be plotted to form the distributions themselves.
Functions can be compared to one another to see how much they overlap. Results can be
exported to Microsoft Word, Powerpoint, and TeX documents. The
package currently supports resampling methods, computing differences,
generalized linear models, mixed-effects models, survival analysis,
and meta-analysis. These methods are discussed by Schweder T, Hjort NL. (2016, ISBN:9781316445051)
and Rafi Z, Greenland S. (2020) <doi:10.1186/s12874-020-01105-9>.
exported to Microsoft Word, Powerpoint, and TeX documents. The package currently supports
resampling methods, computing differences, generalized linear models, mixed-effects models,
survival analysis, and meta-analysis. These methods are discussed
by Schweder T, Hjort NL. (2016, ISBN:9781316445051) and
Rafi Z, Greenland S. (2020) <doi:10.1186/s12874-020-01105-9>.
License: GPL-3 | file LICENSE
URL: https://data.lesslikely.com/concurve/,
https://github.com/zadrafi/concurve
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# concurve 2.7.6
# concurve 2.7.7
## Major changes
* `log` option added to `curve_gen()` to exponentiate the coefficients.
- Thanks to [Isabella Ghement](https://twitter.com/IsabellaGhement) for finding the issue and notifying us about it.
Expand Down
6 changes: 3 additions & 3 deletions R/concurve-package.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#' @title A description of the concurve R package
#' @title A description of the `concurve` `R` package
#' @name concurve-package
#' @aliases concurve
#' @docType package
#' @author Zad Rafi, Andrew D. Vigotsky, and Aaron Caldwell
#' @author [Zad Rafi](<https://twitter.com/dailyzad>), [Andrew D. Vigotsky](<https://www.researchgate.net/profile/Andrew_Vigotsky>)
#' @description
#' Allows one to compute compatibility (confidence)
#' intervals for various statistical tests along with their corresponding
Expand All @@ -14,7 +14,7 @@
#' \tabular{ll}{ Package: \tab concurve\cr
#' Logo: \tab \figure{logo.png}{options: width="50px"}\cr
#' Type: \tab Package\cr Version: \tab
#' 2.7.6\cr Date: \tab 2020-10-05\cr License: \tab GLP-3}
#' 2.7.7\cr Date: \tab 2020-10-07\cr License: \tab GLP-3}
#' @details
#' Accepts most modeling functions that produce confidence intervals to construct distributions.
#' Instructions are also provided on how to construct similar graphs for [Stata](https://data.lesslikely.com/concurve/articles/stata.html).
Expand Down
16 changes: 8 additions & 8 deletions R/ggcurve.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ ggcurve <- function(data, type = "c", measure = "default", levels = 0.95, nullva
geom_point(data = interval, mapping = aes(x = limits, y = 1 - levels), size = 1.75, shape = 18) +
geom_line(data = interval, mapping = aes(x = limits, y = 1 - levels, group = levels), size = .30) +
geom_ribbon(aes(x = lower.limit, ymin = min(pvalue), ymax = pvalue),
fill = fill, alpha = 0.20
fill = fill, alpha = 0.10
) +
geom_ribbon(aes(x = upper.limit, ymin = min(pvalue), ymax = pvalue),
fill = fill, alpha = 0.20
fill = fill, alpha = 0.10
) +
labs(
title = title,
Expand Down Expand Up @@ -234,10 +234,10 @@ ggcurve <- function(data, type = "c", measure = "default", levels = 0.95, nullva
geom_point(data = interval, mapping = aes(x = limits, y = (-log2(1 - levels))), size = 1.75, shape = 18) +
geom_line(data = interval, mapping = aes(x = limits, y = (-log2(1 - levels)), group = levels), size = .30) +
geom_ribbon(aes(x = lower.limit, ymin = max(svalue), ymax = svalue),
fill = fill, alpha = 0.20
fill = fill, alpha = 0.10
) +
geom_ribbon(aes(x = upper.limit, ymin = max(svalue), ymax = svalue),
fill = fill, alpha = 0.20
fill = fill, alpha = 0.10
) +
labs(
title = title,
Expand Down Expand Up @@ -386,7 +386,7 @@ ggcurve <- function(data, type = "c", measure = "default", levels = 0.95, nullva

ggplot(data = data, mapping = aes(x = values, y = support)) +
geom_line() +
geom_ribbon(aes(x = values, ymin = min(support), ymax = support), fill = fill, color = color, alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = min(support), ymax = support), fill = fill, color = color, alpha = 0.10) +
labs(
title = title,
subtitle = subtitle,
Expand Down Expand Up @@ -433,7 +433,7 @@ ggcurve <- function(data, type = "c", measure = "default", levels = 0.95, nullva

ggplot(data = data, mapping = aes(x = values, y = loglikelihood)) +
geom_line() +
geom_ribbon(aes(x = values, ymin = min(loglikelihood), ymax = loglikelihood), fill = fill, color = color, alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = min(loglikelihood), ymax = loglikelihood), fill = fill, color = color, alpha = 0.10) +
labs(
title = title,
subtitle = subtitle,
Expand Down Expand Up @@ -481,7 +481,7 @@ ggcurve <- function(data, type = "c", measure = "default", levels = 0.95, nullva

ggplot(data = data, mapping = aes(x = values, y = likelihood)) +
geom_line() +
geom_ribbon(aes(x = values, ymin = min(likelihood), ymax = likelihood), fill = fill, color = color, alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = min(likelihood), ymax = likelihood), fill = fill, color = color, alpha = 0.10) +
labs(
title = title,
subtitle = subtitle,
Expand Down Expand Up @@ -529,7 +529,7 @@ ggcurve <- function(data, type = "c", measure = "default", levels = 0.95, nullva

ggplot(data = data, mapping = aes(x = values, y = deviancestat)) +
geom_line() +
geom_ribbon(aes(x = values, ymin = deviancestat, ymax = max(deviancestat)), fill = fill, color = color, alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = deviancestat, ymax = max(deviancestat)), fill = fill, color = color, alpha = 0.10) +
labs(
title = title,
subtitle = subtitle,
Expand Down
40 changes: 20 additions & 20 deletions R/plot_compare.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu
xaxis = expression(theta == ~"Range of Values"),
yaxis1 = expression(paste(italic(p), "-value")),
yaxis2 = "Levels for CI (%)",
color1 = darken("#D55E00", 0.4),
color2 = darken("#009E73", 0.4),
fill1 = "#D55E0050",
fill2 = "#009E7350") {
color1 = darken("#D55E00", 0.2),
color2 = darken("#009E73", 0.2),
fill1 = "#99c7c7",
fill2 = "#d46c5b") {
cols <- c(fill1, fill2)

# Consonance Curve -----------------------------------------------------
Expand Down Expand Up @@ -143,10 +143,10 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu
color = color2
) +
geom_ribbon(aes(x = lower.limit, ymin = min(pvalue), ymax = pvalue, fill = fill1),
alpha = 0.20
alpha = 0.10
) +
geom_ribbon(aes(x = upper.limit, ymin = min(pvalue), ymax = pvalue, fill = fill1),
alpha = 0.20
alpha = 0.10
) +
geom_line(
data = data2, aes(x = lower.limit, y = pvalue),
Expand All @@ -158,11 +158,11 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu
) +
geom_ribbon(
data = data2, aes(x = lower.limit, ymin = min(pvalue), ymax = pvalue, fill = fill2),
alpha = 0.20
alpha = 0.10
) +
geom_ribbon(
data = data2, aes(x = upper.limit, ymin = min(pvalue), ymax = pvalue, fill = fill2),
alpha = 0.20
alpha = 0.10
) +
theme_minimal() +
labs(
Expand Down Expand Up @@ -276,10 +276,10 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu
color = color2
) +
geom_ribbon(aes(x = lower.limit, ymin = max(svalue), ymax = svalue, fill = fill1),
alpha = 0.20
alpha = 0.10
) +
geom_ribbon(aes(x = upper.limit, ymin = max(svalue), ymax = svalue, fill = fill1),
alpha = 0.20
alpha = 0.10
) +
geom_line(
data = data2, aes(x = lower.limit, y = svalue),
Expand All @@ -291,11 +291,11 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu
) +
geom_ribbon(
data = data2, aes(x = lower.limit, ymin = max(svalue), ymax = svalue, fill = fill2),
alpha = 0.20
alpha = 0.10
) +
geom_ribbon(
data = data2, aes(x = upper.limit, ymin = max(svalue), ymax = svalue, fill = fill2),
alpha = 0.20
alpha = 0.10
) +
labs(
title = "Surprisal Functions",
Expand Down Expand Up @@ -369,9 +369,9 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu

ggplot(data = data1, mapping = aes(x = values, y = support)) +
geom_line(color = color2) +
geom_ribbon(aes(x = values, ymin = min(support), ymax = support, fill = fill1), alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = min(support), ymax = support, fill = fill1), alpha = 0.10) +
geom_line(data = data2, color = color1) +
geom_ribbon(data = data2, aes(x = values, ymin = min(support), ymax = support, fill = fill2), alpha = 0.20) +
geom_ribbon(data = data2, aes(x = values, ymin = min(support), ymax = support, fill = fill2), alpha = 0.10) +
labs(
title = "Relative Likelihood Functions",
subtitle = subtitle,
Expand Down Expand Up @@ -454,9 +454,9 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu

ggplot(data = data1, mapping = aes(x = values, y = loglikelihood)) +
geom_line(color = color1) +
geom_ribbon(aes(x = values, ymin = min(loglikelihood), ymax = loglikelihood, fill = fill1), alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = min(loglikelihood), ymax = loglikelihood, fill = fill1), alpha = 0.10) +
geom_line(data = data2, color = color2) +
geom_ribbon(data = data2, aes(x = values, ymin = min(loglikelihood), ymax = loglikelihood, fill = fill2), alpha = 0.20) +
geom_ribbon(data = data2, aes(x = values, ymin = min(loglikelihood), ymax = loglikelihood, fill = fill2), alpha = 0.10) +
labs(
title = "Log-Likelihood Function",
subtitle = subtitle,
Expand Down Expand Up @@ -539,9 +539,9 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu

ggplot(data = data1, mapping = aes(x = values, y = likelihood)) +
geom_line(color = color1) +
geom_ribbon(aes(x = values, ymin = min(likelihood), ymax = likelihood, fill = fill1), alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = min(likelihood), ymax = likelihood, fill = fill1), alpha = 0.10) +
geom_line(data = data2, color = color2) +
geom_ribbon(data = data2, aes(x = values, ymin = min(likelihood), ymax = likelihood, fill = fill2), alpha = 0.20) +
geom_ribbon(data = data2, aes(x = values, ymin = min(likelihood), ymax = likelihood, fill = fill2), alpha = 0.10) +
labs(
title = "Likelihood Function",
subtitle = subtitle,
Expand Down Expand Up @@ -623,9 +623,9 @@ plot_compare <- function(data1, data2, type = "c", measure = "default", nullvalu

ggplot(data = data1, mapping = aes(x = values, y = deviancestat)) +
geom_line(color = color1) +
geom_ribbon(aes(x = values, ymin = deviancestat, ymax = max(deviancestat), fill = fill1), alpha = 0.20) +
geom_ribbon(aes(x = values, ymin = deviancestat, ymax = max(deviancestat), fill = fill1), alpha = 0.10) +
geom_line(data = data2, color = color2) +
geom_ribbon(data = data2, aes(x = values, ymin = deviancestat, ymax = max(deviancestat), fill = fill2), alpha = 0.20) +
geom_ribbon(data = data2, aes(x = values, ymin = deviancestat, ymax = max(deviancestat), fill = fill2), alpha = 0.10) +
labs(
title = "Deviance Functions",
subtitle = subtitle,
Expand Down
10 changes: 9 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
output: github_document
---

### <span style="color:#000; font-weight: 400;">concurve</span> | Graph Interval Functions </strong> <img src="man/figures/logo.svg" align="right" width="70"/>
### <span style="color:#000; font-weight: 400;">`concurve`</span> | Graph Frequentist Distributions of Parameters </strong> <img src="man/figures/logo.svg" align="right" width="70"/>

* * *

Expand Down Expand Up @@ -58,6 +58,14 @@ 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](https://github.com/zadrafi/concurve/) using the following:

```{r eval=FALSE}
remotes::install_github("zadrafi/concurve@master", dependencies = TRUE)
```

See which versions of the package are currently [supported here](articles/supported.html).

* * *

#### Articles
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

### <span style="color:#000; font-weight: 400;">concurve</span> \| Graph Interval Functions </strong> <img src="man/figures/logo.svg" align="right" width="70"/>
### <span style="color:#000; font-weight: 400;">`concurve`</span> \| Graph Frequentist Distributions of Parameters </strong> <img src="man/figures/logo.svg" align="right" width="70"/>

------------------------------------------------------------------------

Expand Down Expand Up @@ -66,6 +66,14 @@ 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](https://github.com/zadrafi/concurve/) using the following:

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

See which versions of the package are currently [supported
here](articles/supported.html).

------------------------------------------------------------------------

#### Articles
Expand Down Expand Up @@ -143,9 +151,8 @@ The package was currently run on:
## [1] stats graphics grDevices utils datasets methods base
##
## loaded via a namespace (and not attached):
## [1] compiler_4.0.2 magrittr_1.5 tools_4.0.2 htmltools_0.5.0
## [5] yaml_2.2.1 stringi_1.5.3 rmarkdown_2.4 knitr_1.30
## [9] stringr_1.4.0 xfun_0.18 digest_0.6.25 rlang_0.4.7
## [13] evaluate_0.14
## [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

------------------------------------------------------------------------
20 changes: 0 additions & 20 deletions SECURITY.md

This file was deleted.

12 changes: 7 additions & 5 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ development:

navbar:
structure:
left: [home, intro, reference, articles, literature, tools, news]
left: [home, intro, reference, articles, misc, literature, tools, news]
right: [github, twitter]

components:
Expand Down Expand Up @@ -71,19 +71,21 @@ navbar:
href: articles/tables.html
- text: Troubleshooting
href: articles/troubleshooting.html
misc:
text: Misc
menu:
- text: Surprisal values
href: articles/svalues.html
literature:
text: Literature
href: articles/literature.html
tools:
text: S-values
href: articles/svalues.html
news:
text: News
menu:
- text: Package Updates
href: news/index.html
- text: Supported Versions
href: SECURITY.html
href: articles/supported.html
- text: Feature Wish List
href: articles/wishlist.html
github:
Expand Down
Loading

0 comments on commit d9cce76

Please sign in to comment.