Skip to content

Commit

Permalink
Merge pull request #3 from krisrs1128/issue-2
Browse files Browse the repository at this point in the history
Ensure Sensitivity Analysis recognizes Pretreatment Vars
  • Loading branch information
krisrs1128 authored Feb 14, 2025
2 parents 49d6d18 + 52c1d20 commit b8ce926
Show file tree
Hide file tree
Showing 97 changed files with 384 additions and 355 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: multimedia
Title: Multimodal Mediation Analysis
Version: 0.2.0
Version: 0.2.1
Authors@R:
c(person("Kris", "Sankaran", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-9415-1971")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# multimedia 0.2.1

* Resolves [a bug](https://github.com/krisrs1128/multimedia/issues/2) in sensitivity analysis. Pretreatment variables were not being correctly read.

# multimedia 0.2.0

* Adds functions for sensitivity analysis: `sensitivity()`, `sensitivity_pathwise()`, and `sensitivity_perturb()`.
Expand Down
14 changes: 7 additions & 7 deletions R/sensitivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ sensitivity <- function(model, exper, confound_ix = NULL, rho_seq = NULL,
rho_seq <- seq(-0.9, 0.9, by = 0.2)
}

summarization <- \(x) {
indirect_overall(x, ...)
summarization <- \(x, ...) {
indirect_overall(x, exper, ...)
}

sampler <- \(model, exper, rho) {
Expand Down Expand Up @@ -204,8 +204,8 @@ sensitivity_pathwise <- function(
rho_seq <- seq(-0.9, 0.9, by = 0.2)
}

summarization <- \(x) {
indirect_pathwise(x, ...)
summarization <- \(x, ...) {
indirect_pathwise(x, exper, ...)
}
sampler <- \(model, exper, rho) {
sensitivity_subset_sample(model, exper, confound_ix, rho)
Expand Down Expand Up @@ -273,7 +273,7 @@ sensitivity_sample <- function(model, exper, epsilon) {
profile <- setup_profile(model, treatments(exper), treatments(exper))
exper_ <- sample(
model,
profile = profile, pretreatments = pretreatments(exper)
profile = profile, pretreatment = pretreatments(exper)
)

# add correlated noise
Expand Down Expand Up @@ -419,8 +419,8 @@ sensitivity_perturb <- function(
nu_seq <- seq(-0.1, 0.1, by = 0.04)
}

summarization <- \(x) {
indirect_overall(x)
summarization <- \(x, ...) {
indirect_overall(x, exper, ...)
}

sampler <- \(model, exper, nu) {
Expand Down
4 changes: 2 additions & 2 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 48 additions & 48 deletions docs/articles/IBD.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b8ce926

Please sign in to comment.