Replies: 1 comment
-
Hi If you estimate the residual variability on the SD scale then you should square that value when assuming that you estimate the variances in PopED. The expected SE estimates will be approximately twice as large as when you estimate the SD values, but should not affect the design optimization. Best regards, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @andrewhooker,
I have a NM code in which the error model is described as fixed effect. I wish to correctly transfer it to the popED.
I have two questions pertaining to the code below:
Thanks,
-Ankur
My NM Code as follows
;***************************************************************************
$SUBROUTINE ADVAN3 TRANS4
;***************************************************************************
$PK
CLALLO = (BWT/93.0)**THETA(7)
VALLO = (BWT/93.0)**THETA(8)
TVCL = THETA(3)*CLALLO
TVV1 = THETA(4)*VALLO
TVQ = THETA(5)
TVV2 = THETA(6)
CL = TVCL * EXP(ETA(1))
V1 = TVV1 * EXP(ETA(2))
Q = TVQ * EXP(ETA(3))
V2 = TVV2 * EXP(ETA(4))
S1 = V1/1000
S2 = V2/1000
$ERROR
IPRED = F
IRES = DV-IPRED
ERRADD = THETA(1)
ERRPROP = THETA(2)
W = SQRT(ERRPROP2*IPRED2 + ERRADD**2)
DEL = 0
IF(W.EQ.0) DEL = 1
IWRES = IRES/(W + DEL)
Y = IPRED + W*EPS(1)
$THETA
(0,100) ; TH1_ERRADD
(0,1) ; TH2_ERRPROP
(0,0.1) ; TH3_CL
(0,2) ; TH4_V1
(0,1) ; TH5_Q
(0,2) ; TH6_V2
0.75 ; TH7_CLALLO
1.0 ; TH8_VALLO
$OMEGA
0.1 ; n_CL
0.1 ; n_V1
0 FIX ; n_Q
0.1 ; n_V2
$SIGMA 1 FIX
$ESTIMATION METHOD=1 INTER POSTHOC MAXEVAL=9999 NOABORT PRINT=5
My popED code is as below:
PK_2comp_ode_inf <- function(Time, State, Pars){
with(as.list(c(State, Pars)), {
CL=CL*(WT/93)^(WT_CL)
V1=V1*(WT/93)^(WT_V1)
if( Time %% TAU < TINF ){In <- DOSE/TINF}
else {
In <- 0
}
dA1 <- In - CL/V1A1- Q/V1A1+ Q/V2A2
dA2 <- Q/V1A1-Q/V2*A2
})
}
PK_2comp_ode_inf_ff <- function(model_switch, xt, parameters, poped.db){
with(as.list(parameters),{
initial conditions of ODE system
times_xt <- drop(xt)# sample times
event_times <- seq(from=0,to=max(times_xt),by=TAU)# dose times
times <- c(0,times_xt,event_times) ## add extra time for start of integration
#times<-seq(0,1344,10)
times <- sort(times)
times <- unique(times) # remove duplicates
})
}
-- parameter definition function
-- names match parameters in function ff
sfg <- function(x,a,bpop,b,bocc){
parameters=c( CL=bpop[1]*exp(b[1]),
V1=bpop[2]*exp(b[2]),
Q= bpop[3]*exp(b[3]),
V2=bpop[4]*exp(b[4]),
#BL=bpop[5]*exp(b[5]),
WT_CL=bpop[5],
WT_V1=bpop[6],
DOSE=a[1],
TINF=a[2],
TAU= a[3],
WT= a[4])
return( parameters )
}
## -- Residual unexplained variablity (RUV) function
## -- Proportional + additive
feps.add.prop <- function(model_switch,xt,parameters,epsi,poped.db){
returnArgs <- do.call(poped.db$model$ff_pointer,list(model_switch,xt,parameters,poped.db))
returnArgs <- ff(model_switch,xt,parameters,poped.db)
y <- returnArgs[[1]]
poped.db <- returnArgs[[2]]
y = y*(1+epsi[,1])+epsi[,2]
return(list( y= y,poped.db =poped.db ))
}
Original Design
poped.db_original <- create.poped.database(ff_file = "PK_2comp_ode_inf_ff",
fg_file="sfg",
fError_file="feps.add.prop",
Beta Was this translation helpful? Give feedback.
All reactions