diff --git a/SEQTaRget/DESCRIPTION b/SEQTaRget/DESCRIPTION index a2bd9d4..78b6737 100644 --- a/SEQTaRget/DESCRIPTION +++ b/SEQTaRget/DESCRIPTION @@ -1,7 +1,7 @@ Package: SEQTaRget Type: Package Title: Sequential Trial Emulation -Version: 1.1.0 +Version: 1.1.1 Authors@R: c(person(given = "Ryan", family = "O'Dea", role = c("aut", "cre"), diff --git a/SEQTaRget/R/SEQopts.R b/SEQTaRget/R/SEQopts.R index 1e8d390..5997298 100644 --- a/SEQTaRget/R/SEQopts.R +++ b/SEQTaRget/R/SEQopts.R @@ -86,6 +86,9 @@ SEQopts <- function(bootstrap = FALSE, bootstrap.nboot = 100, bootstrap.sample = weight.upper <- as.numeric(weight.upper) weight.eligible_cols <- as.list(weight.eligible_cols) + # Temporarily disabling deviation - work in progress method + if (deviation) stop("Deviation is currently under further development and is currently not suitable for analysis. + We apologize for this inconvenience") deviation.col <- as.character(deviation.col) deviation.conditions <- as.list(deviation.conditions) deviation.excused_cols <- as.list(deviation.excused_cols) diff --git a/SEQTaRget/tests/testthat/test_deviation.R b/SEQTaRget/tests/testthat/test_deviation.R new file mode 100644 index 0000000..c1c2a10 --- /dev/null +++ b/SEQTaRget/tests/testthat/test_deviation.R @@ -0,0 +1,12 @@ +test_that("Post-Expansion Excused Censoring", { + data <- copy(SEQdata) + data[N > 10, deviation := TRUE] + model <- expect_error(SEQuential(data, "ID", "time", "eligible", "tx_init", "outcome", + list("N", "L", "P"), list("sex"), + method = "censoring", + options = SEQopts( + weighted = TRUE, deviation = TRUE, + deviation.col = "deviation", + weight.preexpansion = FALSE) + )) +})