Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions R/strategy_.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ strategy_maic <- function(formula = NULL,
}
}
}
# Ensure MAIC uses an unadjusted outcome model to prevent estimating conditional effects.
resp_var <- all.vars(outcome_model)[1]
out_vars <- all.vars(outcome_model)

if (length(setdiff(out_vars, c(resp_var, trt_var))) > 0) {
if (verbatim) {
warning("Covariates detected in the MAIC outcome model. To ensure the estimation of compatible marginal treatment effects, MAIC requires an unadjusted outcome model. The outcome model is being automatically overridden to '", resp_var, " ~ ", trt_var, "'.", call. = FALSE)
}
outcome_model <- as.formula(paste(resp_var, "~", trt_var))
}

check_formula(outcome_model, trt_var)

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
[![R-CMD-check](https://github.com/StatisticsHealthEconomics/outstandR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/StatisticsHealthEconomics/outstandR/actions/workflows/R-CMD-check.yaml)
[![License: GPL
v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![outstandR status
badge](https://statisticshealtheconomics.r-universe.dev/outstandR/badges/version)](https://statisticshealtheconomics.r-universe.dev/outstandR)
<a href="https://statisticshealtheconomics.r-universe.dev/outstandR"><img src="https://statisticshealtheconomics.r-universe.dev/outstandR/badges/version" alt="outstandR status badge" style="height: 20px;"></a>
[![CRAN status](https://www.r-pkg.org/badges/version/outstandR)](https://CRAN.R-project.org/package=outstandR)
[![codecov](https://codecov.io/gh/StatisticsHealthEconomics/outstandR/graph/badge.svg?token=YOUR_CODECOV_TOKEN)](https://codecov.io/gh/StatisticsHealthEconomics/outstandR)
<!-- badges: end -->
Expand Down
23 changes: 13 additions & 10 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,17 @@ reference:
contents:
- strategy-class

# articles:
# - title: "Binary outcome data example"
# contents:
# - "Binary_outcome_example"
# - title: "Continuous outcome data example"
# contents:
# - "Continuous_outcome_example"
# - title: "Count outcome data example"
# contents:
# - "Count_outcome_example"
articles:
- title: "Binary outcome data example"
contents:
- "Binary_outcome_example"
- title: "Continuous outcome data example"
contents:
- "Continuous_outcome_example"
- title: "Count outcome data example"
contents:
- "Count_outcome_example"
- title: "Developer Guides"
contents:
- "articles/adding-a-new-strategy"

22 changes: 22 additions & 0 deletions badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.

2 changes: 1 addition & 1 deletion docs/GEMINI.html

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

2 changes: 1 addition & 1 deletion docs/LICENSE.html

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

Loading
Loading