[R-sig-ME] Two compartment model PK model using nlme

Jesus Frias Jesus.Frias at DIT.IE
Tue Sep 7 18:21:18 CEST 2010


Hi Martin,

The nlmeODE library has a few examples of simulations of a two compartmental
model. See

library(nlmeODE)
help(PKPDmodels)

It works with nlme and I think that this is what you will need.

The SSbiexp is the general solution those systems of ODEs and could serve
you as well, although you would have to make some work to make sense of your
parameters.

There is a whole taskview in pharmacokinetics in the CRAN repositories and
it points to the PK and PKfit, which have functions for those kind of
models, but I am not sure if they can be plugged to nlme.

Regards,

Jesus
 

-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of martin
highfield
Sent: 07 September 2010 16:28
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] Two compartment model PK model using nlme

Dear list members,

Can anyone point me in the right direction for implementing a two
-compartment exponential model with instantaneous input and
first-order elimination kinetics using the nlme package. I have been
asked (informally)  to replicate some pharmacokinetic data analysis
which was previously analysed using the NONMEM program but have little
experience with these types of models (how do I get myself into these
situations?) I know there is a function that implements a one
compartment open model (phenoModel) but am unable to find a function
specific to two compartment exponential with instantaneous input and
first order elimination. Would the SSbiexp function be equivalent or
would I have to construct a function myself?

The data comes from 33 subjects although the number of observations
per subjectis quite sparse and with some non consecutive observations
within a subject.

table(table(subset(dataf.stack, !is.na(dataf.stack$Concentration))$Subject))

 2  3  4  5  6  7
 4  5  5  8 10  1

Many thanks (and I hope I havent asked too many daft questions)
Best
Martin




sessionInfo()
R version 2.11.0 (2010-04-22)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United
Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                            LC_TIME=English_United
Kingdom.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] reshape_0.8.3  plyr_0.1.9     lattice_0.18-8 nlme_3.1-96

loaded via a namespace (and not attached):
[1] grid_2.11.0  tools_2.11.0

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie




More information about the R-sig-mixed-models mailing list