Skip to content

Commit

Permalink
updated pkgdown site
Browse files Browse the repository at this point in the history
* some weird behaviour with the mimR example not finding a variable declared in the example!
  • Loading branch information
n8thangreen committed Feb 13, 2024
1 parent 2e940ab commit cf5a892
Show file tree
Hide file tree
Showing 31 changed files with 574 additions and 179 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Description:
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3.9000
RoxygenNote: 7.3.1
Imports:
boot,
copula,
Expand Down
14 changes: 7 additions & 7 deletions R/mimR.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,29 @@
#'
#' @export
#' @examples
#'
#' data(AC_IPD) # AC patient-level data
#' data(BC_ALD) # BC aggregate-level data
#'
#' lin_form <- as.formula("y ~ X3 + X4 + trt*X1 + trt*X2")
#'
#' # matching-adjusted indirect comparison
#' mimR_maic <- mimR(AC_IPD, BC_ALD, strategy = strategy_maic())
#' mimR_maic <- mimR(AC_IPD, BC_ALD, strategy = strategy_maic(lin_form))
#'
#' # simulated treatment comparison
#' mimR_stc <- mimR(AC_IPD, BC_ALD, strategy = strategy_stc())
#' mimR_stc <- mimR(AC_IPD, BC_ALD, strategy = strategy_stc(lin_form))
#'
#' # G-computation with maximum likelihood
#' # mimR_gcomp_ml <- mimR(AC_IPD, BC_ALD, strategy = strategy_gcomp_ml())
#' # mimR_gcomp_ml <- mimR(AC_IPD, BC_ALD, strategy = strategy_gcomp_ml(lin_form))
#'
#' # G-computation with Bayesian inference
#' mimR_gcomp_stan <- mimR(AC_IPD, BC_ALD, strategy = strategy_gcomp_stan())
#' mimR_gcomp_stan <- mimR(AC_IPD, BC_ALD, strategy = strategy_gcomp_stan(lin_form))
#'
mimR <- function(AC.IPD, BC.ALD, strategy, CI = 0.95, ...) {

if (CI <= 0 || CI >= 1) stop("CI argument must be between 0 and 1.")
##TODO: as method instead?
if (!inherits(strategy, "strategy"))
stop("strategy argument must be of a class strategy.")
stop("strategy argument must be a class strategy.")

# select data according to formula
ipd <- model.frame(strategy$formula, data = AC.IPD)
Expand All @@ -64,7 +65,6 @@ mimR <- function(AC.IPD, BC.ALD, strategy, CI = 0.95, ...) {

keep_names <- c(term_names, response_names)

browser()
ald <- BC.ALD[keep_names]

AC_mimR <- IPD_stats(strategy, ipd = ipd, ald = ald, ...)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# mimR: Multiple Imputation Marginalisation <img align="right" src="mime.png" width="100">
# mimR: Multiple Imputation Marginalisation

<!-- <img align="right" src="mime.png" width="100"> -->

<!-- badges: start -->

Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ reference:
- marginal_variance
- trial_treatment_effect
- trial_variance
- title: "Data"
contents:
- AC_IPD
- BC_ALD

135 changes: 75 additions & 60 deletions docs/articles/Basic_example.html

Large diffs are not rendered by default.

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

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

3 changes: 2 additions & 1 deletion docs/index.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/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
Basic_example: Basic_example.html
last_built: 2023-12-15T10:45Z
last_built: 2024-02-13T17:08Z
urls:
reference: https://StatisticsHealthEconomics.github.io/mimR/reference
article: https://StatisticsHealthEconomics.github.io/mimR/articles
Expand Down
105 changes: 105 additions & 0 deletions docs/reference/AC_IPD.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/reference/ALD_stats.html

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

Loading

0 comments on commit cf5a892

Please sign in to comment.