Skip to content

Commit

Permalink
update robincar suggests dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
przybal2 committed Nov 11, 2024
1 parent 979d911 commit f50d27a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ Maintainer: Alex Przybylski <alexander.przybylski@novartis.com>
License: LGPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Suggests:
knitr,
rmarkdown,
testthat (>= 3.0.0),
tidyr,
marginaleffects,
margins,
RobinCar (== 0.3.0)
RobinCar (>= 0.3.0)
Config/testthat/edition: 3
Depends:
R (>= 2.10)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-apply_contrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ test_that("Reference levels correctly handled when >2 treatment levels", {


# if RobinCar is available compare contrast results
robincar_available <- requireNamespace("RobinCar", versionCheck = list(name = "RobinCar", op = "==", version = "0.3.0"), quietly = T)
robincar_available <- requireNamespace("RobinCar", quietly = T)

if (robincar_available){

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-estimate_varcov.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ V1 <- estimate_varcov(fit1, method = "Ye")$robust_varcov
V1_3arm <- estimate_varcov(fit_3arm, method = "Ye")$robust_varcov

# if RobinCar is available
robincar_available <- requireNamespace("RobinCar", versionCheck = list(name = "RobinCar", op = "==", version = "0.3.0"), quietly = T)
robincar_available <- requireNamespace("RobinCar", quietly = T)

if (robincar_available){
test_that("Correct variance calculation for Ye's method matching RobinCar", {
Expand Down
2 changes: 1 addition & 1 deletion vignettes/estimand_and_implementations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ cat("Point estimate", beeca_ye$marginal_est, "\nStandard error estimate", beeca_
**Version 1**: from `RobinCar` package

```{r}
if (requireNamespace("RobinCar", versionCheck = list(name = "RobinCar", op = "==", version = "0.3.0"), quietly = T)) {
if (requireNamespace("RobinCar", quietly = T)) {
robincar_ye <- RobinCar::robincar_glm(data.frame(fit$data), response_col = as.character(fit$formula[2]),
treat_col = "trtp", formula = fit$formula, g_family = fit$family,
contrast_h = "diff")$contrast$result
Expand Down

0 comments on commit f50d27a

Please sign in to comment.