Package: doseSens 1.0.0

doseSens: Conduct Sensitivity Analysis with Continuous Exposures and Binary or Continuous Outcomes

Performs sensitivity analysis for the sharp null, attributable effects, and weak nulls in matched studies with continuous exposures and binary or continuous outcomes as described in Zhang, Small, Heng (2024) <doi:10.48550/arXiv.2401.06909> and Zhang, Heng (2024) <doi:10.48550/arXiv.2409.12848>. Two of the functions require installation of the 'Gurobi' optimizer. Please see <https://docs.gurobi.com/current/#refman/ins_the_r_package.html> for guidance.

Authors:Jeffrey Zhang [aut, cre]

doseSens_1.0.0.tar.gz
doseSens_1.0.0.zip(r-4.7-any)doseSens_1.0.0.zip(r-4.6-any)doseSens_1.0.0.zip(r-4.5-any)
doseSens_1.0.0.tgz(r-4.6-any)doseSens_1.0.0.tgz(r-4.5-any)
doseSens_1.0.0.tar.gz(r-4.7-any)doseSens_1.0.0.tar.gz(r-4.6-any)
doseSens_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
doseSens/json (API)

# Install 'doseSens' in R:
install.packages('doseSens', repos = c('https://jzhang1937.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jzhang1937/dosesens/issues

Datasets:
  • lead_bmd - Matched lead bone mineral density dataset
  • lead_crime - Matched lead crime dataset

On CRAN:

Conda:

2.00 score 297 downloads 25 exports 18 dependencies

Last updated from:5fb6dea1a5. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK109
source / vignettesOK138
linux-releaseOK113
macos-releaseOK172
macos-oldrelOK202
windows-develOK81
windows-releaseOK83
windows-oldrelOK91
wasm-releaseOK79

Exports:apply_permutation_to_matrixbinary_thresh_attributeconstant_effects_testdev_TVdose_attributable_generaldose_sensitivity_mc_gendose_thresh_attributable_one_sidedextract_above_threshold_vs_baselineextract_below_threshold_vs_baselineextract_max_vs_baselineextract_min_vs_baselineextract_OLSextract_stochastic_interventionextract_threshold_effectextract_threshold_effect_functionmax_expectationmax_ratiomax_ratio_newmax_ratios_summarynormal_test_genprob_boundssharp_double_statisticsharp_null_double_testvar_estweak_null_test

Dependencies:clidplyrgenericsgluegtoolslifecyclelpSolvemagrittrnloptrpillarpkgconfigR6rlangtibbletidyselectutf8vctrswithr

Readme and manuals

Help Manual

Help pageTopics
A function that returns a permuted vector according to a matrix and permutation vector.apply_permutation_to_matrix
Separable algorithm for threshold attributable effect in a sensitivity analysis with at most one over-exposed unit in each matched set. For a greater than alternative, finds the 'a' matched sets that most decrease the mean and/or variance.binary_thresh_attribute
A helper that takes a gurobi model object outputted from dose_attributable_general or dose_thresh_attributable_one_sided and changes the Delta parameter. Saves computation time by directly editing the constraint involving Delta without having to reinitialize the other constraints that are kept the same. Outputs a list analogous to output from dose_attributable_general or dose_thresh_attributable_one_sided.change_Delta
Asymptotic sensitivity analysis for weak nulls with continuous exposures assuming constant effects across matched sets.constant_effects_test
Computes deviation from uniform distribution in total variation distance for a given amount of unmeasured confounding and a greater than alternative with a binary outcome.dev_TV
Inference for general attributable effects in sensitivity analysis with continuous exposures and binary outcomes. Gurobi must be installed to use this function.dose_attributable_general
Sharp null monte-carlo sensitivity analysis for continuous exposures and binary outcomes.dose_sensitivity_mc_gen
Inference for threshold attributable effects in sensitivity analysis with continuous exposures and binary outcomes. Gurobi must be installed to use this function.dose_thresh_attributable_one_sided
Compute average of outcomes above dose threshold minus average of outcomes.extract_above_threshold_vs_baseline
Compute average of outcomes below dose threshold minus average of outcomes.extract_below_threshold_vs_baseline
Compute largest dose outcome minus average of other outcomes.extract_max_vs_baseline
Compute smallest dose outcome minus average of other outcomes.extract_min_vs_baseline
A function that returns the coefficient from regressing an outcome vector on a dose vector.extract_OLS
Compute weighted sum of outcomes.extract_stochastic_intervention
Compute difference in average outcomes above and below a dose threshold.extract_threshold_effect
Function factory for extract_threshold_effect.extract_threshold_effect_function
Matched lead bone mineral density datasetlead_bmd
Matched lead crime datasetlead_crime
A function to compute a conservative upper bound on the worst-case expectation under the sharp nullmax_expectation
Find the max ratio of probabilities between two permutations.max_ratio
Find the max ratio of probabilities between two permutations.max_ratio_new
Find the max ratio of probabilities between two permutations for each matched set.max_ratios_summary
Sharp null sensitivity analysis for continuous exposures and binary outcomes using normal approximation.normal_test_gen
A function to find the maximum and minimum probability of a permutation.prob_bounds
Statistic based on inner product between transformations of dose and outcome.sharp_double_statistic
Asymptotic sharp null sensitivity analysis for a class of test statistics accommodating continuous exposures and any scalar outcome.sharp_null_double_test
A function for variance estimationvar_est
Asymptotic sensitivity analysis for weak nulls with continuous exposures.weak_null_test