Comments (2)
Hi Mark,
Yes, it is. This is, however, a complicated question, and many ways you could approach this problem. See for example https://www.page-meeting.org/default.asp?abstract=2578. Method D2 from this work, although not the best, is the easiest and entails setting the model predictions to zero at the LOQ.
For example:
## Warfarin example from software comparison in:
## Nyberg et al., "Methods and software tools for design evaluation
## for population pharmacokinetics-pharmacodynamics studies",
## Br. J. Clin. Pharm., 2014.
library(PopED)
sfg <- function(x,a,bpop,b,bocc){
## -- parameter definition function
parameters=c(CL=bpop[1]*exp(b[1]),
V=bpop[2]*exp(b[2]),
KA=bpop[3]*exp(b[3]),
Favail=bpop[4],
DOSE=a[1])
return(parameters)
}
ff_d2 <- function(model_switch,xt,parameters,poped.db){
##-- Model: One comp first order absorption
with(as.list(parameters),{
y=xt
LOQ = 2
y=(DOSE*Favail*KA/(V*(KA-CL/V)))*(exp(-CL/V*xt)-exp(-KA*xt))
y[y<LOQ] <- 0
return(list(y=y,poped.db=poped.db))
})
}
feps_d2 <- function(model_switch,xt,parameters,epsi,poped.db){
## -- Residual Error function
## -- Proportional + additive
y <- do.call(poped.db$model$ff_pointer,list(model_switch,xt,parameters,poped.db))[[1]]
loq_obs <- y==0
y = y*(1+epsi[,1]) + epsi[,2]
y[loq_obs] <- 0
return(list(y=y,poped.db=poped.db))
}
## -- Define initial design and design space
poped_db <- create.poped.database(ff_fun=ff_d2,
fg_file="sfg",
fError_fun=feps_d2,
bpop=c(CL=0.15, V=8, KA=1.0, Favail=1),
notfixed_bpop=c(1,1,1,0),
d=c(CL=0.07, V=0.02, KA=0.6),
sigma=c(0.01,0.25),
groupsize=32,
xt=c( 0.5,1,2,6,24,36,72,120),
minxt=0,
maxxt=120,
a=70,
mina=0,
maxa=100)
output <- poped_optim(poped_db, opt_xt = T, parallel = T)
plot_model_prediction(output$poped.db)
from poped.
Thank you so much.
from poped.
Related Issues (20)
- Manually updating the number of samples as an alternative to opt_samps in R? HOT 1
- Plotting optimized output seems to used wrong times HOT 1
- Where is the optimization parallelized HOT 3
- unused argument in plot_model_prediction() HOT 2
- parallel computation for plot_efficiency_of_windows() HOT 4
- problem with tests run by AppVeyor HOT 2
- Warning "Problems inverting the matrix. Results could be misleading." HOT 2
- Different results when running the optimization R-script in popED in Windows and Mac HOT 2
- Integrating an IV loading dose followed by SC maintenance dose using popEd HOT 1
- Illogical OFV when xts have a lot of significant digits HOT 2
- D-optimal Design for a trial comparing three different drugs
- Design Evaluation when No. of subjects change towards the end of trial HOT 6
- Gradient function HOT 2
- Handling derived outputs
- `evaluate_fim_map` documentation
- Error in svd(mat) : infinite or missing values in 'x'
- Define a model with lag time HOT 5
- Take an example of the pk.3.comp.olal.ode model
- multiple dose full TMDD model in POPED HOT 3
- Two questions HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poped.