Skip to content
Closed
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pharmr.extra
Title: Extension of pharmr (Pharmpy) functionality
Version: 0.0.0.9072
Version: 0.0.0.9073
Authors@R: c(
person("Ron", "Keizer", email = "ron@insight-rx.com", role = c("cre", "aut")),
person("Michael", "McCarthy", email = "michael.mccarthy@insight-rx.com", role = "ctb"),
Expand Down
10 changes: 7 additions & 3 deletions tests/testthat/test-create_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,18 @@ test_that("RUV settings work as expected", {
# Test combined error
mod <- create_model(ruv = "combined")
expect_equal(
"EPS_1*IPREDADJ + EPS_2 + IPRED",
"EPS_1*IPRED + EPS_2 + IPRED",
as.character(mod$statements$find_assignment("Y")$expression)
)

# Test log-transformed both sides
# Test log-transformed both sides. The LTBS workaround in
# set_residual_error() calls set_additive_error_model() before
# set_proportional_error_model(data_trans = "log(Y)"), so pharmpy emits a
# safe-divide variable named IPREDADJ1 (IPREDADJ is taken by the additive
# step).
mod <- create_model(ruv = "ltbs")
expect_equal(
"EPS_1 + log(IPREDADJ)",
"EPS_1 + log(IPREDADJ1)",
as.character(mod$statements$find_assignment("Y")$expression)
)
})
Expand Down
Loading