diff --git a/404.html b/404.html index d524e8a..5f1f8c9 100644 --- a/404.html +++ b/404.html @@ -20,7 +20,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index 6cb616e..8cdc5d7 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 1c79424..c45ae9a 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/LICENSE-text.html b/LICENSE-text.html index 58b8a22..9663fe4 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/LICENSE.html b/LICENSE.html index b1f6854..e9dc5b5 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/articles/index.html b/articles/index.html index 112a9e8..ae02487 100644 --- a/articles/index.html +++ b/articles/index.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/articles/introduction-to-konfound.html b/articles/introduction-to-konfound.html index d05ce3f..46fd0d6 100644 --- a/articles/introduction-to-konfound.html +++ b/articles/introduction-to-konfound.html @@ -20,7 +20,7 @@ konfound - 1.0.1 + 1.0.2 @@ -61,7 +61,7 @@ Sarah Narvaiz, Qinyun Lin, Joshua M. Rosenberg, Kenneth A. Frank, Spiro Maroulis, Wei Wang, Ran Xu - 2024-10-17 + 2024-10-23 Source: vignettes/introduction-to-konfound.Rmd introduction-to-konfound.Rmd diff --git a/authors.html b/authors.html index 3b3150e..a052237 100644 --- a/authors.html +++ b/authors.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 @@ -94,13 +94,13 @@ Citation Rosenberg JM (2024). konfound: Quantify the Robustness of Causal Inferences. -R package version 1.0.1, https://konfound-it.org/konfound/, https://github.com/konfound-project/konfound. +R package version 1.0.2, https://konfound-it.org/konfound/, https://github.com/konfound-project/konfound. @Manual{, title = {konfound: Quantify the Robustness of Causal Inferences}, author = {Joshua M Rosenberg}, year = {2024}, - note = {R package version 1.0.1, https://konfound-it.org/konfound/}, + note = {R package version 1.0.2, https://konfound-it.org/konfound/}, url = {https://github.com/konfound-project/konfound}, } diff --git a/index.html b/index.html index 45a0cf3..2a796ea 100644 --- a/index.html +++ b/index.html @@ -11,8 +11,8 @@ - - + + Skip to contents @@ -22,7 +22,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/news/index.html b/news/index.html index ca5c535..e9491f6 100644 --- a/news/index.html +++ b/news/index.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 @@ -36,6 +36,11 @@ Changelog Source: NEWS.md + +konfound 1.0.2CRAN release: 2024-10-17 +edits to README and vignette +small edit to DESCRIPTION + konfound 1.0.1CRAN release: 2024-10-07 minor edits in advance of CRAN submit diff --git a/pkgdown.yml b/pkgdown.yml index 86fdc1d..425c86e 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: introduction-to-konfound: introduction-to-konfound.html -last_built: 2024-10-17T12:31Z +last_built: 2024-10-23T12:22Z urls: reference: https://konfound-it.org/konfound/reference article: https://konfound-it.org/konfound/articles diff --git a/reference/binary_dummy_data.html b/reference/binary_dummy_data.html index f89ed5f..64762a9 100644 --- a/reference/binary_dummy_data.html +++ b/reference/binary_dummy_data.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/cal_delta_star.html b/reference/cal_delta_star.html index 7810a0e..2965ccd 100644 --- a/reference/cal_delta_star.html +++ b/reference/cal_delta_star.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/cal_rxy.html b/reference/cal_rxy.html index 29026f5..2ade280 100644 --- a/reference/cal_rxy.html +++ b/reference/cal_rxy.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/cal_rxz.html b/reference/cal_rxz.html index 43ca8cf..a44ef18 100644 --- a/reference/cal_rxz.html +++ b/reference/cal_rxz.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/cal_ryz.html b/reference/cal_ryz.html index 02a1e68..a64d5a2 100644 --- a/reference/cal_ryz.html +++ b/reference/cal_ryz.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/chisq_p.html b/reference/chisq_p.html index 4354b3e..bdd4584 100644 --- a/reference/chisq_p.html +++ b/reference/chisq_p.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/concord1.html b/reference/concord1.html index 9897b53..eb73d67 100644 --- a/reference/concord1.html +++ b/reference/concord1.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/get_kr_df.html b/reference/get_kr_df.html index 365548d..c327188 100644 --- a/reference/get_kr_df.html +++ b/reference/get_kr_df.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/index.html b/reference/index.html index 1a29496..582f866 100644 --- a/reference/index.html +++ b/reference/index.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/konfound.html b/reference/konfound.html index 1aa5405..209fd98 100644 --- a/reference/konfound.html +++ b/reference/konfound.html @@ -17,7 +17,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/konfound_glm.html b/reference/konfound_glm.html index 4193d38..6409471 100644 --- a/reference/konfound_glm.html +++ b/reference/konfound_glm.html @@ -13,7 +13,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/konfound_glm_dichotomous.html b/reference/konfound_glm_dichotomous.html index c20b997..fb6bbed 100644 --- a/reference/konfound_glm_dichotomous.html +++ b/reference/konfound_glm_dichotomous.html @@ -11,7 +11,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/konfound_lm.html b/reference/konfound_lm.html index 8493109..af403e4 100644 --- a/reference/konfound_lm.html +++ b/reference/konfound_lm.html @@ -13,7 +13,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/konfound_lmer.html b/reference/konfound_lmer.html index 1f74c80..8ee8276 100644 --- a/reference/konfound_lmer.html +++ b/reference/konfound_lmer.html @@ -11,7 +11,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/mkonfound.html b/reference/mkonfound.html index d71363c..a5a1d38 100644 --- a/reference/mkonfound.html +++ b/reference/mkonfound.html @@ -11,7 +11,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/mkonfound_ex.html b/reference/mkonfound_ex.html index 6db790f..67c0d98 100644 --- a/reference/mkonfound_ex.html +++ b/reference/mkonfound_ex.html @@ -11,7 +11,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/output_df.html b/reference/output_df.html index 539eef6..1e89435 100644 --- a/reference/output_df.html +++ b/reference/output_df.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/output_print.html b/reference/output_print.html index 209c2eb..f693216 100644 --- a/reference/output_print.html +++ b/reference/output_print.html @@ -21,7 +21,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/output_table.html b/reference/output_table.html index 611116e..1189a28 100644 --- a/reference/output_table.html +++ b/reference/output_table.html @@ -13,7 +13,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/pkonfound.html b/reference/pkonfound.html index 1945079..19c06e1 100644 --- a/reference/pkonfound.html +++ b/reference/pkonfound.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/plot_correlation.html b/reference/plot_correlation.html index ce34d7e..7a4538d 100644 --- a/reference/plot_correlation.html +++ b/reference/plot_correlation.html @@ -11,7 +11,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/plot_threshold.html b/reference/plot_threshold.html index 7d76d3d..f5adf3d 100644 --- a/reference/plot_threshold.html +++ b/reference/plot_threshold.html @@ -11,7 +11,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/tkonfound.html b/reference/tkonfound.html index 0bf7e53..49bed6e 100644 --- a/reference/tkonfound.html +++ b/reference/tkonfound.html @@ -15,7 +15,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/tkonfound_fig.html b/reference/tkonfound_fig.html index 9622447..8f83285 100644 --- a/reference/tkonfound_fig.html +++ b/reference/tkonfound_fig.html @@ -13,7 +13,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/verify_reg_Gzcv.html b/reference/verify_reg_Gzcv.html index 4d1bbda..a4a9900 100644 --- a/reference/verify_reg_Gzcv.html +++ b/reference/verify_reg_Gzcv.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/verify_reg_uncond.html b/reference/verify_reg_uncond.html index 36fbf99..caa9d20 100644 --- a/reference/verify_reg_uncond.html +++ b/reference/verify_reg_uncond.html @@ -7,7 +7,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/reference/zzz.html b/reference/zzz.html index 2269acd..a9a63ac 100644 --- a/reference/zzz.html +++ b/reference/zzz.html @@ -9,7 +9,7 @@ konfound - 1.0.1 + 1.0.2 diff --git a/search.json b/search.json index 7d9a929..0a76518 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement jmrosen48@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to konfound","title":"Contributing to konfound","text":"outlines propose change konfound.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to konfound","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to konfound","text":"want make bigger change, ’s good idea first file issue notify team. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed). See guide create great issue advice. may also wish contact development team bigger changes. Please see contact information DESCRIPTION .","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to konfound","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"konfound-project/konfound\", fork = TRUE). Install development dependencies devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). important: even team members, please make commits branches, first. Ensure checks passing. can see information within PR (GitHub). say passing failing, failing, can see cause. check passing, correct issue contact package maintainer help. Please run goodpractice::gp() ensure code quality compliance. markers can justifiably ignored, whereas others must addressed. See discussion . things aware : avoiding long code lines (80 characters) using TRUE FALSE instead T F using roxygen2 syntax import specific functions packages avoiding functions overly complex (.e., avoiding high cyclomatic complexity) new functions functionality, write examples tests cover core functionality. Aim 80% higher test coverage new functions. Check covr::package_coverage(). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. member team review PR. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to konfound","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to konfound","text":"Please note konfound project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://konfound-it.org/konfound/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 konfound authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"quantifying-the-robustness-of-inferences","dir":"Articles","previous_headings":"","what":"Quantifying the Robustness of Inferences","title":"Introduction to konfound","text":"Sensitivity analysis, statistical method crucial validating inferences across disciplines, quantifies conditions alter conclusions (Razavi et al. 2021). One line work rooted linear models foregrounds sensitivity inferences strength omitted variables (Frank 2000; Cinelli Hazlett 2019). recent approach rooted potential outcomes framework causal inference foregrounds hypothetical changes sample alter inference cases otherwise observed (Frank Min 2007; Frank et al. 2008, 2013; Xu et al. 2019). One sensitivity measure Impact Threshold Confounding Variable, ITCV, generates statements correlation omitted, confounding variable predictor interest outcome (Frank 2000). ITCV index can calculated linear model. Robustness Inference Replacement, RIR, assesses replacing certain percentage cases counterfactuals zero treatment effect nullify inference (Frank et al. 2013). RIR index general ITCV index. sensitivity analysis techniques describe paper implement konfound R package differ others several ways. Unlike Linden, Mathur, VanderWeele (2020), whose approach focuses dichotomous outcomes omitted variable sensitivity, approach extends continuous outcomes evaluates changes estimates standard errors. Oster (2019) focuses selection treatment based unobservable variables versus observable variables necessary nullify estimate. ITCV index focuses relationship unobservable predictor interest outcome. generally, many others used simulation-based approaches, approach uses closed-form expressions generate single term representing sensitivity. techniques, along others, reviewed discussed (along ITCV RIR approaches) Frank et al. (2023). implemented calculation ITCV RIR indices konfound R package. package intended provide easy--use principled set sensitivity techniques suitable range model dependent variable types use cases. audience broad: primarily social scientists, also interested individuals disciplines (e.g., health sciences). paper provides overview two core functions within konfound package, can calculate ITCV RIR indices: konfound() pkonfound(). functions allow users calculate robustness inferences using model estimated (R) using information model published study, respectively. konfound package available Comprehensive R Archive Network (CRAN) https://CRAN.R-project.org/package=konfound; can installed via install.packages(“konfound”) function within R.","code":""},{"path":[]},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"konfound","dir":"Articles","previous_headings":"Functionality","what":"konfound","title":"Introduction to konfound","text":"function calculates ITCV RIR models fitted R. function currently works linear models fitted lm(), glm(), lmer(). output printed R console bias must present number cases replaced cases effect nullify inference.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"example-for-linear-models-fit-with-lm","dir":"Articles","previous_headings":"Functionality > konfound","what":"Example for linear models fit with lm()","title":"Introduction to konfound","text":"example, use concord1 dataset built konfound package. dataset comes study examines causal mechanism behind household water conservation U.S. city. estimate effect following variables household water consumption 1981: household water consumption 1980 (water80) household income (income) education level household survey respondent (educat) retirement status respondent (retire) number individuals household 1980 (peop80) code use fit linear model using variables: results model fitting (can obtained running summary(m) within R) indicate predictors apart retire statistically significant effect water consumption. example, focus coefficient peop80 (β = 225.198, SE = 28.704, t = 7.845, p < .001).","code":"m <- lm(water81 ~ water80 + income + educat + retire + peop80, data = concord1)"},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"itcv-example-for-linear-models-fit-with-lm","dir":"Articles","previous_headings":"Functionality > konfound","what":"ITCV example for linear models fit with lm()","title":"Introduction to konfound","text":"Now, let’s examine robustness peop80 effect calculating ITCV: output indicates invalidate inference peop80 effect water81 using statistical significance threshold (e.g., p = .05), omitted variable correlated 0.520 peop80 0.520 water81, conditioning observed covariates.","code":"library(konfound) konfound(m, peop80, index = \"IT\") ## Impact Threshold for a Confounding Variable: ## The minimum impact of an omitted variable to invalidate an inference ## for a null hypothesis of 0 effect is based on a correlation of 0.52 with ## the outcome and at 0.52 with the predictor of interest (conditioning on ## observed covariates) based on a threshold of 0.089 for statistical ## significance (alpha = 0.05). ## ## Correspondingly the impact of an omitted variable (as defined in Frank ## 2000) must be 0.52 X 0.52 = 0.27 to invalidate an inference for a null ## hypothesis of 0 effect. See Frank (2000) for a description of the method. ## ## Citation: ## Frank, K. (2000). Impact of a confounding variable on the ## inference of a regression coefficient. Sociological Methods and Research, ## 29(2), 147-194 ## For more detailed output, consider setting `to_return` to table ## To consider other predictors of interest, consider setting `test_all` to ## TRUE."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"rir-example-for-linear-models-fit-with-lm","dir":"Articles","previous_headings":"Functionality > konfound","what":"RIR example for linear models fit with lm()","title":"Introduction to konfound","text":"can also examine robustness calculating RIR: output presents two interpretations RIR. First, 74.956% estimated effect peop80 water81 attributed bias invalidate inference. Equivalently, expect replace 372 486 households (76%) cases peop80 effect invalidate inference. created guidelines evaluating RIR relative bias accounted observed covariates published norms (Frank et al. 2013, 2021).","code":"konfound(m, peop80, index = \"RIR\") ## Robustness of Inference to Replacement (RIR): ## To invalidate an inference, 74.955 % of the ## estimate would have to be due to bias. ## This is based on a threshold of 56.4 for statistical ## significance (alpha = 0.05). ## ## To invalidate an inference, 372 observations would ## have to be replaced with cases for which the effect is 0 (RIR = 372). ## ## See Frank et al. (2013) for a description of the method. ## ## Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). ## What would it take to change an inference? ## Using Rubin's causal model to interpret the robustness of causal inferences. ## Education, Evaluation and Policy Analysis, 35 437-460. ## For more detailed output, consider setting `to_return` to table ## To consider other predictors of interest, ## consider setting `test_all` to TRUE."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"pkonfound","dir":"Articles","previous_headings":"Functionality","what":"pkonfound","title":"Introduction to konfound","text":"function quantifies sensitivity analyses already conducted, already-published study analysis carried using software. function calculates much bias must estimate invalidate/sustain inference, can interpreted percentage cases replaced (e.g., cases predictor effect outcome) invalidate inference. also calculates impact omitted variable necessary invalidate/sustain inference regression coefficient, impact defined correlation omitted variable focal predictor multiplied correlation omitted variable outcome.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"itcv-example-for-a-regression-analysis","dir":"Articles","previous_headings":"Functionality > pkonfound","what":"ITCV example for a regression analysis","title":"Introduction to konfound","text":"example, following estimated quantities estimated regression model entered pkonfound function: unstandardized beta coefficient predictor interest (est_eff = 2), estimated standard error (std_err = .4), sample size (n_obs = 100), number covariates (n_covariates = 3), follows:","code":"pkonfound(2, .4, 100, 3, index = \"IT\") ## Impact Threshold for a Confounding Variable: ## The minimum impact of an omitted variable to invalidate an inference for ## a null hypothesis of 0 effect is based on a correlation of 0.568 with ## the outcome and at 0.568 with the predictor of interest (conditioning ## on observed covariates) based on a threshold of 0.201 for statistical ## significance (alpha = 0.05). ## ## Correspondingly the impact of an omitted variable (as defined in Frank ## 2000) must be 0.568 X 0.568 = 0.323 to invalidate an inference for a null ## hypothesis of 0 effect. See Frank (2000) for a description of the method. ## ## Citation: ## Frank, K. (2000). Impact of a confounding variable on the inference of a ## regression coefficient. Sociological Methods and Research, 29 (2), 147-194 ## For other forms of output, run ?pkonfound and inspect the to_return argument ## For models fit in R, consider use of konfound()."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"rir-example-for-a-regression-analysis","dir":"Articles","previous_headings":"Functionality > pkonfound","what":"RIR example for a regression analysis","title":"Introduction to konfound","text":"can also use inputs calculate output RIR index:","code":"pkonfound(2, .4, 100, 3, index = \"RIR\") ## Robustness of Inference to Replacement (RIR): ## To invalidate an inference, 60.29 % of the estimate would have to be ## due to bias. This is based on a threshold of 0.794 for statistical ## significance (alpha = 0.05). ## ## To invalidate an inference, 60 observations would have to be replaced ## with cases for which the effect is 0 (RIR = 60). ## ## See Frank et al. (2013) for a description of the method. ## ## Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). ## What would it take to change an inference? ## Using Rubin's causal model to interpret the robustness of causal inferences. ## Education, Evaluation and Policy Analysis, 35 437-460. ## For other forms of output, run ?pkonfound and inspect the to_return argument ## For models fit in R, consider use of konfound()."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"doing-and-learning-more","dir":"Articles","previous_headings":"","what":"Doing and Learning More","title":"Introduction to konfound","text":"created website including Shiny interactive web application http://konfound-.com can applied linear models, 2x2 tables resulting corresponding treatment control success failure conditions, logistic regression models. also developing extensions sensitivity analysis techniques described paper, including preserving standard error (Frank et al. 2023) calculating coefficient proportionality (Frank et al. 2022) ITCV analyses. Functionality designs including mediation, hazard functions, differences difference, regression discontinuity also presently development. Additional documentation R package future extensions available http://konfound-.com website.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"acknowledgements","dir":"Articles","previous_headings":"","what":"Acknowledgements","title":"Introduction to konfound","text":"research reported supported Institute Education Sciences, U.S. Department Education, Grant R305D220022 Michigan State University. opinions expressed authors represent views Institute U.S. Department Education.","code":""},{"path":[]},{"path":"https://konfound-it.org/konfound/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joshua M Rosenberg. Author, maintainer. Ran Xu. Contributor. Qinyun Lin. Contributor. Spiro Maroulis. Contributor. Sarah Narvaiz. Contributor. Kenneth Frank. Contributor. Wei Wang. Contributor. Yunhe Cui. Contributor. Gaofei Zhang. Contributor. Xuesen Cheng. Contributor. JiHoon Choi. Contributor. Guan Saw. Contributor.","code":""},{"path":"https://konfound-it.org/konfound/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Rosenberg JM (2024). konfound: Quantify Robustness Causal Inferences. R package version 1.0.1, https://konfound-.org/konfound/, https://github.com/konfound-project/konfound.","code":"@Manual{, title = {konfound: Quantify the Robustness of Causal Inferences}, author = {Joshua M Rosenberg}, year = {2024}, note = {R package version 1.0.1, https://konfound-it.org/konfound/}, url = {https://github.com/konfound-project/konfound}, }"},{"path":"https://konfound-it.org/konfound/index.html","id":"konfound","dir":"","previous_headings":"","what":"Quantify the Robustness of Causal Inferences","title":"Quantify the Robustness of Causal Inferences","text":"goal konfound carry sensitivity analysis help analysts quantify robust inferences potential sources bias. R package provides tools carry sensitivity analysis described Frank, Maroulis, Duong, Kelcey (2013) based Rubin’s (1974) causal model well Frank (2000) based impact threshold confounding variable.","code":""},{"path":"https://konfound-it.org/konfound/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Quantify the Robustness of Causal Inferences","text":"can install CRAN version konfound : can install development version GitHub :","code":"install.packages(\"konfound\") install.packages(\"devtools\") devtools::install_github(\"konfound-project/konfound\")"},{"path":[]},{"path":"https://konfound-it.org/konfound/index.html","id":"pkonfound-for-published-studies","dir":"","previous_headings":"","what":"pkonfound() for published studies","title":"Quantify the Robustness of Causal Inferences","text":"pkonfound(), published studies, calculates (1) much bias must estimate invalidate/sustain inference, interprets terms much data need replaced nullify inference (Robustness Inference Replacement, RIR); (2) impact omitted variable necessary invalidate/sustain inference regression coefficient (Impact Threshold Confounding Variable, ITCV). RIR reported default. ITCV can generated specifying index = \"\".","code":"library(konfound) #> Sensitivity analysis as described in Frank, #> Maroulis, Duong, and Kelcey (2013) and in #> Frank (2000). #> For more information visit http://konfound-it.com. pkonfound(est_eff = 2, std_err = .4, n_obs = 100, n_covariates = 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 60 #> #> To invalidate the inference of an effect using the threshold of 0.794 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 60.295% #> of the (2) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 60 (60.295%) #> observations with data points for which the effect is 0 (RIR = 60). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(est_eff = 2, std_err = .4, n_obs = 100, n_covariates = 3, index = \"IT\") #> Impact Threshold for a Confounding Variable (ITCV): #> #> The minimum impact of an omitted variable to invalidate an inference for #> a null hypothesis of an effect of nu (0) is based on a correlation of 0.566 #> with the outcome and 0.566 with the predictor of interest (conditioning #> on all observed covariates in the model; signs are interchangeable). This is #> based on a threshold effect of 0.2 for statistical significance (alpha = 0.05). #> #> Correspondingly the impact of an omitted variable (as defined in Frank 2000) must be #> 0.566 X 0.566 = 0.321 to invalidate an inference for a null hypothesis of an effect of nu (0). #> #> For calculation of unconditional ITCV using pkonfound(), additionally include #> the R2, sdx, and sdy as input, and request raw output. #> #> See Frank (2000) for a description of the method. #> #> Citation: #> Frank, K. (2000). Impact of a confounding variable on the inference of a #> regression coefficient. Sociological Methods and Research, 29 (2), 147-194 #> #> Accuracy of results increases with the number of decimals reported. #> #> The ITCV analysis was originally derived for OLS standard errors. If the #> standard errors reported in the table were not based on OLS, some caution #> should be used to interpret the ITCV. #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound()."},{"path":"https://konfound-it.org/konfound/index.html","id":"konfound-for-models-fit-in-r","dir":"","previous_headings":"","what":"konfound() for models fit in R","title":"Quantify the Robustness of Causal Inferences","text":"konfound() calculates robustness inferences models fit R. example, coefficients linear model fit lm() using built-dataset mtcars: Sensitivity analysis effect wt mpg can carried follows, specifying fitted model object: Similar pkonfound, ITCV can generated specifying index = \"\".","code":"m1 <- lm(mpg ~ wt + disp, data = mtcars) m1 #> #> Call: #> lm(formula = mpg ~ wt + disp, data = mtcars) #> #> Coefficients: #> (Intercept) wt disp #> 34.96055 -3.35083 -0.01772 summary(m1) #> #> Call: #> lm(formula = mpg ~ wt + disp, data = mtcars) #> #> Residuals: #> Min 1Q Median 3Q Max #> -3.4087 -2.3243 -0.7683 1.7721 6.3484 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 34.96055 2.16454 16.151 4.91e-16 *** #> wt -3.35082 1.16413 -2.878 0.00743 ** #> disp -0.01773 0.00919 -1.929 0.06362 . #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> Residual standard error: 2.917 on 29 degrees of freedom #> Multiple R-squared: 0.7809, Adjusted R-squared: 0.7658 #> F-statistic: 51.69 on 2 and 29 DF, p-value: 2.744e-10 konfound(m1, wt) #> Robustness of Inference to Replacement (RIR): #> RIR = 9 #> #> To invalidate the inference of an effect using the threshold of -2.381 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 28.946% #> of the (-3.351) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 9 (28.946%) #> observations with data points for which the effect is 0 (RIR = 9). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> NULL konfound(m1, wt, index = \"IT\") #> Impact Threshold for a Confounding Variable (ITCV): #> #> The minimum (in absolute value) impact of an omitted variable to invalidate #> an inference for a null hypothesis of an effect of nu (0) is based on #> a correlation of -0.425 with the outcome and 0.425 with the predictor of #> interest (conditioning on all observed covariates in the model; signs are #> interchangeable). This is based on a threshold effect of -0.355 for statistical #> significance (alpha = 0.05). #> #> Correspondingly the impact of an omitted variable (as defined in Frank 2000) must be #> -0.425 X 0.425 = -0.18 to invalidate an inference for a null hypothesis of an effect of nu (0). #> #> See Frank (2000) for a description of the method. #> #> Citation: #> Frank, K. (2000). Impact of a confounding variable on the inference of a #> regression coefficient. Sociological Methods and Research, 29 (2), 147-194 #> #> Accuracy of results increases with the number of decimals reported. #> #> The ITCV analysis was originally derived for OLS standard errors. If the #> standard errors reported in the table were not based on OLS, some caution #> should be used to interpret the ITCV. #> NULL"},{"path":"https://konfound-it.org/konfound/index.html","id":"mkonfound-for-meta-analyses-including-sensitivity-analysis","dir":"","previous_headings":"","what":"mkonfound for meta-analyses including sensitivity analysis","title":"Quantify the Robustness of Causal Inferences","text":"mkonfound() supports sensitivity can compared synthesized across multiple analyses. can use existing (built-) dataset, mkonfound_ex.","code":"mkonfound_ex #> # A tibble: 30 × 2 #> t df #> #> 1 7.08 178 #> 2 4.13 193 #> 3 1.89 47 #> 4 -4.17 138 #> 5 -1.19 97 #> 6 3.59 87 #> 7 0.282 117 #> 8 2.55 75 #> 9 -4.44 137 #> 10 -2.05 195 #> # ℹ 20 more rows mkonfound(mkonfound_ex, t, df) #> # A tibble: 30 × 7 #> t df action inference pct_bias_to_change_i…¹ itcv r_con #> #> 1 7.08 178 to_invalidate reject_null 68.8 0.378 0.614 #> 2 4.13 193 to_invalidate reject_null 50.6 0.168 0.41 #> 3 1.89 47 to_sustain fail_to_rejec… 5.47 -0.012 0.11 #> 4 -4.17 138 to_invalidate reject_null 50.3 0.202 0.449 #> 5 -1.19 97 to_sustain fail_to_rejec… 39.4 -0.065 0.255 #> 6 3.59 87 to_invalidate reject_null 41.9 0.19 0.436 #> 7 0.282 117 to_sustain fail_to_rejec… 85.5 -0.131 0.361 #> 8 2.55 75 to_invalidate reject_null 20.6 0.075 0.274 #> 9 -4.44 137 to_invalidate reject_null 53.0 0.225 0.475 #> 10 -2.05 195 to_invalidate reject_null 3.51 0.006 0.077 #> # ℹ 20 more rows #> # ℹ abbreviated name: ¹pct_bias_to_change_inference"},{"path":[]},{"path":"https://konfound-it.org/konfound/index.html","id":"how-to-learn-more-about-sensitivity-analysis","dir":"","previous_headings":"","what":"How to learn more about sensitivity analysis","title":"Quantify the Robustness of Causal Inferences","text":"learn sensitivity analysis, please visit: KonFound-website, latest news, links tools support Introduction konfound vignette, detailed information functions (pkonfound(), konfound(), mkounfound()) Konfound-! interactive web application, links PowerPoints key publications","code":""},{"path":"https://konfound-it.org/konfound/index.html","id":"issues-feature-requests-and-contributing","dir":"","previous_headings":"","what":"Issues, feature requests, and contributing","title":"Quantify the Robustness of Causal Inferences","text":"prefer issues filed via GitHub (link issues page konfound ) though also welcome questions feedback requests via email (see DESCRIPTION file). Contributing guidelines .","code":""},{"path":"https://konfound-it.org/konfound/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Quantify the Robustness of Causal Inferences","text":"Please note konfound project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://konfound-it.org/konfound/reference/binary_dummy_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Binary dummy data — binary_dummy_data","title":"Binary dummy data — binary_dummy_data","text":"data made-data use examples.","code":""},{"path":"https://konfound-it.org/konfound/reference/binary_dummy_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Binary dummy data — binary_dummy_data","text":"data.frame 107 rows 3 variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate delta star for sensitivity analysis — cal_delta_star","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"Calculate delta star sensitivity analysis","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"","code":"cal_delta_star( FR2max, R2, R2_uncond, est_eff, eff_thr, var_x, var_y, est_uncond, rxz, n_obs )"},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"FR2max maximum R2 R2 current R2 R2_uncond unconditional R2 est_eff estimated effect eff_thr effect threshold var_x variance X var_y variance Y est_uncond unconditional estimate rxz correlation coefficient X Z n_obs number observations","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"delta star value","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"Calculate rxy based ryxGz, rxz, ryz","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"","code":"cal_rxy(ryxGz, rxz, ryz)"},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"ryxGz correlation coefficient Y X given Z rxz correlation coefficient X Z ryz correlation coefficient Y Z","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"rxy value","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate R2xz based on variances and standard error — cal_rxz","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"Calculate R2xz based variances standard error","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"","code":"cal_rxz(var_x, var_y, R2, df, std_err)"},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"var_x variance X var_y variance Y R2 coefficient determination df degrees freedom std_err standard error","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"R2xz value","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate R2yz based on ryxGz and R2 — cal_ryz","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"Calculate R2yz based ryxGz R2","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"","code":"cal_ryz(ryxGz, R2)"},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"ryxGz correlation coefficient Y X given Z R2 coefficient determination","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"R2yz value","code":""},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform a Chi-Square Test — chisq_p","title":"Perform a Chi-Square Test — chisq_p","text":"`chisq_p` calculates p-value chi-square test given contingency table.","code":""},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform a Chi-Square Test — chisq_p","text":"","code":"chisq_p(a, b, c, d)"},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform a Chi-Square Test — chisq_p","text":"Frequency count row 1, column 1. b Frequency count row 1, column 2. c Frequency count row 2, column 1. d Frequency count row 2, column 2.","code":""},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform a Chi-Square Test — chisq_p","text":"P-value chi-square test.","code":""},{"path":"https://konfound-it.org/konfound/reference/concord1.html","id":null,"dir":"Reference","previous_headings":"","what":"Concord1 data — concord1","title":"Concord1 data — concord1","text":"data Hamilton (1983)","code":""},{"path":"https://konfound-it.org/konfound/reference/concord1.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Concord1 data — concord1","text":"data.frame 496 rows 10 variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/concord1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Concord1 data — concord1","text":"Hamilton, Lawrence C. 1983. Saving water: causal model household conservation. Sociological Perspectives 26(4):355-374.","code":""},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"Extract Degrees Freedom Fixed Effects Linear Mixed-Effects Model","code":""},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"","code":"get_kr_df(model_object)"},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"model_object mixed-effects model object produced lme4::lmer.","code":""},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"vector containing degrees freedom fixed effects model.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Various Model Types — konfound","title":"Konfound Analysis for Various Model Types — konfound","text":"Performs sensitivity analysis fitted models including linear models (`lm`), generalized linear models (`glm`), linear mixed-effects models (`lmerMod`). calculates amount bias required invalidate sustain inference,impact omitted variable necessary affect inference.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Various Model Types — konfound","text":"","code":"konfound( model_object, tested_variable, alpha = 0.05, tails = 2, index = \"RIR\", to_return = \"print\", two_by_two = FALSE, n_treat = NULL, switch_trm = TRUE, replace = \"control\" )"},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Various Model Types — konfound","text":"model_object model object produced `lm`, `glm`, `lme4::lmer`. tested_variable Variable associated coefficient tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return Type output return ('print', 'raw_output', 'table'). two_by_two Boolean; `TRUE`, uses 2x2 table approach `glm` dichotomous variables. n_treat Number treatment cases (used `two_by_two` `TRUE`). switch_trm Boolean; switch treatment control analysis. replace Replacement method treatment cases ('control' default).","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Various Model Types — konfound","text":"Depending `to_return`, prints result, returns raw output, summary table.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Konfound Analysis for Various Model Types — konfound","text":"","code":"# using lm() for linear models m1 <- lm(mpg ~ wt + hp, data = mtcars) konfound(m1, wt) #> Robustness of Inference to Replacement (RIR): #> RIR = 21 #> #> To invalidate the inference of an effect using the threshold of -1.294 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 66.629% #> of the (-3.878) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 21 (66.629%) #> observations with data points for which the effect is 0 (RIR = 21). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> NULL konfound(m1, wt, to_return = \"table\") #> Dependent variable is mpg #> For interpretation, check out to_return = 'print'. #> # A tibble: 3 × 6 #> term estimate std.error statistic p.value itcv #> #> 1 (Intercept) 37.2 1.60 23.3 0 NA #> 2 wt -3.88 0.633 -6.13 0 0.291 #> 3 hp -0.032 0.009 -3.52 0.001 0.511 # using glm() for non-linear models if (requireNamespace(\"forcats\")) { d <- forcats::gss_cat d$married <- ifelse(d$marital == \"Married\", 1, 0) m2 <- glm(married ~ age, data = d, family = binomial(link = \"logit\")) konfound(m2, age) } #> Note that if your model is a logistic regression, we recommend using the pkonfound command for logistic regression with manually entered parameter estimates and other quantities. #> Note that this is only an approximation. For exact results in terms of the number of cases that must be switched from treatment success to treatment failure to invalidate the inference see: https://msu.edu/~kenfrank/non%20linear%20replacement%20treatment.xlsm #> If a dichotomous independent variable is used, consider using the 2X2 table approach enabled with the argument two_by_two = TRUE #> Warning: Due to an issue with the margins and predictions package, these are the raw coefficients, not the average marginal effects; we will address this in future patches #> Robustness of Inference to Replacement (RIR): #> RIR = 17983 #> #> To invalidate the inference of an effect using the threshold of 0.002 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 84.006% #> of the (0.01) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 17983 (84.006%) #> observations with data points for which the effect is 0 (RIR = 17983). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> NULL # using lme4 for mixed effects (or multi-level) models if (requireNamespace(\"lme4\")) { library(lme4) m3 <- fm1 <- lme4::lmer(Reaction ~ Days + (1 | Subject), sleepstudy) konfound(m3, Days) } #> Loading required package: Matrix #> Robustness of Inference to Replacement (RIR): #> RIR = 137 #> #> To invalidate the inference of an effect using the threshold of 1.588 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 84.826% #> of the (10.467) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 137 (84.826%) #> observations with data points for which the effect is 0 (RIR = 137). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> Note that the Kenward-Roger approximation is used to #> estimate degrees of freedom for the predictor(s) of interest. #> We are presently working to add other methods for calculating #> the degrees of freedom for the predictor(s) of interest. #> If you wish to use other methods now, consider those detailed here: #> https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html #> #why-doesnt-lme4-display-denominator-degrees-of-freedomp-values-what-other-options-do-i-have. #> You can then enter degrees of freedom obtained from another method along with the coefficient, #> number of observations, and number of covariates to the pkonfound() function to quantify the robustness of the inference. #> NULL m4 <- glm(outcome ~ condition, data = binary_dummy_data, family = binomial(link = \"logit\")) konfound(m4, condition, two_by_two = TRUE, n_treat = 55) #> Robustness of Inference to Replacement (RIR): #> RIR = 15 #> Fragility = 10 #> #> The table implied by the parameter estimates and sample sizes you entered: #> User-entered Table: #> Fail Success Success_Rate #> Control 36 16 30.77% #> Treatment 18 37 67.27% #> Total 54 53 49.53% #> #> The reported log odds = 1.527, SE = 0.415, and p-value = 0.000. #> Values in the table have been rounded to the nearest integer. This may cause #> a small change to the estimated effect for the table. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.050), #> one would need to transfer 10 data points from treatment success to treatment failure (Fragility = 10). #> This is equivalent to replacing 15 (40.541%) treatment success data points with data points #> for which the probability of failure in the control group (69.231%) applies (RIR = 15). #> #> Note that RIR = Fragility/P(destination) #> #> The transfer of 10 data points yields the following table: #> Transfer Table: #> Fail Success Success_Rate #> Control 36 16 30.77% #> Treatment 28 27 49.09% #> Total 64 43 40.19% #> #> The log odds (estimated effect) = 0.775, SE = 0.404, p-value = 0.058. #> This is based on t = estimated effect/standard error #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> Accuracy of results increases with the number of decimals entered. #> NULL"},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Generalized Linear Models — konfound_glm","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"function performs konfound analysis generalized linear model object. uses 'broom' tidy model outputs calculates sensitivity inferences. supports analysis single variable multiple variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"","code":"konfound_glm( model_object, tested_variable_string, alpha, tails, index = \"RIR\", to_return )"},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"model_object model object produced glm. tested_variable_string name variable tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return type output return.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"results konfound analysis specified variable(s).","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"function performs konfound analysis generalized linear model object dichotomous outcome. uses 'broom' tidy model outputs calculates sensitivity inferences.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"","code":"konfound_glm_dichotomous( model_object, tested_variable_string, alpha, tails, to_return, n_treat, switch_trm, replace )"},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"model_object model object produced glm. tested_variable_string name variable tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). to_return type output return. n_treat Number treatment cases. switch_trm Term switch sensitivity analysis. replace Boolean indicating whether replace cases .","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"results konfound analysis.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Linear Models — konfound_lm","title":"Konfound Analysis for Linear Models — konfound_lm","text":"function performs konfound analysis linear model object produced lm. calculates sensitivity inferences coefficients model. supports analysis single variable multiple variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Linear Models — konfound_lm","text":"","code":"konfound_lm( model_object, tested_variable_string, alpha, tails, index, to_return )"},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Linear Models — konfound_lm","text":"model_object linear model object produced lm. tested_variable_string name variable tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return type output return.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Linear Models — konfound_lm","text":"results konfound analysis specified variable(s).","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"function performs konfound analysis linear mixed-effects model object produced lme4::lmer. calculates sensitivity inferences fixed effects model. supports analysis single variable multiple variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"","code":"konfound_lmer( model_object, tested_variable_string, test_all, alpha, tails, index, to_return )"},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"model_object mixed-effects model object produced lme4::lmer. tested_variable_string name fixed effect tested. test_all Boolean indicating whether test fixed effects . alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return type output return.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"results konfound analysis specified fixed effect(s).","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"Performs sensitivity analysis multiple models, parameters stored data frame. calculates amount bias required invalidate sustain inference case data frame.","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"","code":"mkonfound(d, t, df, alpha = 0.05, tails = 2, return_plot = FALSE)"},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"d data frame tibble containing t-statistics associated degrees freedom. t Column name vector t-statistics. df Column name vector degrees freedom associated t-statistics. alpha Significance level hypothesis testing. tails Number tails test (1 2). return_plot Whether return plot percent bias (default `FALSE`).","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"Depending `return_plot`, either returns data frame analysis results plot.","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"","code":"if (FALSE) { # \\dontrun{ mkonfound_ex str(d) mkonfound(mkonfound_ex, t, df) } # }"},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":null,"dir":"Reference","previous_headings":"","what":"Example data for the mkonfound function — mkonfound_ex","title":"Example data for the mkonfound function — mkonfound_ex","text":"dataset containing t df values example studies Educational Evaluation Policy Analysis (detailed Frank et al., 2013): https://drive.google.com/file/d/1aGhxGjvMvEPVAgOA8rrxvA97uUO5TTMe/view","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example data for the mkonfound function — mkonfound_ex","text":"","code":"mkonfound_ex"},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example data for the mkonfound function — mkonfound_ex","text":"data frame 30 rows 2 variables: t t value df degrees freedom associated t value","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example data for the mkonfound function — mkonfound_ex","text":"https://drive.google.com/file/d/1aGhxGjvMvEPVAgOA8rrxvA97uUO5TTMe/view","code":""},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Output data frame based on model estimates and thresholds — output_df","title":"Output data frame based on model estimates and thresholds — output_df","text":"Output data frame based model estimates thresholds","code":""},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output data frame based on model estimates and thresholds — output_df","text":"","code":"output_df( est_eff, beta_threshhold, unstd_beta, bias = NULL, sustain = NULL, recase, obs_r, critical_r, r_con, itcv, non_linear )"},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output data frame based on model estimates and thresholds — output_df","text":"est_eff estimated effect beta_threshhold threshold beta unstd_beta unstandardized beta value bias bias change inference sustain sustain change inference recase number cases replace null obs_r observed correlation critical_r critical correlation r_con correlation omitted variable itcv inferential threshold confounding variable non_linear flag non-linear models","code":""},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output data frame based on model estimates and thresholds — output_df","text":"data frame model information","code":""},{"path":"https://konfound-it.org/konfound/reference/output_print.html","id":null,"dir":"Reference","previous_headings":"","what":"Output printed text with formatting — output_print","title":"Output printed text with formatting — output_print","text":"function outputs printed text various indices RIR (Robustness Inference Replacement) (Impact Threshold Confounding Variable) specific formatting like bold, underline, italic using functions crayon package. handles different scenarios based effect difference, beta threshold, parameters, providing formatted output case.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output printed text with formatting — output_print","text":"","code":"output_print( n_covariates, est_eff, beta_threshhold, bias = NULL, sustain = NULL, nu, eff_thr, recase, obs_r, critical_r, r_con, itcv, alpha, index, far_bound, sdx = NA, sdy = NA, R2 = NA, rxcv = NA, rycv = NA )"},{"path":"https://konfound-it.org/konfound/reference/output_print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output printed text with formatting — output_print","text":"n_covariates number covariates. est_eff estimated effect. beta_threshhold threshold value beta, used statistical significance determination. bias percentage estimate due bias (optional). sustain percentage estimate necessary sustain inference (optional). nu hypothesized effect size used replacement analysis. eff_thr Threshold estimated effect. recase number cases need replaced change inference. obs_r observed correlation coefficient data. critical_r critical correlation coefficient statistical significance. r_con correlation coefficient omitted variable outcome predictor. itcv impact threshold confounding variable. alpha level statistical significance. index character string indicating index output generated ('RIR' ''). far_bound Indicator whether threshold towards side nu 0, default zero (side), alternative one (side). sdx Standard deviation x. sdy Standard deviation y. R2 unadjusted, original R2 observed function. rxcv correlation x CV. rycv correlation y CV.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Output a Tidy Table from a Model Object — output_table","title":"Output a Tidy Table from a Model Object — output_table","text":"function takes model object tested variable, tidies model output using `broom::tidy`, calculates impact threshold confounding variables (ITCV) impact covariate,returns rounded, tidy table model outputs.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output a Tidy Table from a Model Object — output_table","text":"","code":"output_table(model_object, tested_variable)"},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output a Tidy Table from a Model Object — output_table","text":"model_object model object generate output. tested_variable variable tested model.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output a Tidy Table from a Model Object — output_table","text":"tidy data frame containing model outputs, ITCV, impacts covariates.","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform sensitivity analysis for published studies — pkonfound","title":"Perform sensitivity analysis for published studies — pkonfound","text":"published studies, command calculates (1) much bias must estimate invalidate/sustain inference; (2) impact omitted variable necessary invalidate/sustain inference regression coefficient.","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform sensitivity analysis for published studies — pkonfound","text":"","code":"pkonfound( est_eff, std_err, n_obs, n_covariates = 1, alpha = 0.05, tails = 2, index = \"RIR\", nu = 0, n_treat = NULL, switch_trm = TRUE, model_type = \"ols\", a = NULL, b = NULL, c = NULL, d = NULL, two_by_two_table = NULL, test = \"fisher\", replace = \"control\", sdx = NA, sdy = NA, R2 = NA, far_bound = 0, eff_thr = NA, FR2max = 0, FR2max_multiplier = 1.3, to_return = \"print\" )"},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform sensitivity analysis for published studies — pkonfound","text":"est_eff estimated effect (unstandardized beta coefficient group mean difference) std_err standard error estimate unstandardized regression coefficient n_obs number observations sample n_covariates number covariates regression model alpha probability rejecting null hypothesis (defaults 0.05) tails integer whether hypothesis testing one-tailed (1) two-tailed (2; defaults 2) index whether output RIR (impact threshold); defaults \"RIR\" nu hypothesis tested; defaults testing whether est_eff significantly different 0 n_treat number cases associated treatment condition; applicable model_type = \"logistic\" switch_trm whether switch treatment control cases; defaults FALSE; applicable model_type = \"logistic\" model_type type model estimated; defaults \"ols\" linear regression model; option \"logistic\" cell number cases control group showing unsuccessful results b cell number cases control group showing successful results c cell number cases treatment group showing unsuccessful results d cell number cases treatment group showing successful results two_by_two_table table matrix can coerced one (data.frame, tibble, tribble) , b, c, d arguments can extracted test whether using Fisher's Exact Test chi-square test; defaults Fisher's Exact Test replace whether using entire sample control group calculate base rate; default control sdx standard deviation X sdy standard deviation Y R2 unadjusted, original R2 observed function far_bound whether estimated effect moved boundary closer (default 0) away (1); eff_thr RIR: unstandardized coefficient threshold change inference; : correlation defining threshold inference FR2max largest R2, R2max, final model unobserved confounder FR2max_multiplier multiplier R2 get R2max, default set 1.3 to_return whether return data.frame (specifying argument equal \"raw_output\" use analyses) plot (\"plot\"); default print (\"print\") output console; can specify vector output return","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform sensitivity analysis for published studies — pkonfound","text":"pkonfound prints bias number cases replaced cases effect nullify inference. to_return = \"raw_output,\" list given following components: obs_r correlation predictor interest (X) outcome (Y) sample data. act_r correlation predictor interest (X) outcome (Y) sample regression based t-ratio accounting non-zero null hypothesis. critical_r critical correlation value inference nullified (e.g., associated p=.05). r_final final correlation value given CV. equal critical_r. rxcv correlation predictor interest (X) CV necessary nullify inference smallest impact. rycv correlation outcome (Y) CV necessary nullify inference smallest impact. rxcvGz correlation predictor interest CV necessary nullify inference smallest impact conditioning observed covariates (given z). rycvGz correlation outcome CV necessary nullify inference smallest impact conditioning observed covariates (given z). itcvGz ITCV conditioning observed covariates. itcv Unconditional ITCV. r2xz R2 using observed covariates explain predictor interest (X). r2yz R2 using observed covariates explain outcome (Y). delta_star delta calculated using Oster's unrestricted estimator. delta_star_restricted delta calculated using Oster's restricted estimator. delta_exact correlation-based delta. delta_pctbias percent bias comparing delta_star delta_exact. cor_oster correlation matrix implied delta_star. cor_exact correlation matrix implied delta_exact. beta_threshold threshold value estimated effect. beta_threshold_verify estimated effect given RIR. equal beta_threshold. perc_bias_to_change percent bias change inference. RIR_primary Robustness Inference Replacement (RIR). RIR_supplemental RIR extra row column needed nullify inference. RIR_perc RIR % total sample (linear regression) % data points cell replacement takes place (logistic 2 2 table). fragility_primary Fragility. number switches (e.g., treatment success treatment failure) nullify inference. fragility_supplemental Fragility extra row column needed nullify inference. starting_table Observed 2 2 table replacement switching. Implied table logistic regression. final_table 2 2 table replacement switching. user_SE user entered standard error. applicable logistic regression. needtworows whether double row switches needed. analysis_SE standard error used generate plausible 2 2 table. applicable logistic regression. Fig_ITCV figure ITCV. Fig_RIR figure RIR.","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform sensitivity analysis for published studies — pkonfound","text":"","code":"# using pkonfound for linear models pkonfound(2, .4, 100, 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 60 #> #> To invalidate the inference of an effect using the threshold of 0.794 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 60.295% #> of the (2) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 60 (60.295%) #> observations with data points for which the effect is 0 (RIR = 60). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(-2.2, .65, 200, 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 83 #> #> To invalidate the inference of an effect using the threshold of -1.282 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 41.73% #> of the (-2.2) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 83 (41.73%) #> observations with data points for which the effect is 0 (RIR = 83). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(.5, 3, 200, 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 183 #> #> The estimated effect is 0.5. The threshold value for statistical significance #> is 5.917 (with null hypothesis = 0 and alpha = 0.05). To reach that threshold, #> 91.549% of the (0.5) estimate would have to be due to bias. This implies to sustain #> an inference one would expect to have to replace 183 (91.549%) observations with #> effect of 0 with data points with effect of 5.917 (RIR = 183). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(-0.2, 0.103, 20888, 3, n_treat = 17888, model_type = \"logistic\") #> Robustness of Inference to Replacement (RIR): #> RIR = 2 #> Fragility = 1 #> #> The table implied by the parameter estimates and sample sizes you entered: #> User-entered Table: #> Fail Success Success_Rate #> Control 2882 118 3.93% #> Treatment 17308 580 3.24% #> Total 20190 698 3.34% #> #> The reported log odds = -0.200, SE = 0.103, and p-value = 0.052. #> Values in the table have been rounded to the nearest integer. This may cause #> a small change to the estimated effect for the table. #> #> To sustain an inference that the effect is different from 0 (alpha = 0.050), #> one would need to transfer 1 data points from treatment success to treatment failure (Fragility = 1). #> This is equivalent to replacing 2 (0.345%) treatment success data points with data points #> for which the probability of failure in the control group (96.067%) applies (RIR = 2). #> #> Note that RIR = Fragility/P(destination) #> #> The transfer of 1 data points yields the following table: #> Transfer Table: #> Fail Success Success_Rate #> Control 2882 118 3.93% #> Treatment 17309 579 3.24% #> Total 20191 697 3.34% #> #> The log odds (estimated effect) = -0.202, SE = 0.103, p-value = 0.050. #> This is based on t = estimated effect/standard error #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> Accuracy of results increases with the number of decimals entered. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(2, .4, 100, 3, to_return = \"thresh_plot\") pkonfound(2, .4, 100, 3, to_return = \"corr_plot\") # using pkonfound for a 2x2 table pkonfound(a = 35, b = 17, c = 17, d = 38) #> Robustness of Inference to Replacement (RIR): #> RIR = 14 #> Fragility = 9 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.05), #> one would need to transfer 9 data points from treatment success to treatment failure as shown, #> from the User-entered Table to the Transfer Table (Fragility = 9). #> This is equivalent to replacing 14 (36.842%) treatment success data points with data points #> for which the probability of failure in the control group (67.308%) applies (RIR = 14). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the estimated odds ratio is 4.530, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the estimated odds ratio is 2.278, with p-value of 0.051: #> Transfer Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 26 29 52.73% #> Total 61 46 42.99% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(a = 35, b = 17, c = 17, d = 38, alpha = 0.01) #> Robustness of Inference to Replacement (RIR): #> RIR = 9 #> Fragility = 6 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.01), #> one would need to transfer 6 data points from treatment success to treatment failure as shown, #> from the User-entered Table to the Transfer Table (Fragility = 6). #> This is equivalent to replacing 9 (23.684%) treatment success data points with data points #> for which the probability of failure in the control group (67.308%) applies (RIR = 9). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the estimated odds ratio is 4.530, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the estimated odds ratio is 2.835, with p-value of 0.011: #> Transfer Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 23 32 58.18% #> Total 58 49 45.79% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(a = 35, b = 17, c = 17, d = 38, alpha = 0.01, switch_trm = FALSE) #> Robustness of Inference to Replacement (RIR): #> RIR = 19 #> Fragility = 6 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.01), #> one would need to transfer 6 data points from control failure to control success as shown, #> from the User-entered Table to the Transfer Table (Fragility = 6). #> This is equivalent to replacing 19 (54.286%) control failure data points with data points #> for which the probability of success in the control group (32.692%) applies (RIR = 19). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the estimated odds ratio is 4.530, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the estimated odds ratio is 2.790, with p-value of 0.012: #> Transfer Table: #> Fail Success Success_Rate #> Control 29 23 44.23% #> Treatment 17 38 69.09% #> Total 46 61 57.01% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(a = 35, b = 17, c = 17, d = 38, test = \"chisq\") #> Robustness of Inference to Replacement (RIR): #> RIR = 15 #> Fragility = 10 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.05), #> one would need to transfer 10 data points from treatment success to treatment failure as shown, #> from the User-entered Table to the Transfer Table (Fragility = 10). #> This is equivalent to replacing 15 (39.474%) treatment success data points with data points #> for which the probability of failure in the control group (67.308%) applies (RIR = 15). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the Pearson's chi square is 14.176, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the Pearson's chi square is 3.640, with p-value of 0.056: #> Transfer Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 27 28 50.91% #> Total 62 45 42.06% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). # use pkonfound to calculate delta* and delta_exact pkonfound(est_eff = .4, std_err = .1, n_obs = 290, sdx = 2, sdy = 6, R2 = .7, eff_thr = 0, FR2max = .8, index = \"COP\", to_return = \"raw_output\") #> $`delta*` #> [1] 3.668243 #> #> $`delta*restricted` #> [1] 4.085172 #> #> $delta_exact #> [1] 1.508536 #> #> $delta_pctbias #> [1] 143.1658 #> #> $cor_oster #> Y X Z CV #> Y 1.0000000 0.3266139 0.8266047 0.2579193 #> X 0.3266139 1.0000000 0.2433792 0.8659296 #> Z 0.8266047 0.2433792 1.0000000 0.0000000 #> CV 0.2579193 0.8659296 0.0000000 1.0000000 #> #> $cor_exact #> Y X Z CV #> Y 1.0000000 0.3266139 0.8266047 0.3416500 #> X 0.3266139 1.0000000 0.2433792 0.3671463 #> Z 0.8266047 0.2433792 1.0000000 0.0000000 #> CV 0.3416500 0.3671463 0.0000000 1.0000000 #> #> $`var(Y)` #> [1] 36 #> #> $`var(X)` #> [1] 4 #> #> $`var(CV)` #> [1] 1 #> #> $Table #> M1:X M2:X,Z M3(delta_exact):X,Z,CV M3(delta*):X,Z,CV #> R2 0.1097571 0.7008711 8.006897e-01 0.8006897 #> coef_X 0.9798418 0.3980344 -1.114065e-16 -1.5383085 #> SE_X 0.1665047 0.0995086 8.775619e-02 0.1803006 #> std_coef_X 0.3266139 0.2297940 0.000000e+00 -0.5127695 #> t_X 5.8847685 4.0000000 -1.269500e-15 -8.5319081 #> coef_CV NA NA 2.049900e+00 4.2116492 #> SE_CV NA NA 1.702349e-01 0.3497584 #> t_CV NA NA 1.204159e+01 12.0415946 #> #> $Figure #> Warning: Use of `figTable$coef_X` is discouraged. #> ℹ Use `coef_X` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> Warning: Use of `figTable$coef_X` is discouraged. #> ℹ Use `coef_X` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> #> $`conditional RIR pi (fixed y)` #> [1] 0.4842727 #> #> $`conditional RIR (fixed y)` #> [1] 140.4391 #> #> $`conditional RIR pi (null)` #> [1] 0.2818584 #> #> $`conditional RIR (null)` #> [1] 81.73894 #> #> $`conditional RIR pi (rxyGz)` #> [1] 0.4977821 #> #> $`conditional RIR (rxyGz)` #> [1] 144.3568 #> # use pkonfound to calculate rxcv and rycv when preserving standard error pkonfound(est_eff = .5, std_err = .056, n_obs = 6174, eff_thr = .1, sdx = 0.22, sdy = 1, R2 = .3, index = \"PSE\", to_return = \"raw_output\") #> $`correlation between X and CV conditional on Z` #> [1] 0.2479732 #> #> $`correlation between Y and CV conditional on Z` #> [1] 0.3721927 #> #> $`correlation between X and CV` #> [1] 0.2143707 #> #> $`correlation between Y and CV` #> [1] 0.313404 #> #> $`covariance matrix` #> Y X Z CV #> Y 1.00000000 0.07773579 0.5394031 0.31340398 #> X 0.07773579 0.04840000 0.1105826 0.04716155 #> Z 0.53940306 0.11058258 1.0000000 0.00000000 #> CV 0.31340398 0.04716155 0.0000000 1.00000000 #> #> $Table #> M1:X M2:X,Z M3:X,Z,CV #> R2 0.12499409 0.30011338 0.38959867 #> coef_X 1.60611143 0.50004052 0.09740386 #> SE_X 0.05411712 0.05598639 0.05397058 #> std_coef_X 0.35334452 0.11294102 0.02142885 #> t_X 29.67843530 8.93146515 1.80475837 #> coef_Z NA 0.48410729 0.52863189 #> SE_Z NA 0.01231701 0.01159750 #> t_Z NA 39.30397315 45.58155174 #> coef_CV NA NA 0.30881026 #> SE_CV NA NA 0.01026456 #> t_CV NA NA 30.08509668 #>"},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Correlation Diagram — plot_correlation","title":"Plot Correlation Diagram — plot_correlation","text":"function creates plot illustrate correlation different variables,specifically focusing confounding variable, predictor interest, outcome.uses ggplot2 graphical representation.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Correlation Diagram — plot_correlation","text":"","code":"plot_correlation(r_con, obs_r, critical_r)"},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Correlation Diagram — plot_correlation","text":"r_con Correlation coefficient related confounding variable. obs_r Observed correlation coefficient. critical_r Critical correlation coefficient decision-making.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Correlation Diagram — plot_correlation","text":"ggplot object representing correlation diagram.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Effect Threshold Diagram — plot_threshold","title":"Plot Effect Threshold Diagram — plot_threshold","text":"function creates plot illustrate threshold effect estimate relation specified beta threshold. uses ggplot2 graphical representation.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Effect Threshold Diagram — plot_threshold","text":"","code":"plot_threshold(beta_threshold, est_eff)"},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Effect Threshold Diagram — plot_threshold","text":"beta_threshold threshold value effect. est_eff estimated effect size.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Effect Threshold Diagram — plot_threshold","text":"ggplot object representing effect threshold diagram.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"function performs sensitivity analysis 2x2 contingency table. calculates number cases need replaced invalidate sustain statistical inference. function also allows switching treatment success failure control success failure based provided parameters.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"","code":"tkonfound( a, b, c, d, alpha = 0.05, switch_trm = TRUE, test = \"fisher\", replace = \"control\", to_return = to_return )"},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"Number unsuccessful cases control group. b Number successful cases control group. c Number unsuccessful cases treatment group. d Number successful cases treatment group. alpha Significance level statistical test, default 0.05. switch_trm Boolean indicating whether switch treatment row cells, default TRUE. test Type statistical test use, either \"fisher\" (default) \"chisq\". replace Indicates whether use entire sample control group base rate calculation, default \"control\". to_return Type output return, either \"raw_output\" \"print\".","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"Returns detailed information sensitivity analysis, including number cases replaced (RIR), user-entered table, transfer table, conclusions.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"function generates plots illustrating change effect size influenced switching replacing outcomes 2x2 table. produces two plots: one showing possibilities (switching) another zoomed area positive RIR (Relative Impact Ratio).","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"","code":"tkonfound_fig( a, b, c, d, thr_p = 0.05, switch_trm = TRUE, test = \"fisher\", replace = \"control\" )"},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"Number cases control group unsuccessful outcomes. b Number cases control group successful outcomes. c Number cases treatment group unsuccessful outcomes. d Number cases treatment group successful outcomes. thr_p P-value threshold statistical significance, default 0.05. switch_trm Whether switch two cells treatment control row, default TRUE (treatment row). test Type statistical test used, either \"Fisher's Exact Test\" (default) \"Chi-square test\". replace Indicates whether use entire sample just control group calculating base rate, default \"control\".","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"Returns two plots showing effect hypothetical case switches effect size 2x2 table.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"","code":"tkonfound_fig(14, 17, 6, 25, test = \"chisq\") #> [[1]] #> Warning: Use of `meta$pdif` is discouraged. #> ℹ Use `pdif` instead. #> Warning: Use of `meta$RIR` is discouraged. #> ℹ Use `RIR` instead. #> Warning: Use of `meta$pdif` is discouraged. #> ℹ Use `pdif` instead. #> Warning: Use of `meta$current` is discouraged. #> ℹ Use `current` instead. #> Warning: Use of `meta$sigpoint` is discouraged. #> ℹ Use `sigpoint` instead. #> Warning: Use of `meta$RIR` is discouraged. #> ℹ Use `RIR` instead. #> Warning: Use of `meta$currentlabel` is discouraged. #> ℹ Use `currentlabel` instead. #> Warning: Use of `meta$RIR` is discouraged. #> ℹ Use `RIR` instead. #> Warning: Use of `meta$pdif` is discouraged. #> ℹ Use `pdif` instead. #> Warning: Removed 58 rows containing missing values or values outside the scale range #> (`geom_label_repel()`). #> #> [[2]] #> [1] \"A bend in line indicates switches from the control \\n row because the treatment row was exhausted.\" #> #> [[3]] #> Warning: Removed 11 rows containing missing values or values outside the scale range #> (`geom_label_repel()`). #>"},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify regression model with control variable Z — verify_reg_Gzcv","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"Verify regression model control variable Z","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"","code":"verify_reg_Gzcv(n_obs, sdx, sdy, sdz, sdcv, rxy, rxz, rzy, rcvy, rcvx, rcvz)"},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"n_obs number observations sdx standard deviation X sdy standard deviation Y sdz standard deviation Z sdcv sd C V rxy correlation coefficient X Y rxz correlation coefficient X Z rzy correlation coefficient Z Y rcvy correlation coefficient V Y rcvx correlation coefficient V X rcvz correlation coefficient V Z","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"list model parameters","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify unconditional regression model — verify_reg_uncond","title":"Verify unconditional regression model — verify_reg_uncond","text":"Verify unconditional regression model","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify unconditional regression model — verify_reg_uncond","text":"","code":"verify_reg_uncond(n_obs, sdx, sdy, rxy)"},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify unconditional regression model — verify_reg_uncond","text":"n_obs number observations sdx standard deviation X sdy standard deviation Y rxy correlation coefficient X Y","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify unconditional regression model — verify_reg_uncond","text":"list model parameters","code":""},{"path":"https://konfound-it.org/konfound/reference/zzz.html","id":null,"dir":"Reference","previous_headings":"","what":"Package Initialization Functions and Utilities — zzz","title":"Package Initialization Functions and Utilities — zzz","text":"functions used initializing package environment providing utility functions package.","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-101","dir":"Changelog","previous_headings":"","what":"konfound 1.0.1","title":"konfound 1.0.1","text":"CRAN release: 2024-10-07 minor edits advance CRAN submit","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-100","dir":"Changelog","previous_headings":"","what":"konfound 1.0.0","title":"konfound 1.0.0","text":"Includes option specify non-zero null hypotheses Includes option directly specify threshold inference Improved output statements Includes full raw results RIR ITCV Calculation unconditional ITCV possible","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-051","dir":"Changelog","previous_headings":"","what":"konfound 0.5.1","title":"konfound 0.5.1","text":"CRAN release: 2024-04-12 minor patch CRAN","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-050","dir":"Changelog","previous_headings":"","what":"konfound 0.5.0","title":"konfound 0.5.0","text":"CRAN release: 2024-03-18 improved testing suite removal test_all = TRUE deal high cyclomatic complexity improvement coding style consistent accordance good practice","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-040","dir":"Changelog","previous_headings":"","what":"konfound 0.4.0","title":"konfound 0.4.0","text":"CRAN release: 2021-06-01 major updates advance initial submission R Journal","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-031","dir":"Changelog","previous_headings":"","what":"konfound 0.3.1","title":"konfound 0.3.1","text":"address minor bug introduced index argument","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-030","dir":"Changelog","previous_headings":"","what":"konfound 0.3.0","title":"konfound 0.3.0","text":"CRAN release: 2020-12-17 integrate non-linear functions tkonfound() pkonfound() konfound()","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-021","dir":"Changelog","previous_headings":"","what":"konfound 0.2.1","title":"konfound 0.2.1","text":"CRAN release: 2020-02-26 Refinements bug fixes non-linear functions","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-020","dir":"Changelog","previous_headings":"","what":"konfound 0.2.0","title":"konfound 0.2.0","text":"Update non-linear functions.","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-012","dir":"Changelog","previous_headings":"","what":"konfound 0.1.2","title":"konfound 0.1.2","text":"CRAN release: 2019-04-12 Thanks J. Murphy pointing bug mkonfound works lme4 output, bug code konfound-lm related message displayed coefficients tested, suggesting add name variable data frame returned variables tested","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-011","dir":"Changelog","previous_headings":"","what":"konfound 0.1.1","title":"konfound 0.1.1","text":"CRAN release: 2019-01-21 Update license include names","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-010","dir":"Changelog","previous_headings":"","what":"konfound 0.1.0","title":"konfound 0.1.0","text":"CRAN release: 2018-04-06 Added NEWS.md file track changes package.","code":""}] +[{"path":[]},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement jmrosen48@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://konfound-it.org/konfound/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to konfound","title":"Contributing to konfound","text":"outlines propose change konfound.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to konfound","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to konfound","text":"want make bigger change, ’s good idea first file issue notify team. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed). See guide create great issue advice. may also wish contact development team bigger changes. Please see contact information DESCRIPTION .","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to konfound","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"konfound-project/konfound\", fork = TRUE). Install development dependencies devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). important: even team members, please make commits branches, first. Ensure checks passing. can see information within PR (GitHub). say passing failing, failing, can see cause. check passing, correct issue contact package maintainer help. Please run goodpractice::gp() ensure code quality compliance. markers can justifiably ignored, whereas others must addressed. See discussion . things aware : avoiding long code lines (80 characters) using TRUE FALSE instead T F using roxygen2 syntax import specific functions packages avoiding functions overly complex (.e., avoiding high cyclomatic complexity) new functions functionality, write examples tests cover core functionality. Aim 80% higher test coverage new functions. Check covr::package_coverage(). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. member team review PR. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to konfound","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://konfound-it.org/konfound/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to konfound","text":"Please note konfound project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://konfound-it.org/konfound/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 konfound authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"quantifying-the-robustness-of-inferences","dir":"Articles","previous_headings":"","what":"Quantifying the Robustness of Inferences","title":"Introduction to konfound","text":"Sensitivity analysis, statistical method crucial validating inferences across disciplines, quantifies conditions alter conclusions (Razavi et al. 2021). One line work rooted linear models foregrounds sensitivity inferences strength omitted variables (Frank 2000; Cinelli Hazlett 2019). recent approach rooted potential outcomes framework causal inference foregrounds hypothetical changes sample alter inference cases otherwise observed (Frank Min 2007; Frank et al. 2008, 2013; Xu et al. 2019). One sensitivity measure Impact Threshold Confounding Variable, ITCV, generates statements correlation omitted, confounding variable predictor interest outcome (Frank 2000). ITCV index can calculated linear model. Robustness Inference Replacement, RIR, assesses replacing certain percentage cases counterfactuals zero treatment effect nullify inference (Frank et al. 2013). RIR index general ITCV index. sensitivity analysis techniques describe paper implement konfound R package differ others several ways. Unlike Linden, Mathur, VanderWeele (2020), whose approach focuses dichotomous outcomes omitted variable sensitivity, approach extends continuous outcomes evaluates changes estimates standard errors. Oster (2019) focuses selection treatment based unobservable variables versus observable variables necessary nullify estimate. ITCV index focuses relationship unobservable predictor interest outcome. generally, many others used simulation-based approaches, approach uses closed-form expressions generate single term representing sensitivity. techniques, along others, reviewed discussed (along ITCV RIR approaches) Frank et al. (2023). implemented calculation ITCV RIR indices konfound R package. package intended provide easy--use principled set sensitivity techniques suitable range model dependent variable types use cases. audience broad: primarily social scientists, also interested individuals disciplines (e.g., health sciences). paper provides overview two core functions within konfound package, can calculate ITCV RIR indices: konfound() pkonfound(). functions allow users calculate robustness inferences using model estimated (R) using information model published study, respectively. konfound package available Comprehensive R Archive Network (CRAN) https://CRAN.R-project.org/package=konfound; can installed via install.packages(“konfound”) function within R.","code":""},{"path":[]},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"konfound","dir":"Articles","previous_headings":"Functionality","what":"konfound","title":"Introduction to konfound","text":"function calculates ITCV RIR models fitted R. function currently works linear models fitted lm(), glm(), lmer(). output printed R console bias must present number cases replaced cases effect nullify inference.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"example-for-linear-models-fit-with-lm","dir":"Articles","previous_headings":"Functionality > konfound","what":"Example for linear models fit with lm()","title":"Introduction to konfound","text":"example, use concord1 dataset built konfound package. dataset comes study examines causal mechanism behind household water conservation U.S. city. estimate effect following variables household water consumption 1981: household water consumption 1980 (water80) household income (income) education level household survey respondent (educat) retirement status respondent (retire) number individuals household 1980 (peop80) code use fit linear model using variables: results model fitting (can obtained running summary(m) within R) indicate predictors apart retire statistically significant effect water consumption. example, focus coefficient peop80 (β = 225.198, SE = 28.704, t = 7.845, p < .001).","code":"m <- lm(water81 ~ water80 + income + educat + retire + peop80, data = concord1)"},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"itcv-example-for-linear-models-fit-with-lm","dir":"Articles","previous_headings":"Functionality > konfound","what":"ITCV example for linear models fit with lm()","title":"Introduction to konfound","text":"Now, let’s examine robustness peop80 effect calculating ITCV: output indicates invalidate inference peop80 effect water81 using statistical significance threshold (e.g., p = .05), omitted variable correlated 0.520 peop80 0.520 water81, conditioning observed covariates.","code":"library(konfound) konfound(m, peop80, index = \"IT\") ## Impact Threshold for a Confounding Variable: ## The minimum impact of an omitted variable to invalidate an inference ## for a null hypothesis of 0 effect is based on a correlation of 0.52 with ## the outcome and at 0.52 with the predictor of interest (conditioning on ## observed covariates) based on a threshold of 0.089 for statistical ## significance (alpha = 0.05). ## ## Correspondingly the impact of an omitted variable (as defined in Frank ## 2000) must be 0.52 X 0.52 = 0.27 to invalidate an inference for a null ## hypothesis of 0 effect. See Frank (2000) for a description of the method. ## ## Citation: ## Frank, K. (2000). Impact of a confounding variable on the ## inference of a regression coefficient. Sociological Methods and Research, ## 29(2), 147-194 ## For more detailed output, consider setting `to_return` to table ## To consider other predictors of interest, consider setting `test_all` to ## TRUE."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"rir-example-for-linear-models-fit-with-lm","dir":"Articles","previous_headings":"Functionality > konfound","what":"RIR example for linear models fit with lm()","title":"Introduction to konfound","text":"can also examine robustness calculating RIR: output presents two interpretations RIR. First, 74.956% estimated effect peop80 water81 attributed bias invalidate inference. Equivalently, expect replace 372 486 households (76%) cases peop80 effect invalidate inference. created guidelines evaluating RIR relative bias accounted observed covariates published norms (Frank et al. 2013, 2021).","code":"konfound(m, peop80, index = \"RIR\") ## Robustness of Inference to Replacement (RIR): ## To invalidate an inference, 74.955 % of the ## estimate would have to be due to bias. ## This is based on a threshold of 56.4 for statistical ## significance (alpha = 0.05). ## ## To invalidate an inference, 372 observations would ## have to be replaced with cases for which the effect is 0 (RIR = 372). ## ## See Frank et al. (2013) for a description of the method. ## ## Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). ## What would it take to change an inference? ## Using Rubin's causal model to interpret the robustness of causal inferences. ## Education, Evaluation and Policy Analysis, 35 437-460. ## For more detailed output, consider setting `to_return` to table ## To consider other predictors of interest, ## consider setting `test_all` to TRUE."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"pkonfound","dir":"Articles","previous_headings":"Functionality","what":"pkonfound","title":"Introduction to konfound","text":"function quantifies sensitivity analyses already conducted, already-published study analysis carried using software. function calculates much bias must estimate invalidate/sustain inference, can interpreted percentage cases replaced (e.g., cases predictor effect outcome) invalidate inference. also calculates impact omitted variable necessary invalidate/sustain inference regression coefficient, impact defined correlation omitted variable focal predictor multiplied correlation omitted variable outcome.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"itcv-example-for-a-regression-analysis","dir":"Articles","previous_headings":"Functionality > pkonfound","what":"ITCV example for a regression analysis","title":"Introduction to konfound","text":"example, following estimated quantities estimated regression model entered pkonfound function: unstandardized beta coefficient predictor interest (est_eff = 2), estimated standard error (std_err = .4), sample size (n_obs = 100), number covariates (n_covariates = 3), follows:","code":"pkonfound(2, .4, 100, 3, index = \"IT\") ## Impact Threshold for a Confounding Variable: ## The minimum impact of an omitted variable to invalidate an inference for ## a null hypothesis of 0 effect is based on a correlation of 0.568 with ## the outcome and at 0.568 with the predictor of interest (conditioning ## on observed covariates) based on a threshold of 0.201 for statistical ## significance (alpha = 0.05). ## ## Correspondingly the impact of an omitted variable (as defined in Frank ## 2000) must be 0.568 X 0.568 = 0.323 to invalidate an inference for a null ## hypothesis of 0 effect. See Frank (2000) for a description of the method. ## ## Citation: ## Frank, K. (2000). Impact of a confounding variable on the inference of a ## regression coefficient. Sociological Methods and Research, 29 (2), 147-194 ## For other forms of output, run ?pkonfound and inspect the to_return argument ## For models fit in R, consider use of konfound()."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"rir-example-for-a-regression-analysis","dir":"Articles","previous_headings":"Functionality > pkonfound","what":"RIR example for a regression analysis","title":"Introduction to konfound","text":"can also use inputs calculate output RIR index:","code":"pkonfound(2, .4, 100, 3, index = \"RIR\") ## Robustness of Inference to Replacement (RIR): ## To invalidate an inference, 60.29 % of the estimate would have to be ## due to bias. This is based on a threshold of 0.794 for statistical ## significance (alpha = 0.05). ## ## To invalidate an inference, 60 observations would have to be replaced ## with cases for which the effect is 0 (RIR = 60). ## ## See Frank et al. (2013) for a description of the method. ## ## Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). ## What would it take to change an inference? ## Using Rubin's causal model to interpret the robustness of causal inferences. ## Education, Evaluation and Policy Analysis, 35 437-460. ## For other forms of output, run ?pkonfound and inspect the to_return argument ## For models fit in R, consider use of konfound()."},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"doing-and-learning-more","dir":"Articles","previous_headings":"","what":"Doing and Learning More","title":"Introduction to konfound","text":"created website including Shiny interactive web application http://konfound-.com can applied linear models, 2x2 tables resulting corresponding treatment control success failure conditions, logistic regression models. also developing extensions sensitivity analysis techniques described paper, including preserving standard error (Frank et al. 2023) calculating coefficient proportionality (Frank et al. 2022) ITCV analyses. Functionality designs including mediation, hazard functions, differences difference, regression discontinuity also presently development. Additional documentation R package future extensions available http://konfound-.com website.","code":""},{"path":"https://konfound-it.org/konfound/articles/introduction-to-konfound.html","id":"acknowledgements","dir":"Articles","previous_headings":"","what":"Acknowledgements","title":"Introduction to konfound","text":"research reported supported Institute Education Sciences, U.S. Department Education, Grant R305D220022 Michigan State University. opinions expressed authors represent views Institute U.S. Department Education.","code":""},{"path":[]},{"path":"https://konfound-it.org/konfound/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Joshua M Rosenberg. Author, maintainer. Ran Xu. Contributor. Qinyun Lin. Contributor. Spiro Maroulis. Contributor. Sarah Narvaiz. Contributor. Kenneth Frank. Contributor. Wei Wang. Contributor. Yunhe Cui. Contributor. Gaofei Zhang. Contributor. Xuesen Cheng. Contributor. JiHoon Choi. Contributor. Guan Saw. Contributor.","code":""},{"path":"https://konfound-it.org/konfound/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Rosenberg JM (2024). konfound: Quantify Robustness Causal Inferences. R package version 1.0.2, https://konfound-.org/konfound/, https://github.com/konfound-project/konfound.","code":"@Manual{, title = {konfound: Quantify the Robustness of Causal Inferences}, author = {Joshua M Rosenberg}, year = {2024}, note = {R package version 1.0.2, https://konfound-it.org/konfound/}, url = {https://github.com/konfound-project/konfound}, }"},{"path":"https://konfound-it.org/konfound/index.html","id":"konfound","dir":"","previous_headings":"","what":"Quantify the Robustness of Causal Inferences","title":"Quantify the Robustness of Causal Inferences","text":"goal konfound carry sensitivity analysis help analysts quantify robust inferences potential sources bias. R package provides tools carry sensitivity analysis described Frank, Maroulis, Duong, Kelcey (2013) based Rubin’s (1974) causal model well Frank (2000) based impact threshold confounding variable.","code":""},{"path":"https://konfound-it.org/konfound/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Quantify the Robustness of Causal Inferences","text":"can install CRAN version konfound : can install development version GitHub :","code":"install.packages(\"konfound\") install.packages(\"devtools\") devtools::install_github(\"konfound-project/konfound\")"},{"path":[]},{"path":"https://konfound-it.org/konfound/index.html","id":"pkonfound-for-published-studies","dir":"","previous_headings":"","what":"pkonfound() for published studies","title":"Quantify the Robustness of Causal Inferences","text":"pkonfound(), published studies, calculates (1) much bias must estimate invalidate/sustain inference, interprets terms much data need replaced nullify inference (Robustness Inference Replacement, RIR); (2) impact omitted variable necessary invalidate/sustain inference regression coefficient (Impact Threshold Confounding Variable, ITCV). RIR reported default. ITCV can generated specifying index = \"\".","code":"library(konfound) #> Sensitivity analysis as described in Frank, #> Maroulis, Duong, and Kelcey (2013) and in #> Frank (2000). #> For more information visit http://konfound-it.com. pkonfound(est_eff = 2, std_err = .4, n_obs = 100, n_covariates = 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 60 #> #> To invalidate the inference of an effect using the threshold of 0.794 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 60.295% #> of the (2) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 60 (60.295%) #> observations with data points for which the effect is 0 (RIR = 60). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(est_eff = 2, std_err = .4, n_obs = 100, n_covariates = 3, index = \"IT\") #> Impact Threshold for a Confounding Variable (ITCV): #> #> The minimum impact of an omitted variable to invalidate an inference for #> a null hypothesis of an effect of nu (0) is based on a correlation of 0.566 #> with the outcome and 0.566 with the predictor of interest (conditioning #> on all observed covariates in the model; signs are interchangeable). This is #> based on a threshold effect of 0.2 for statistical significance (alpha = 0.05). #> #> Correspondingly the impact of an omitted variable (as defined in Frank 2000) must be #> 0.566 X 0.566 = 0.321 to invalidate an inference for a null hypothesis of an effect of nu (0). #> #> For calculation of unconditional ITCV using pkonfound(), additionally include #> the R2, sdx, and sdy as input, and request raw output. #> #> See Frank (2000) for a description of the method. #> #> Citation: #> Frank, K. (2000). Impact of a confounding variable on the inference of a #> regression coefficient. Sociological Methods and Research, 29 (2), 147-194 #> #> Accuracy of results increases with the number of decimals reported. #> #> The ITCV analysis was originally derived for OLS standard errors. If the #> standard errors reported in the table were not based on OLS, some caution #> should be used to interpret the ITCV. #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound()."},{"path":"https://konfound-it.org/konfound/index.html","id":"konfound-for-models-fit-in-r","dir":"","previous_headings":"","what":"konfound() for models fit in R","title":"Quantify the Robustness of Causal Inferences","text":"konfound() calculates robustness inferences models fit R. example, coefficients linear model fit lm() using built-dataset mtcars: Sensitivity analysis effect wt mpg can carried follows, specifying fitted model object: Similar pkonfound, ITCV can generated specifying index = \"\".","code":"m1 <- lm(mpg ~ wt + disp, data = mtcars) m1 #> #> Call: #> lm(formula = mpg ~ wt + disp, data = mtcars) #> #> Coefficients: #> (Intercept) wt disp #> 34.96055 -3.35083 -0.01772 summary(m1) #> #> Call: #> lm(formula = mpg ~ wt + disp, data = mtcars) #> #> Residuals: #> Min 1Q Median 3Q Max #> -3.4087 -2.3243 -0.7683 1.7721 6.3484 #> #> Coefficients: #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) 34.96055 2.16454 16.151 4.91e-16 *** #> wt -3.35082 1.16413 -2.878 0.00743 ** #> disp -0.01773 0.00919 -1.929 0.06362 . #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> Residual standard error: 2.917 on 29 degrees of freedom #> Multiple R-squared: 0.7809, Adjusted R-squared: 0.7658 #> F-statistic: 51.69 on 2 and 29 DF, p-value: 2.744e-10 konfound(m1, wt) #> Robustness of Inference to Replacement (RIR): #> RIR = 9 #> #> To invalidate the inference of an effect using the threshold of -2.381 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 28.946% #> of the (-3.351) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 9 (28.946%) #> observations with data points for which the effect is 0 (RIR = 9). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> NULL konfound(m1, wt, index = \"IT\") #> Impact Threshold for a Confounding Variable (ITCV): #> #> The minimum (in absolute value) impact of an omitted variable to invalidate #> an inference for a null hypothesis of an effect of nu (0) is based on #> a correlation of -0.425 with the outcome and 0.425 with the predictor of #> interest (conditioning on all observed covariates in the model; signs are #> interchangeable). This is based on a threshold effect of -0.355 for statistical #> significance (alpha = 0.05). #> #> Correspondingly the impact of an omitted variable (as defined in Frank 2000) must be #> -0.425 X 0.425 = -0.18 to invalidate an inference for a null hypothesis of an effect of nu (0). #> #> See Frank (2000) for a description of the method. #> #> Citation: #> Frank, K. (2000). Impact of a confounding variable on the inference of a #> regression coefficient. Sociological Methods and Research, 29 (2), 147-194 #> #> Accuracy of results increases with the number of decimals reported. #> #> The ITCV analysis was originally derived for OLS standard errors. If the #> standard errors reported in the table were not based on OLS, some caution #> should be used to interpret the ITCV. #> NULL"},{"path":"https://konfound-it.org/konfound/index.html","id":"mkonfound-for-meta-analyses-including-sensitivity-analysis","dir":"","previous_headings":"","what":"mkonfound for meta-analyses including sensitivity analysis","title":"Quantify the Robustness of Causal Inferences","text":"mkonfound() supports sensitivity can compared synthesized across multiple analyses. can use existing (built-) dataset, mkonfound_ex.","code":"mkonfound_ex #> # A tibble: 30 × 2 #> t df #> #> 1 7.08 178 #> 2 4.13 193 #> 3 1.89 47 #> 4 -4.17 138 #> 5 -1.19 97 #> 6 3.59 87 #> 7 0.282 117 #> 8 2.55 75 #> 9 -4.44 137 #> 10 -2.05 195 #> # ℹ 20 more rows mkonfound(mkonfound_ex, t, df) #> # A tibble: 30 × 7 #> t df action inference pct_bias_to_change_i…¹ itcv r_con #> #> 1 7.08 178 to_invalidate reject_null 68.8 0.378 0.614 #> 2 4.13 193 to_invalidate reject_null 50.6 0.168 0.41 #> 3 1.89 47 to_sustain fail_to_rejec… 5.47 -0.012 0.11 #> 4 -4.17 138 to_invalidate reject_null 50.3 0.202 0.449 #> 5 -1.19 97 to_sustain fail_to_rejec… 39.4 -0.065 0.255 #> 6 3.59 87 to_invalidate reject_null 41.9 0.19 0.436 #> 7 0.282 117 to_sustain fail_to_rejec… 85.5 -0.131 0.361 #> 8 2.55 75 to_invalidate reject_null 20.6 0.075 0.274 #> 9 -4.44 137 to_invalidate reject_null 53.0 0.225 0.475 #> 10 -2.05 195 to_invalidate reject_null 3.51 0.006 0.077 #> # ℹ 20 more rows #> # ℹ abbreviated name: ¹pct_bias_to_change_inference"},{"path":[]},{"path":"https://konfound-it.org/konfound/index.html","id":"how-to-learn-more-about-sensitivity-analysis","dir":"","previous_headings":"","what":"How to learn more about sensitivity analysis","title":"Quantify the Robustness of Causal Inferences","text":"learn sensitivity analysis, please visit: KonFound-website, latest news, links tools support Introduction konfound vignette, detailed information functions (pkonfound(), konfound(), mkounfound()) Konfound-! interactive web application, links PowerPoints key publications","code":""},{"path":"https://konfound-it.org/konfound/index.html","id":"issues-feature-requests-and-contributing","dir":"","previous_headings":"","what":"Issues, feature requests, and contributing","title":"Quantify the Robustness of Causal Inferences","text":"prefer issues filed via GitHub (link issues page konfound ) though also welcome questions feedback requests via email (see DESCRIPTION file). Contributing guidelines .","code":""},{"path":"https://konfound-it.org/konfound/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Quantify the Robustness of Causal Inferences","text":"Please note konfound project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://konfound-it.org/konfound/reference/binary_dummy_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Binary dummy data — binary_dummy_data","title":"Binary dummy data — binary_dummy_data","text":"data made-data use examples.","code":""},{"path":"https://konfound-it.org/konfound/reference/binary_dummy_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Binary dummy data — binary_dummy_data","text":"data.frame 107 rows 3 variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate delta star for sensitivity analysis — cal_delta_star","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"Calculate delta star sensitivity analysis","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"","code":"cal_delta_star( FR2max, R2, R2_uncond, est_eff, eff_thr, var_x, var_y, est_uncond, rxz, n_obs )"},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"FR2max maximum R2 R2 current R2 R2_uncond unconditional R2 est_eff estimated effect eff_thr effect threshold var_x variance X var_y variance Y est_uncond unconditional estimate rxz correlation coefficient X Z n_obs number observations","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_delta_star.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate delta star for sensitivity analysis — cal_delta_star","text":"delta star value","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"Calculate rxy based ryxGz, rxz, ryz","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"","code":"cal_rxy(ryxGz, rxz, ryz)"},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"ryxGz correlation coefficient Y X given Z rxz correlation coefficient X Z ryz correlation coefficient Y Z","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate rxy based on ryxGz, rxz, and ryz — cal_rxy","text":"rxy value","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate R2xz based on variances and standard error — cal_rxz","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"Calculate R2xz based variances standard error","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"","code":"cal_rxz(var_x, var_y, R2, df, std_err)"},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"var_x variance X var_y variance Y R2 coefficient determination df degrees freedom std_err standard error","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_rxz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate R2xz based on variances and standard error — cal_rxz","text":"R2xz value","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate R2yz based on ryxGz and R2 — cal_ryz","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"Calculate R2yz based ryxGz R2","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"","code":"cal_ryz(ryxGz, R2)"},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"ryxGz correlation coefficient Y X given Z R2 coefficient determination","code":""},{"path":"https://konfound-it.org/konfound/reference/cal_ryz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate R2yz based on ryxGz and R2 — cal_ryz","text":"R2yz value","code":""},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform a Chi-Square Test — chisq_p","title":"Perform a Chi-Square Test — chisq_p","text":"`chisq_p` calculates p-value chi-square test given contingency table.","code":""},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform a Chi-Square Test — chisq_p","text":"","code":"chisq_p(a, b, c, d)"},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform a Chi-Square Test — chisq_p","text":"Frequency count row 1, column 1. b Frequency count row 1, column 2. c Frequency count row 2, column 1. d Frequency count row 2, column 2.","code":""},{"path":"https://konfound-it.org/konfound/reference/chisq_p.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform a Chi-Square Test — chisq_p","text":"P-value chi-square test.","code":""},{"path":"https://konfound-it.org/konfound/reference/concord1.html","id":null,"dir":"Reference","previous_headings":"","what":"Concord1 data — concord1","title":"Concord1 data — concord1","text":"data Hamilton (1983)","code":""},{"path":"https://konfound-it.org/konfound/reference/concord1.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Concord1 data — concord1","text":"data.frame 496 rows 10 variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/concord1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Concord1 data — concord1","text":"Hamilton, Lawrence C. 1983. Saving water: causal model household conservation. Sociological Perspectives 26(4):355-374.","code":""},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"Extract Degrees Freedom Fixed Effects Linear Mixed-Effects Model","code":""},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"","code":"get_kr_df(model_object)"},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"model_object mixed-effects model object produced lme4::lmer.","code":""},{"path":"https://konfound-it.org/konfound/reference/get_kr_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Degrees of Freedom for Fixed Effects in a Linear Mixed-Effects Model — get_kr_df","text":"vector containing degrees freedom fixed effects model.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Various Model Types — konfound","title":"Konfound Analysis for Various Model Types — konfound","text":"Performs sensitivity analysis fitted models including linear models (`lm`), generalized linear models (`glm`), linear mixed-effects models (`lmerMod`). calculates amount bias required invalidate sustain inference,impact omitted variable necessary affect inference.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Various Model Types — konfound","text":"","code":"konfound( model_object, tested_variable, alpha = 0.05, tails = 2, index = \"RIR\", to_return = \"print\", two_by_two = FALSE, n_treat = NULL, switch_trm = TRUE, replace = \"control\" )"},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Various Model Types — konfound","text":"model_object model object produced `lm`, `glm`, `lme4::lmer`. tested_variable Variable associated coefficient tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return Type output return ('print', 'raw_output', 'table'). two_by_two Boolean; `TRUE`, uses 2x2 table approach `glm` dichotomous variables. n_treat Number treatment cases (used `two_by_two` `TRUE`). switch_trm Boolean; switch treatment control analysis. replace Replacement method treatment cases ('control' default).","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Various Model Types — konfound","text":"Depending `to_return`, prints result, returns raw output, summary table.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Konfound Analysis for Various Model Types — konfound","text":"","code":"# using lm() for linear models m1 <- lm(mpg ~ wt + hp, data = mtcars) konfound(m1, wt) #> Robustness of Inference to Replacement (RIR): #> RIR = 21 #> #> To invalidate the inference of an effect using the threshold of -1.294 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 66.629% #> of the (-3.878) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 21 (66.629%) #> observations with data points for which the effect is 0 (RIR = 21). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> NULL konfound(m1, wt, to_return = \"table\") #> Dependent variable is mpg #> For interpretation, check out to_return = 'print'. #> # A tibble: 3 × 6 #> term estimate std.error statistic p.value itcv #> #> 1 (Intercept) 37.2 1.60 23.3 0 NA #> 2 wt -3.88 0.633 -6.13 0 0.291 #> 3 hp -0.032 0.009 -3.52 0.001 0.511 # using glm() for non-linear models if (requireNamespace(\"forcats\")) { d <- forcats::gss_cat d$married <- ifelse(d$marital == \"Married\", 1, 0) m2 <- glm(married ~ age, data = d, family = binomial(link = \"logit\")) konfound(m2, age) } #> Note that if your model is a logistic regression, we recommend using the pkonfound command for logistic regression with manually entered parameter estimates and other quantities. #> Note that this is only an approximation. For exact results in terms of the number of cases that must be switched from treatment success to treatment failure to invalidate the inference see: https://msu.edu/~kenfrank/non%20linear%20replacement%20treatment.xlsm #> If a dichotomous independent variable is used, consider using the 2X2 table approach enabled with the argument two_by_two = TRUE #> Warning: Due to an issue with the margins and predictions package, these are the raw coefficients, not the average marginal effects; we will address this in future patches #> Robustness of Inference to Replacement (RIR): #> RIR = 17983 #> #> To invalidate the inference of an effect using the threshold of 0.002 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 84.006% #> of the (0.01) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 17983 (84.006%) #> observations with data points for which the effect is 0 (RIR = 17983). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> NULL # using lme4 for mixed effects (or multi-level) models if (requireNamespace(\"lme4\")) { library(lme4) m3 <- fm1 <- lme4::lmer(Reaction ~ Days + (1 | Subject), sleepstudy) konfound(m3, Days) } #> Loading required package: Matrix #> Robustness of Inference to Replacement (RIR): #> RIR = 137 #> #> To invalidate the inference of an effect using the threshold of 1.588 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 84.826% #> of the (10.467) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 137 (84.826%) #> observations with data points for which the effect is 0 (RIR = 137). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> Note that the Kenward-Roger approximation is used to #> estimate degrees of freedom for the predictor(s) of interest. #> We are presently working to add other methods for calculating #> the degrees of freedom for the predictor(s) of interest. #> If you wish to use other methods now, consider those detailed here: #> https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html #> #why-doesnt-lme4-display-denominator-degrees-of-freedomp-values-what-other-options-do-i-have. #> You can then enter degrees of freedom obtained from another method along with the coefficient, #> number of observations, and number of covariates to the pkonfound() function to quantify the robustness of the inference. #> NULL m4 <- glm(outcome ~ condition, data = binary_dummy_data, family = binomial(link = \"logit\")) konfound(m4, condition, two_by_two = TRUE, n_treat = 55) #> Robustness of Inference to Replacement (RIR): #> RIR = 15 #> Fragility = 10 #> #> The table implied by the parameter estimates and sample sizes you entered: #> User-entered Table: #> Fail Success Success_Rate #> Control 36 16 30.77% #> Treatment 18 37 67.27% #> Total 54 53 49.53% #> #> The reported log odds = 1.527, SE = 0.415, and p-value = 0.000. #> Values in the table have been rounded to the nearest integer. This may cause #> a small change to the estimated effect for the table. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.050), #> one would need to transfer 10 data points from treatment success to treatment failure (Fragility = 10). #> This is equivalent to replacing 15 (40.541%) treatment success data points with data points #> for which the probability of failure in the control group (69.231%) applies (RIR = 15). #> #> Note that RIR = Fragility/P(destination) #> #> The transfer of 10 data points yields the following table: #> Transfer Table: #> Fail Success Success_Rate #> Control 36 16 30.77% #> Treatment 28 27 49.09% #> Total 64 43 40.19% #> #> The log odds (estimated effect) = 0.775, SE = 0.404, p-value = 0.058. #> This is based on t = estimated effect/standard error #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> Accuracy of results increases with the number of decimals entered. #> NULL"},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Generalized Linear Models — konfound_glm","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"function performs konfound analysis generalized linear model object. uses 'broom' tidy model outputs calculates sensitivity inferences. supports analysis single variable multiple variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"","code":"konfound_glm( model_object, tested_variable_string, alpha, tails, index = \"RIR\", to_return )"},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"model_object model object produced glm. tested_variable_string name variable tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return type output return.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Generalized Linear Models — konfound_glm","text":"results konfound analysis specified variable(s).","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"function performs konfound analysis generalized linear model object dichotomous outcome. uses 'broom' tidy model outputs calculates sensitivity inferences.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"","code":"konfound_glm_dichotomous( model_object, tested_variable_string, alpha, tails, to_return, n_treat, switch_trm, replace )"},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"model_object model object produced glm. tested_variable_string name variable tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). to_return type output return. n_treat Number treatment cases. switch_trm Term switch sensitivity analysis. replace Boolean indicating whether replace cases .","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_glm_dichotomous.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Generalized Linear Models with Dichotomous Outcomes — konfound_glm_dichotomous","text":"results konfound analysis.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Linear Models — konfound_lm","title":"Konfound Analysis for Linear Models — konfound_lm","text":"function performs konfound analysis linear model object produced lm. calculates sensitivity inferences coefficients model. supports analysis single variable multiple variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Linear Models — konfound_lm","text":"","code":"konfound_lm( model_object, tested_variable_string, alpha, tails, index, to_return )"},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Linear Models — konfound_lm","text":"model_object linear model object produced lm. tested_variable_string name variable tested. alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return type output return.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Linear Models — konfound_lm","text":"results konfound analysis specified variable(s).","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":null,"dir":"Reference","previous_headings":"","what":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"function performs konfound analysis linear mixed-effects model object produced lme4::lmer. calculates sensitivity inferences fixed effects model. supports analysis single variable multiple variables.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"","code":"konfound_lmer( model_object, tested_variable_string, test_all, alpha, tails, index, to_return )"},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"model_object mixed-effects model object produced lme4::lmer. tested_variable_string name fixed effect tested. test_all Boolean indicating whether test fixed effects . alpha Significance level hypothesis testing. tails Number tails test (1 2). index Type sensitivity analysis ('RIR' default). to_return type output return.","code":""},{"path":"https://konfound-it.org/konfound/reference/konfound_lmer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Konfound Analysis for Linear Mixed-Effects Models — konfound_lmer","text":"results konfound analysis specified fixed effect(s).","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"Performs sensitivity analysis multiple models, parameters stored data frame. calculates amount bias required invalidate sustain inference case data frame.","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"","code":"mkonfound(d, t, df, alpha = 0.05, tails = 2, return_plot = FALSE)"},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"d data frame tibble containing t-statistics associated degrees freedom. t Column name vector t-statistics. df Column name vector degrees freedom associated t-statistics. alpha Significance level hypothesis testing. tails Number tails test (1 2). return_plot Whether return plot percent bias (default `FALSE`).","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"Depending `return_plot`, either returns data frame analysis results plot.","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Meta-Analysis and Sensitivity Analysis for Multiple Studies — mkonfound","text":"","code":"if (FALSE) { # \\dontrun{ mkonfound_ex str(d) mkonfound(mkonfound_ex, t, df) } # }"},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":null,"dir":"Reference","previous_headings":"","what":"Example data for the mkonfound function — mkonfound_ex","title":"Example data for the mkonfound function — mkonfound_ex","text":"dataset containing t df values example studies Educational Evaluation Policy Analysis (detailed Frank et al., 2013): https://drive.google.com/file/d/1aGhxGjvMvEPVAgOA8rrxvA97uUO5TTMe/view","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example data for the mkonfound function — mkonfound_ex","text":"","code":"mkonfound_ex"},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example data for the mkonfound function — mkonfound_ex","text":"data frame 30 rows 2 variables: t t value df degrees freedom associated t value","code":""},{"path":"https://konfound-it.org/konfound/reference/mkonfound_ex.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example data for the mkonfound function — mkonfound_ex","text":"https://drive.google.com/file/d/1aGhxGjvMvEPVAgOA8rrxvA97uUO5TTMe/view","code":""},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Output data frame based on model estimates and thresholds — output_df","title":"Output data frame based on model estimates and thresholds — output_df","text":"Output data frame based model estimates thresholds","code":""},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output data frame based on model estimates and thresholds — output_df","text":"","code":"output_df( est_eff, beta_threshhold, unstd_beta, bias = NULL, sustain = NULL, recase, obs_r, critical_r, r_con, itcv, non_linear )"},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output data frame based on model estimates and thresholds — output_df","text":"est_eff estimated effect beta_threshhold threshold beta unstd_beta unstandardized beta value bias bias change inference sustain sustain change inference recase number cases replace null obs_r observed correlation critical_r critical correlation r_con correlation omitted variable itcv inferential threshold confounding variable non_linear flag non-linear models","code":""},{"path":"https://konfound-it.org/konfound/reference/output_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output data frame based on model estimates and thresholds — output_df","text":"data frame model information","code":""},{"path":"https://konfound-it.org/konfound/reference/output_print.html","id":null,"dir":"Reference","previous_headings":"","what":"Output printed text with formatting — output_print","title":"Output printed text with formatting — output_print","text":"function outputs printed text various indices RIR (Robustness Inference Replacement) (Impact Threshold Confounding Variable) specific formatting like bold, underline, italic using functions crayon package. handles different scenarios based effect difference, beta threshold, parameters, providing formatted output case.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_print.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output printed text with formatting — output_print","text":"","code":"output_print( n_covariates, est_eff, beta_threshhold, bias = NULL, sustain = NULL, nu, eff_thr, recase, obs_r, critical_r, r_con, itcv, alpha, index, far_bound, sdx = NA, sdy = NA, R2 = NA, rxcv = NA, rycv = NA )"},{"path":"https://konfound-it.org/konfound/reference/output_print.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output printed text with formatting — output_print","text":"n_covariates number covariates. est_eff estimated effect. beta_threshhold threshold value beta, used statistical significance determination. bias percentage estimate due bias (optional). sustain percentage estimate necessary sustain inference (optional). nu hypothesized effect size used replacement analysis. eff_thr Threshold estimated effect. recase number cases need replaced change inference. obs_r observed correlation coefficient data. critical_r critical correlation coefficient statistical significance. r_con correlation coefficient omitted variable outcome predictor. itcv impact threshold confounding variable. alpha level statistical significance. index character string indicating index output generated ('RIR' ''). far_bound Indicator whether threshold towards side nu 0, default zero (side), alternative one (side). sdx Standard deviation x. sdy Standard deviation y. R2 unadjusted, original R2 observed function. rxcv correlation x CV. rycv correlation y CV.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Output a Tidy Table from a Model Object — output_table","title":"Output a Tidy Table from a Model Object — output_table","text":"function takes model object tested variable, tidies model output using `broom::tidy`, calculates impact threshold confounding variables (ITCV) impact covariate,returns rounded, tidy table model outputs.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output a Tidy Table from a Model Object — output_table","text":"","code":"output_table(model_object, tested_variable)"},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output a Tidy Table from a Model Object — output_table","text":"model_object model object generate output. tested_variable variable tested model.","code":""},{"path":"https://konfound-it.org/konfound/reference/output_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output a Tidy Table from a Model Object — output_table","text":"tidy data frame containing model outputs, ITCV, impacts covariates.","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform sensitivity analysis for published studies — pkonfound","title":"Perform sensitivity analysis for published studies — pkonfound","text":"published studies, command calculates (1) much bias must estimate invalidate/sustain inference; (2) impact omitted variable necessary invalidate/sustain inference regression coefficient.","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform sensitivity analysis for published studies — pkonfound","text":"","code":"pkonfound( est_eff, std_err, n_obs, n_covariates = 1, alpha = 0.05, tails = 2, index = \"RIR\", nu = 0, n_treat = NULL, switch_trm = TRUE, model_type = \"ols\", a = NULL, b = NULL, c = NULL, d = NULL, two_by_two_table = NULL, test = \"fisher\", replace = \"control\", sdx = NA, sdy = NA, R2 = NA, far_bound = 0, eff_thr = NA, FR2max = 0, FR2max_multiplier = 1.3, to_return = \"print\" )"},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform sensitivity analysis for published studies — pkonfound","text":"est_eff estimated effect (unstandardized beta coefficient group mean difference) std_err standard error estimate unstandardized regression coefficient n_obs number observations sample n_covariates number covariates regression model alpha probability rejecting null hypothesis (defaults 0.05) tails integer whether hypothesis testing one-tailed (1) two-tailed (2; defaults 2) index whether output RIR (impact threshold); defaults \"RIR\" nu hypothesis tested; defaults testing whether est_eff significantly different 0 n_treat number cases associated treatment condition; applicable model_type = \"logistic\" switch_trm whether switch treatment control cases; defaults FALSE; applicable model_type = \"logistic\" model_type type model estimated; defaults \"ols\" linear regression model; option \"logistic\" cell number cases control group showing unsuccessful results b cell number cases control group showing successful results c cell number cases treatment group showing unsuccessful results d cell number cases treatment group showing successful results two_by_two_table table matrix can coerced one (data.frame, tibble, tribble) , b, c, d arguments can extracted test whether using Fisher's Exact Test chi-square test; defaults Fisher's Exact Test replace whether using entire sample control group calculate base rate; default control sdx standard deviation X sdy standard deviation Y R2 unadjusted, original R2 observed function far_bound whether estimated effect moved boundary closer (default 0) away (1); eff_thr RIR: unstandardized coefficient threshold change inference; : correlation defining threshold inference FR2max largest R2, R2max, final model unobserved confounder FR2max_multiplier multiplier R2 get R2max, default set 1.3 to_return whether return data.frame (specifying argument equal \"raw_output\" use analyses) plot (\"plot\"); default print (\"print\") output console; can specify vector output return","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform sensitivity analysis for published studies — pkonfound","text":"pkonfound prints bias number cases replaced cases effect nullify inference. to_return = \"raw_output,\" list given following components: obs_r correlation predictor interest (X) outcome (Y) sample data. act_r correlation predictor interest (X) outcome (Y) sample regression based t-ratio accounting non-zero null hypothesis. critical_r critical correlation value inference nullified (e.g., associated p=.05). r_final final correlation value given CV. equal critical_r. rxcv correlation predictor interest (X) CV necessary nullify inference smallest impact. rycv correlation outcome (Y) CV necessary nullify inference smallest impact. rxcvGz correlation predictor interest CV necessary nullify inference smallest impact conditioning observed covariates (given z). rycvGz correlation outcome CV necessary nullify inference smallest impact conditioning observed covariates (given z). itcvGz ITCV conditioning observed covariates. itcv Unconditional ITCV. r2xz R2 using observed covariates explain predictor interest (X). r2yz R2 using observed covariates explain outcome (Y). delta_star delta calculated using Oster's unrestricted estimator. delta_star_restricted delta calculated using Oster's restricted estimator. delta_exact correlation-based delta. delta_pctbias percent bias comparing delta_star delta_exact. cor_oster correlation matrix implied delta_star. cor_exact correlation matrix implied delta_exact. beta_threshold threshold value estimated effect. beta_threshold_verify estimated effect given RIR. equal beta_threshold. perc_bias_to_change percent bias change inference. RIR_primary Robustness Inference Replacement (RIR). RIR_supplemental RIR extra row column needed nullify inference. RIR_perc RIR % total sample (linear regression) % data points cell replacement takes place (logistic 2 2 table). fragility_primary Fragility. number switches (e.g., treatment success treatment failure) nullify inference. fragility_supplemental Fragility extra row column needed nullify inference. starting_table Observed 2 2 table replacement switching. Implied table logistic regression. final_table 2 2 table replacement switching. user_SE user entered standard error. applicable logistic regression. needtworows whether double row switches needed. analysis_SE standard error used generate plausible 2 2 table. applicable logistic regression. Fig_ITCV figure ITCV. Fig_RIR figure RIR.","code":""},{"path":"https://konfound-it.org/konfound/reference/pkonfound.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform sensitivity analysis for published studies — pkonfound","text":"","code":"# using pkonfound for linear models pkonfound(2, .4, 100, 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 60 #> #> To invalidate the inference of an effect using the threshold of 0.794 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 60.295% #> of the (2) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 60 (60.295%) #> observations with data points for which the effect is 0 (RIR = 60). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(-2.2, .65, 200, 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 83 #> #> To invalidate the inference of an effect using the threshold of -1.282 for #> statistical significance (with null hypothesis = 0 and alpha = 0.05), 41.73% #> of the (-2.2) estimate would have to be due to bias. This implies that to #> invalidate the inference one would expect to have to replace 83 (41.73%) #> observations with data points for which the effect is 0 (RIR = 83). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(.5, 3, 200, 3) #> Robustness of Inference to Replacement (RIR): #> RIR = 183 #> #> The estimated effect is 0.5. The threshold value for statistical significance #> is 5.917 (with null hypothesis = 0 and alpha = 0.05). To reach that threshold, #> 91.549% of the (0.5) estimate would have to be due to bias. This implies to sustain #> an inference one would expect to have to replace 183 (91.549%) observations with #> effect of 0 with data points with effect of 5.917 (RIR = 183). #> #> See Frank et al. (2013) for a description of the method. #> #> Citation: Frank, K.A., Maroulis, S., Duong, M., and Kelcey, B. (2013). #> What would it take to change an inference? #> Using Rubin's causal model to interpret the robustness of causal inferences. #> Education, Evaluation and Policy Analysis, 35 437-460. #> #> Accuracy of results increases with the number of decimals reported. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(-0.2, 0.103, 20888, 3, n_treat = 17888, model_type = \"logistic\") #> Robustness of Inference to Replacement (RIR): #> RIR = 2 #> Fragility = 1 #> #> The table implied by the parameter estimates and sample sizes you entered: #> User-entered Table: #> Fail Success Success_Rate #> Control 2882 118 3.93% #> Treatment 17308 580 3.24% #> Total 20190 698 3.34% #> #> The reported log odds = -0.200, SE = 0.103, and p-value = 0.052. #> Values in the table have been rounded to the nearest integer. This may cause #> a small change to the estimated effect for the table. #> #> To sustain an inference that the effect is different from 0 (alpha = 0.050), #> one would need to transfer 1 data points from treatment success to treatment failure (Fragility = 1). #> This is equivalent to replacing 2 (0.345%) treatment success data points with data points #> for which the probability of failure in the control group (96.067%) applies (RIR = 2). #> #> Note that RIR = Fragility/P(destination) #> #> The transfer of 1 data points yields the following table: #> Transfer Table: #> Fail Success Success_Rate #> Control 2882 118 3.93% #> Treatment 17309 579 3.24% #> Total 20191 697 3.34% #> #> The log odds (estimated effect) = -0.202, SE = 0.103, p-value = 0.050. #> This is based on t = estimated effect/standard error #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> Accuracy of results increases with the number of decimals entered. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(2, .4, 100, 3, to_return = \"thresh_plot\") pkonfound(2, .4, 100, 3, to_return = \"corr_plot\") # using pkonfound for a 2x2 table pkonfound(a = 35, b = 17, c = 17, d = 38) #> Robustness of Inference to Replacement (RIR): #> RIR = 14 #> Fragility = 9 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.05), #> one would need to transfer 9 data points from treatment success to treatment failure as shown, #> from the User-entered Table to the Transfer Table (Fragility = 9). #> This is equivalent to replacing 14 (36.842%) treatment success data points with data points #> for which the probability of failure in the control group (67.308%) applies (RIR = 14). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the estimated odds ratio is 4.530, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the estimated odds ratio is 2.278, with p-value of 0.051: #> Transfer Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 26 29 52.73% #> Total 61 46 42.99% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(a = 35, b = 17, c = 17, d = 38, alpha = 0.01) #> Robustness of Inference to Replacement (RIR): #> RIR = 9 #> Fragility = 6 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.01), #> one would need to transfer 6 data points from treatment success to treatment failure as shown, #> from the User-entered Table to the Transfer Table (Fragility = 6). #> This is equivalent to replacing 9 (23.684%) treatment success data points with data points #> for which the probability of failure in the control group (67.308%) applies (RIR = 9). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the estimated odds ratio is 4.530, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the estimated odds ratio is 2.835, with p-value of 0.011: #> Transfer Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 23 32 58.18% #> Total 58 49 45.79% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(a = 35, b = 17, c = 17, d = 38, alpha = 0.01, switch_trm = FALSE) #> Robustness of Inference to Replacement (RIR): #> RIR = 19 #> Fragility = 6 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.01), #> one would need to transfer 6 data points from control failure to control success as shown, #> from the User-entered Table to the Transfer Table (Fragility = 6). #> This is equivalent to replacing 19 (54.286%) control failure data points with data points #> for which the probability of success in the control group (32.692%) applies (RIR = 19). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the estimated odds ratio is 4.530, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the estimated odds ratio is 2.790, with p-value of 0.012: #> Transfer Table: #> Fail Success Success_Rate #> Control 29 23 44.23% #> Treatment 17 38 69.09% #> Total 46 61 57.01% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). pkonfound(a = 35, b = 17, c = 17, d = 38, test = \"chisq\") #> Robustness of Inference to Replacement (RIR): #> RIR = 15 #> Fragility = 10 #> #> This function calculates the number of data points that would have to be replaced with #> zero effect data points (RIR) to invalidate the inference made about the association #> between the rows and columns in a 2x2 table. #> One can also interpret this as switches (Fragility) from one cell to another, such as from the #> treatment success cell to the treatment failure cell. #> #> To invalidate the inference that the effect is different from 0 (alpha = 0.05), #> one would need to transfer 10 data points from treatment success to treatment failure as shown, #> from the User-entered Table to the Transfer Table (Fragility = 10). #> This is equivalent to replacing 15 (39.474%) treatment success data points with data points #> for which the probability of failure in the control group (67.308%) applies (RIR = 15). #> #> RIR = Fragility/P(destination) #> #> For the User-entered Table, the Pearson's chi square is 14.176, with p-value of 0.000: #> User-entered Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 17 38 69.09% #> Total 52 55 51.40% #> #> For the Transfer Table, the Pearson's chi square is 3.640, with p-value of 0.056: #> Transfer Table: #> Fail Success Success_Rate #> Control 35 17 32.69% #> Treatment 27 28 50.91% #> Total 62 45 42.06% #> #> See Frank et al. (2021) for a description of the methods. #> #> *Frank, K. A., *Lin, Q., *Maroulis, S., *Mueller, A. S., Xu, R., Rosenberg, J. M., ... & Zhang, L. (2021). #> Hypothetical case replacement can be used to quantify the robustness of trial results. Journal of Clinical #> Epidemiology, 134, 150-159. #> *authors are listed alphabetically. #> #> For other forms of output, run #> ?pkonfound and inspect the to_return argument #> For models fit in R, consider use of konfound(). # use pkonfound to calculate delta* and delta_exact pkonfound(est_eff = .4, std_err = .1, n_obs = 290, sdx = 2, sdy = 6, R2 = .7, eff_thr = 0, FR2max = .8, index = \"COP\", to_return = \"raw_output\") #> $`delta*` #> [1] 3.668243 #> #> $`delta*restricted` #> [1] 4.085172 #> #> $delta_exact #> [1] 1.508536 #> #> $delta_pctbias #> [1] 143.1658 #> #> $cor_oster #> Y X Z CV #> Y 1.0000000 0.3266139 0.8266047 0.2579193 #> X 0.3266139 1.0000000 0.2433792 0.8659296 #> Z 0.8266047 0.2433792 1.0000000 0.0000000 #> CV 0.2579193 0.8659296 0.0000000 1.0000000 #> #> $cor_exact #> Y X Z CV #> Y 1.0000000 0.3266139 0.8266047 0.3416500 #> X 0.3266139 1.0000000 0.2433792 0.3671463 #> Z 0.8266047 0.2433792 1.0000000 0.0000000 #> CV 0.3416500 0.3671463 0.0000000 1.0000000 #> #> $`var(Y)` #> [1] 36 #> #> $`var(X)` #> [1] 4 #> #> $`var(CV)` #> [1] 1 #> #> $Table #> M1:X M2:X,Z M3(delta_exact):X,Z,CV M3(delta*):X,Z,CV #> R2 0.1097571 0.7008711 8.006897e-01 0.8006897 #> coef_X 0.9798418 0.3980344 -1.114065e-16 -1.5383085 #> SE_X 0.1665047 0.0995086 8.775619e-02 0.1803006 #> std_coef_X 0.3266139 0.2297940 0.000000e+00 -0.5127695 #> t_X 5.8847685 4.0000000 -1.269500e-15 -8.5319081 #> coef_CV NA NA 2.049900e+00 4.2116492 #> SE_CV NA NA 1.702349e-01 0.3497584 #> t_CV NA NA 1.204159e+01 12.0415946 #> #> $Figure #> Warning: Use of `figTable$coef_X` is discouraged. #> ℹ Use `coef_X` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> Warning: Use of `figTable$coef_X` is discouraged. #> ℹ Use `coef_X` instead. #> Warning: Use of `figTable$ModelLabel` is discouraged. #> ℹ Use `ModelLabel` instead. #> #> $`conditional RIR pi (fixed y)` #> [1] 0.4842727 #> #> $`conditional RIR (fixed y)` #> [1] 140.4391 #> #> $`conditional RIR pi (null)` #> [1] 0.2818584 #> #> $`conditional RIR (null)` #> [1] 81.73894 #> #> $`conditional RIR pi (rxyGz)` #> [1] 0.4977821 #> #> $`conditional RIR (rxyGz)` #> [1] 144.3568 #> # use pkonfound to calculate rxcv and rycv when preserving standard error pkonfound(est_eff = .5, std_err = .056, n_obs = 6174, eff_thr = .1, sdx = 0.22, sdy = 1, R2 = .3, index = \"PSE\", to_return = \"raw_output\") #> $`correlation between X and CV conditional on Z` #> [1] 0.2479732 #> #> $`correlation between Y and CV conditional on Z` #> [1] 0.3721927 #> #> $`correlation between X and CV` #> [1] 0.2143707 #> #> $`correlation between Y and CV` #> [1] 0.313404 #> #> $`covariance matrix` #> Y X Z CV #> Y 1.00000000 0.07773579 0.5394031 0.31340398 #> X 0.07773579 0.04840000 0.1105826 0.04716155 #> Z 0.53940306 0.11058258 1.0000000 0.00000000 #> CV 0.31340398 0.04716155 0.0000000 1.00000000 #> #> $Table #> M1:X M2:X,Z M3:X,Z,CV #> R2 0.12499409 0.30011338 0.38959867 #> coef_X 1.60611143 0.50004052 0.09740386 #> SE_X 0.05411712 0.05598639 0.05397058 #> std_coef_X 0.35334452 0.11294102 0.02142885 #> t_X 29.67843530 8.93146515 1.80475837 #> coef_Z NA 0.48410729 0.52863189 #> SE_Z NA 0.01231701 0.01159750 #> t_Z NA 39.30397315 45.58155174 #> coef_CV NA NA 0.30881026 #> SE_CV NA NA 0.01026456 #> t_CV NA NA 30.08509668 #>"},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Correlation Diagram — plot_correlation","title":"Plot Correlation Diagram — plot_correlation","text":"function creates plot illustrate correlation different variables,specifically focusing confounding variable, predictor interest, outcome.uses ggplot2 graphical representation.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Correlation Diagram — plot_correlation","text":"","code":"plot_correlation(r_con, obs_r, critical_r)"},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Correlation Diagram — plot_correlation","text":"r_con Correlation coefficient related confounding variable. obs_r Observed correlation coefficient. critical_r Critical correlation coefficient decision-making.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_correlation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Correlation Diagram — plot_correlation","text":"ggplot object representing correlation diagram.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Effect Threshold Diagram — plot_threshold","title":"Plot Effect Threshold Diagram — plot_threshold","text":"function creates plot illustrate threshold effect estimate relation specified beta threshold. uses ggplot2 graphical representation.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Effect Threshold Diagram — plot_threshold","text":"","code":"plot_threshold(beta_threshold, est_eff)"},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Effect Threshold Diagram — plot_threshold","text":"beta_threshold threshold value effect. est_eff estimated effect size.","code":""},{"path":"https://konfound-it.org/konfound/reference/plot_threshold.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Effect Threshold Diagram — plot_threshold","text":"ggplot object representing effect threshold diagram.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"function performs sensitivity analysis 2x2 contingency table. calculates number cases need replaced invalidate sustain statistical inference. function also allows switching treatment success failure control success failure based provided parameters.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"","code":"tkonfound( a, b, c, d, alpha = 0.05, switch_trm = TRUE, test = \"fisher\", replace = \"control\", to_return = to_return )"},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"Number unsuccessful cases control group. b Number successful cases control group. c Number unsuccessful cases treatment group. d Number successful cases treatment group. alpha Significance level statistical test, default 0.05. switch_trm Boolean indicating whether switch treatment row cells, default TRUE. test Type statistical test use, either \"fisher\" (default) \"chisq\". replace Indicates whether use entire sample control group base rate calculation, default \"control\". to_return Type output return, either \"raw_output\" \"print\".","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform Sensitivity Analysis on 2x2 Tables — tkonfound","text":"Returns detailed information sensitivity analysis, including number cases replaced (RIR), user-entered table, transfer table, conclusions.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"function generates plots illustrating change effect size influenced switching replacing outcomes 2x2 table. produces two plots: one showing possibilities (switching) another zoomed area positive RIR (Relative Impact Ratio).","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"","code":"tkonfound_fig( a, b, c, d, thr_p = 0.05, switch_trm = TRUE, test = \"fisher\", replace = \"control\" )"},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"Number cases control group unsuccessful outcomes. b Number cases control group successful outcomes. c Number cases treatment group unsuccessful outcomes. d Number cases treatment group successful outcomes. thr_p P-value threshold statistical significance, default 0.05. switch_trm Whether switch two cells treatment control row, default TRUE (treatment row). test Type statistical test used, either \"Fisher's Exact Test\" (default) \"Chi-square test\". replace Indicates whether use entire sample just control group calculating base rate, default \"control\".","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"Returns two plots showing effect hypothetical case switches effect size 2x2 table.","code":""},{"path":"https://konfound-it.org/konfound/reference/tkonfound_fig.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Draw Figures for Change in Effect Size in 2x2 Tables — tkonfound_fig","text":"","code":"tkonfound_fig(14, 17, 6, 25, test = \"chisq\") #> [[1]] #> Warning: Use of `meta$pdif` is discouraged. #> ℹ Use `pdif` instead. #> Warning: Use of `meta$RIR` is discouraged. #> ℹ Use `RIR` instead. #> Warning: Use of `meta$pdif` is discouraged. #> ℹ Use `pdif` instead. #> Warning: Use of `meta$current` is discouraged. #> ℹ Use `current` instead. #> Warning: Use of `meta$sigpoint` is discouraged. #> ℹ Use `sigpoint` instead. #> Warning: Use of `meta$RIR` is discouraged. #> ℹ Use `RIR` instead. #> Warning: Use of `meta$currentlabel` is discouraged. #> ℹ Use `currentlabel` instead. #> Warning: Use of `meta$RIR` is discouraged. #> ℹ Use `RIR` instead. #> Warning: Use of `meta$pdif` is discouraged. #> ℹ Use `pdif` instead. #> Warning: Removed 58 rows containing missing values or values outside the scale range #> (`geom_label_repel()`). #> #> [[2]] #> [1] \"A bend in line indicates switches from the control \\n row because the treatment row was exhausted.\" #> #> [[3]] #> Warning: Removed 11 rows containing missing values or values outside the scale range #> (`geom_label_repel()`). #>"},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify regression model with control variable Z — verify_reg_Gzcv","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"Verify regression model control variable Z","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"","code":"verify_reg_Gzcv(n_obs, sdx, sdy, sdz, sdcv, rxy, rxz, rzy, rcvy, rcvx, rcvz)"},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"n_obs number observations sdx standard deviation X sdy standard deviation Y sdz standard deviation Z sdcv sd C V rxy correlation coefficient X Y rxz correlation coefficient X Z rzy correlation coefficient Z Y rcvy correlation coefficient V Y rcvx correlation coefficient V X rcvz correlation coefficient V Z","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_Gzcv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify regression model with control variable Z — verify_reg_Gzcv","text":"list model parameters","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify unconditional regression model — verify_reg_uncond","title":"Verify unconditional regression model — verify_reg_uncond","text":"Verify unconditional regression model","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify unconditional regression model — verify_reg_uncond","text":"","code":"verify_reg_uncond(n_obs, sdx, sdy, rxy)"},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify unconditional regression model — verify_reg_uncond","text":"n_obs number observations sdx standard deviation X sdy standard deviation Y rxy correlation coefficient X Y","code":""},{"path":"https://konfound-it.org/konfound/reference/verify_reg_uncond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify unconditional regression model — verify_reg_uncond","text":"list model parameters","code":""},{"path":"https://konfound-it.org/konfound/reference/zzz.html","id":null,"dir":"Reference","previous_headings":"","what":"Package Initialization Functions and Utilities — zzz","title":"Package Initialization Functions and Utilities — zzz","text":"functions used initializing package environment providing utility functions package.","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-102","dir":"Changelog","previous_headings":"","what":"konfound 1.0.2","title":"konfound 1.0.2","text":"CRAN release: 2024-10-17 edits README vignette small edit DESCRIPTION","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-101","dir":"Changelog","previous_headings":"","what":"konfound 1.0.1","title":"konfound 1.0.1","text":"CRAN release: 2024-10-07 minor edits advance CRAN submit","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-100","dir":"Changelog","previous_headings":"","what":"konfound 1.0.0","title":"konfound 1.0.0","text":"Includes option specify non-zero null hypotheses Includes option directly specify threshold inference Improved output statements Includes full raw results RIR ITCV Calculation unconditional ITCV possible","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-051","dir":"Changelog","previous_headings":"","what":"konfound 0.5.1","title":"konfound 0.5.1","text":"CRAN release: 2024-04-12 minor patch CRAN","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-050","dir":"Changelog","previous_headings":"","what":"konfound 0.5.0","title":"konfound 0.5.0","text":"CRAN release: 2024-03-18 improved testing suite removal test_all = TRUE deal high cyclomatic complexity improvement coding style consistent accordance good practice","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-040","dir":"Changelog","previous_headings":"","what":"konfound 0.4.0","title":"konfound 0.4.0","text":"CRAN release: 2021-06-01 major updates advance initial submission R Journal","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-031","dir":"Changelog","previous_headings":"","what":"konfound 0.3.1","title":"konfound 0.3.1","text":"address minor bug introduced index argument","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-030","dir":"Changelog","previous_headings":"","what":"konfound 0.3.0","title":"konfound 0.3.0","text":"CRAN release: 2020-12-17 integrate non-linear functions tkonfound() pkonfound() konfound()","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-021","dir":"Changelog","previous_headings":"","what":"konfound 0.2.1","title":"konfound 0.2.1","text":"CRAN release: 2020-02-26 Refinements bug fixes non-linear functions","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-020","dir":"Changelog","previous_headings":"","what":"konfound 0.2.0","title":"konfound 0.2.0","text":"Update non-linear functions.","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-012","dir":"Changelog","previous_headings":"","what":"konfound 0.1.2","title":"konfound 0.1.2","text":"CRAN release: 2019-04-12 Thanks J. Murphy pointing bug mkonfound works lme4 output, bug code konfound-lm related message displayed coefficients tested, suggesting add name variable data frame returned variables tested","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-011","dir":"Changelog","previous_headings":"","what":"konfound 0.1.1","title":"konfound 0.1.1","text":"CRAN release: 2019-01-21 Update license include names","code":""},{"path":"https://konfound-it.org/konfound/news/index.html","id":"konfound-010","dir":"Changelog","previous_headings":"","what":"konfound 0.1.0","title":"konfound 0.1.0","text":"CRAN release: 2018-04-06 Added NEWS.md file track changes package.","code":""}]
vignettes/introduction-to-konfound.Rmd
introduction-to-konfound.Rmd
Rosenberg JM (2024). konfound: Quantify the Robustness of Causal Inferences. -R package version 1.0.1, https://konfound-it.org/konfound/, https://github.com/konfound-project/konfound. +R package version 1.0.2, https://konfound-it.org/konfound/, https://github.com/konfound-project/konfound.
@Manual{, title = {konfound: Quantify the Robustness of Causal Inferences}, author = {Joshua M Rosenberg}, year = {2024}, - note = {R package version 1.0.1, https://konfound-it.org/konfound/}, + note = {R package version 1.0.2, https://konfound-it.org/konfound/}, url = {https://github.com/konfound-project/konfound}, }
NEWS.md
CRAN release: 2024-10-17
CRAN release: 2024-10-07