You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to simulate a model which has IOV modeling, and I have a data of patients covariates which I want to simulate, but I am not able to implement IOV correctly, as the ID and dosing amount code I have written messes up the sequence of ID. Can you help me here is the model file:
mod <- mcode("iov", code)
patients <- read_csv("~/Desktop/pmx/replicated_patients.csv") %>% slice(1:10) %>% as.data.frame()
newdata <- mutate(patients,ID = 1:n())
data <- realize_addl(ev(amt = 40 * data$BSA, tinf = 0.5, ii = 24, addl = 4, ID = 1:10)) %>% as.data.frame
data <- mutate(data, OCC = cumsum(evid)-1)
data
and this is how my dataframe looks:
The text was updated successfully, but these errors were encountered:
Can you try the updated approach below? This lets the event expand function (ev_expand() ... also known as expand.ev()) handle the ID assignment. Please let me know if this is what you were aiming at.
I am trying to simulate a model which has IOV modeling, and I have a data of patients covariates which I want to simulate, but I am not able to implement IOV correctly, as the ID and dosing amount code I have written messes up the sequence of ID. Can you help me here is the model file:
and this is how my dataframe looks:
The text was updated successfully, but these errors were encountered: