This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Factor value that is part of keep
is converted to numeric in the source data
#78
Comments
With a quick additional test, it seems like this only has an effect when |
But there should be no effects on the source data. |
library(rxode2)
#> rxode2 2.0.14.9000 using 8 threads (see ?getRxThreads)
#> no cache: create with `rxCreateCache()`
one.compartment <- function() {
ini({
tka <- 0.45; label("Ka")
tcl <- 1; label("Cl")
tv <- 3.45; label("V")
eta.ka ~ 0.6
eta.cl ~ 0.3
eta.v ~ 0.1
add.sd <- 0.7
})
model({
ka <- exp(tka + eta.ka)
cl <- exp(tcl + eta.cl)
v <- exp(tv + eta.v)
d/dt(depot) = -ka * depot
d/dt(center) = ka * depot - cl / v * center
cp = center / v
cp ~ add(add.sd)
})
}
d_sim <- nlmixr2data::theo_sd
d_sim$TRTG <- ordered(ifelse(nlmixr2data::theo_sd$WT < median(nlmixr2data::theo_sd$WT), "Low", "High"))
summary(d_sim$TRTG)
#> High Low
#> 84 60
fit <- rxSolve(one.compartment, d_sim, keep="TRTG")
summary(d_sim$TRTG)
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 1.000 1.000 1.000 1.417 2.000 2.000 Created on 2023-12-04 with reprex v2.0.2 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
So currently in
Any sort of attributes will be dropped (maybe should have some sort of warning but would need to explicitly check for attributes). Could additionally support |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
d_sim$TRTG
should not be modified, but in the first pass where it is part ofkeep
, it is. (My guess is that this will end up being an rxode2 issue, but I'm not sure exactly wherekeep
has its effects at the moment, and I want to put the reprex into the record.)Created on 2023-09-25 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: