Skip to content

Commit 84e66ba

Browse files
committed
2 parents 0e7cbb0 + 095759a commit 84e66ba

File tree

169 files changed

+10891
-4765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+10891
-4765
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.Rbuildignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@
1515
^\.github$
1616
^codecov\.yml$
1717
^CODE_OF_CONDUCT\.md$
18+
^joss-paper$
19+
^CRAN-SUBMISSION$
20+
^doc$
21+
^Meta$
22+
^_pkgdown\.yml$
23+
^pkgdown$

.github/CONTRIBUTING.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Contributing to konfound
22

33
This outlines how to propose a change to konfound.
4-
For a detailed discussion on contributing to this and other tidyverse packages, please see the [development contributing guide](https://rstd.io/tidy-contrib) and our [code review principles](https://code-review.tidyverse.org/).
54

65
## Fixing typos
76

@@ -11,7 +10,8 @@ You can find the `.R` file that generates the `.Rd` by reading the comment in th
1110

1211
## Bigger changes
1312

14-
If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed.
13+
If you want to make a bigger change, it's a good idea to first file an issue to notify the team.
14+
1515
If you’ve found a bug, please file an issue that illustrates the bug with a minimal
1616
[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed).
1717
See our guide on [how to create a great issue](https://code-review.tidyverse.org/issues/) for more advice.
@@ -23,12 +23,25 @@ You may also wish to contact the development team for bigger changes. Please see
2323
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("konfound-project/konfound", fork = TRUE)`.
2424

2525
* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
26-
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
27-
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`.
26+
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
27+
28+
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`. This is important: **even for team members, please make commits to branches, first**.
29+
30+
* Ensure that all checks are passing. You can see this information within your PR (on GitHub). It will say passing or failing, and if failing, you can see what is the cause. If a check is not passing, correct the issue or contact a package maintainer for help.
31+
32+
* Please run `goodpractice::gp()` to ensure code quality compliance. Some markers from this can justifiably be ignored, whereas others must be addressed. See a discussion [here](https://github.com/konfound-project/konfound/issues/50). Some things to be aware of:
33+
* avoiding long code lines (more than 80 characters)
34+
* using TRUE and FALSE instead of T and F
35+
* using roxygen2 syntax to import specific functions from packages
36+
* avoiding functions that are overly complex (i.e., avoiding high cyclomatic complexity)
37+
38+
* For new functions or functionality, write examples and tests to cover the core of the functionality. Aim for 80% or higher test coverage for new functions. Check with `covr::package_coverage()`.
2839

2940
* Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser.
3041
The title of your PR should briefly describe the change.
3142
The body of your PR should contain `Fixes #issue-number`.
43+
44+
* A member of the team will then review your PR.
3245

3346
* For user-facing changes, add a bullet to the top of `NEWS.md` (i.e. just below the first header). Follow the style described in <https://style.tidyverse.org/news.html>.
3447

.github/workflows/draft-pdf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# This should be the path to the paper within your repo.
1515
paper-path: joss-paper/paper.md
1616
- name: Upload
17-
uses: actions/upload-artifact@v1
17+
uses: actions/upload-artifact@v4
1818
with:
1919
name: paper
2020
# This is the output path where Pandoc will write the compiled

.github/workflows/pkgdown.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown.yaml
13+
14+
permissions: read-all
15+
16+
jobs:
17+
pkgdown:
18+
runs-on: ubuntu-latest
19+
# Only restrict concurrency for non-PR jobs
20+
concurrency:
21+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
22+
env:
23+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: r-lib/actions/setup-pandoc@v2
30+
31+
- uses: r-lib/actions/setup-r@v2
32+
with:
33+
use-public-rspm: true
34+
35+
- uses: r-lib/actions/setup-r-dependencies@v2
36+
with:
37+
extra-packages: any::pkgdown, local::.
38+
needs: website
39+
40+
- name: Build site
41+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
42+
shell: Rscript {0}
43+
44+
- name: Deploy to GitHub pages 🚀
45+
if: github.event_name != 'pull_request'
46+
uses: JamesIves/github-pages-deploy-action@v4.5.0
47+
with:
48+
clean: false
49+
branch: gh-pages
50+
folder: docs

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ notes.md
1818
table-of-features.xlsx
1919
.DS_Store
2020
.DS_Store
21+
docs
22+
/doc/
23+
/Meta/

CRAN-SUBMISSION

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Version: 1.0.2
2+
Date: 2024-10-17 14:47:16 UTC
3+
SHA: 24e277cde428c3af5fc3884966c5bb16d0fb46aa

DESCRIPTION

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
Type: Package
22
Package: konfound
33
Title: Quantify the Robustness of Causal Inferences
4-
Version: 0.4.0
4+
Version: 1.0.3
55
Authors@R: c(
66
person(c("Joshua", "M"), "Rosenberg", , "jmrosen48@gmail.com", role = c("aut", "cre")),
77
person("Ran", "Xu", , "ranxu@msu.edu", role = "ctb"),
88
person("Qinyun", "Lin", , "linqinyun1001@gmail.com", role = "ctb"),
99
person("Spiro", "Maroulis", , "Spiro.Maroulis@asu.edu", role = "ctb"),
1010
person("Sarah", "Narvaiz", , "snarvaiz@alum.utk.edu", role = "ctb"),
11-
person(c("Kenneth", "A"), "Frank", , "kenfrank@msu.edu", role = "ctb")
11+
person(c("Kenneth", "A"), "Frank", , "kenfrank@msu.edu", role = "ctb"),
12+
person("Wei", "Wang", , "wwang93@vols.utk.edu", role = "ctb"),
13+
person("Yunhe", "Cui", , "yunhe.cui@uconn.edu", role = "ctb"),
14+
person("Gaofei", "Zhang", , "gaofei.2.zhang@uconn.edu", role = "ctb"),
15+
person("Xuesen", "Cheng", , "chengxu3@msu.edu", role = "ctb"),
16+
person("JiHoon", "Choi", , "choijih3@msu.edu", role = "ctb"),
17+
person("Guan", "Saw", , "guan.saw@cgu.edu", role = "ctb")
1218
)
1319
Description: Statistical methods that quantify the conditions necessary to
1420
alter inferences, also known as sensitivity analysis, are becoming
1521
increasingly important to a variety of quantitative sciences. A series
1622
of recent works, including Frank (2000)
17-
<doi:10.1177/0049124100029002001> and Frank et al. (2013)
23+
<doi:10.1177/0049124100029002001> and Frank et al. (2013)
1824
<doi:10.3102/0162373713493129> extend previous sensitivity analyses by
1925
considering the characteristics of omitted variables or unobserved
2026
cases that would change an inference if such variables or cases were
2127
observed. These analyses generate statements such as "an omitted
2228
variable would have to be correlated at xx with the predictor of
23-
interest (e.g., treatment) and outcome to invalidate an inference of a
29+
interest (e.g., the treatment) and outcome to invalidate an inference of a
2430
treatment effect". Or "one would have to replace pp percent of the
25-
observed data with null hypothesis cases to invalidate the inference".
31+
observed data with nor which the treatment had no effect to invalidate the
32+
inference".
2633
We implement these recent developments of sensitivity analysis and
2734
provide modules to calculate these two robustness indices and generate
2835
such statements in R. In particular, the functions konfound(),
2936
pkonfound() and mkonfound() allow users to calculate the robustness of
3037
inferences for a user's own model, a single published study and
3138
multiple studies respectively.
3239
License: MIT + file LICENSE
33-
URL: https://github.com/jrosen48/konfound
34-
BugReports: https://github.com/jrosen48/konfound/issues
40+
URL: https://github.com/konfound-project/konfound, https://konfound-it.org/konfound/
41+
BugReports: https://github.com/konfound-project/konfound/issues
3542
Depends:
3643
R (>= 2.10)
3744
Imports:
@@ -41,27 +48,27 @@ Imports:
4148
dplyr,
4249
ggplot2,
4350
lavaan,
44-
mice,
4551
purrr,
4652
rlang,
53+
tidyr,
54+
lme4 (>= 1.1-35.1),
4755
tibble,
48-
tidyr
56+
ggrepel,
57+
pbkrtest
4958
Suggests:
5059
covr,
5160
devtools,
5261
forcats,
53-
ggrepel,
5462
knitr,
55-
lme4,
56-
margins,
57-
pbkrtest,
5863
rmarkdown,
64+
mice,
5965
roxygen2,
60-
testthat
66+
testthat,
67+
Matrix (>= 1.6-2)
6168
VignetteBuilder:
6269
knitr
6370
Encoding: UTF-8
6471
LazyData: true
65-
RoxygenNote: 7.2.3
72+
RoxygenNote: 7.3.2
6673
Roxygen: list(roclets = c("collate", "rd", "namespace",
6774
"doctest::dt_roclet"), packages = "doctest")

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
YEAR: 2019
2-
COPYRIGHT HOLDER: Joshua Rosenberg; Ran Xu; Kenneth Frank
1+
YEAR: 2024
2+
COPYRIGHT HOLDER: konfound authors

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2019 Joshua Rosenberg; Ran Xu; Kenneth Frank
3+
Copyright (c) 2024 konfound authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Meta/vignette.rds

221 Bytes
Binary file not shown.

NAMESPACE

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,66 @@
11
# Generated by roxygen2: do not edit by hand
22

33
export(konfound)
4-
export(launch_shiny)
54
export(mkonfound)
65
export(pkonfound)
7-
export(summary.konfound)
6+
export(tkonfound)
87
export(tkonfound_fig)
9-
import(dplyr)
10-
import(ggplot2)
11-
import(lavaan)
12-
import(rlang)
8+
importFrom(broom,glance)
9+
importFrom(broom,tidy)
10+
importFrom(broom.mixed,tidy)
11+
importFrom(crayon,bold)
12+
importFrom(crayon,italic)
13+
importFrom(crayon,underline)
14+
importFrom(dplyr,bind_cols)
15+
importFrom(dplyr,case_when)
16+
importFrom(dplyr,filter)
17+
importFrom(dplyr,mutate)
18+
importFrom(dplyr,pull)
19+
importFrom(dplyr,rename)
1320
importFrom(dplyr,select)
14-
importFrom(rlang,.data)
21+
importFrom(dplyr,tibble)
22+
importFrom(ggplot2,aes)
23+
importFrom(ggplot2,aes_string)
24+
importFrom(ggplot2,annotate)
25+
importFrom(ggplot2,element_blank)
26+
importFrom(ggplot2,element_line)
27+
importFrom(ggplot2,facet_grid)
28+
importFrom(ggplot2,geom_col)
29+
importFrom(ggplot2,geom_curve)
30+
importFrom(ggplot2,geom_histogram)
31+
importFrom(ggplot2,geom_hline)
32+
importFrom(ggplot2,geom_line)
33+
importFrom(ggplot2,geom_point)
34+
importFrom(ggplot2,geom_segment)
35+
importFrom(ggplot2,ggplot)
36+
importFrom(ggplot2,ggtitle)
37+
importFrom(ggplot2,scale_fill_manual)
38+
importFrom(ggplot2,scale_shape_manual)
39+
importFrom(ggplot2,scale_x_continuous)
40+
importFrom(ggplot2,scale_y_continuous)
41+
importFrom(ggplot2,theme)
42+
importFrom(ggplot2,theme_bw)
43+
importFrom(ggplot2,theme_void)
44+
importFrom(ggplot2,xlab)
45+
importFrom(ggplot2,ylab)
46+
importFrom(ggrepel,geom_label_repel)
47+
importFrom(lavaan,parameterEstimates)
48+
importFrom(lavaan,sem)
49+
importFrom(lme4,fixef)
50+
importFrom(lme4,lmer)
51+
importFrom(pbkrtest,get_Lb_ddf)
52+
importFrom(purrr,map2_dfr)
53+
importFrom(purrr,map_dbl)
54+
importFrom(purrr,modify_if)
55+
importFrom(rlang,"!!")
56+
importFrom(rlang,enquo)
57+
importFrom(rlang,quo_name)
1558
importFrom(stats,chisq.test)
59+
importFrom(stats,cor)
1660
importFrom(stats,fisher.test)
61+
importFrom(stats,glm)
62+
importFrom(stats,pt)
63+
importFrom(stats,qt)
64+
importFrom(stats,var)
65+
importFrom(tidyr,gather)
66+
importFrom(utils,globalVariables)

NEWS.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# konfound 1.0.3 (IN DEVELOPMENT)
2+
3+
* fix sign problems in print output for some cases
4+
5+
# konfound 1.0.2
6+
7+
* edits to README and vignette
8+
* small edit to DESCRIPTION
9+
10+
# konfound 1.0.1
11+
12+
* minor edits in advance of CRAN submit
13+
14+
# konfound 1.0.0
15+
16+
* major release of changes that were being made in the "newitcv" branch:
17+
* Includes option to specify non-zero null hypotheses
18+
* Includes option to directly specify threshold for inference
19+
* Improved output statements
20+
* Includes full raw results for RIR and ITCV
21+
* Calculation for unconditional ITCV when possible
22+
23+
# konfound 0.5.1
24+
25+
* minor patch for CRAN
26+
27+
# konfound 0.5.0
28+
29+
* edits in response to JOSS feedback, specifically:
30+
* improved testing suite
31+
* removal of test_all = TRUE to deal with high cyclomatic complexity
32+
* improvement of coding style to be consistent and in accordance with good practice
33+
134
# konfound 0.4.0
235

336
* major updates in advance of initial submission to the R Journal

R/.Rapp.history

Whitespace-only changes.

R/binary_dummy_data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
#'
55
#' @docType data
66
#' @name binary_dummy_data
7-
#' @format A data.frame with 107 rows and 2 variables.
7+
#' @format A data.frame with 107 rows and 3 variables.
88
NULL

R/concord1.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#'
55
#' @docType data
66
#' @name concord1
7-
#' @references Hamilton, Lawrence C. 1983. Saving water: A causal model of household conservation. Sociological Perspectives 26(4):355-374.
7+
#' @references Hamilton, Lawrence C. 1983. Saving water:
8+
#' A causal model of household conservation.
9+
#' Sociological Perspectives 26(4):355-374.
810
#' @format A data.frame with 496 rows and 10 variables.
9-
NULL
11+
NULL

0 commit comments

Comments
 (0)