pkpd                 package:rmutil                 R Documentation

_P_h_a_r_m_a_c_o_k_i_n_e_t_i_c _C_o_m_p_a_r_t_m_e_n_t _M_o_d_e_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     Mean functions for use in fitting pharmacokineticcompartment
     models models.

     'mu1.0o1c': open zero-order one-compartment model

     'mu1.1o1c': open first-order one-compartment model

     'mu1.1o2c': open first-order two-compartment model (ordered)

     'mu1.1o2cl': open first-order two-compartment model (ordered,
     absorption and transfer equal)

     'mu1.1o2cc': open first-order two-compartment model (circular)

     Simultaneous models for parent drug and metabolite:

     'mu2.0o1c': zero-order one-compartment model

     'mu2.0o2c1': zero-order two-compartment for parent,
     one-compartment for metabolite, model

     'mu2.0o2c2': zero-order two-compartment model for both parent and
     metabolite

     'mu2.1o1c': first-order one-compartment model

     'mu2.0o1cfp': zero-order one-compartment first-pass model

     'mu2.0o2c1fp': zero-order two-compartment for parent,
     one-compartment for metabolite, model with first-pass

     'mu2.0o2c2fp': zero-order two-compartment model for both parent
     and metabolite with first-pass

     'mu2.1o1cfp': first-order one-compartment first-pass model

_U_s_a_g_e:

     mu1.0o1c(p, times, dose=1, end=0.5)
     mu1.1o1c(p, times, dose=1)
     mu1.1o2c(p, times, dose=1)
     mu1.1o2cl(p, times, dose=1)
     mu1.1o2cc(p, times, dose=1)
     mu2.0o1c(p, times, dose=1, ind, end=0.5)
     mu2.0o2c1(p, times, dose=1, ind, end=0.5)
     mu2.0o2c2(p, times, dose=1, ind, end=0.5)
     mu2.1o1c(p, times, dose=1, ind)
     mu2.0o1cfp(p, times, dose=1, ind, end=0.5)
     mu2.0o2c1fp(p, times, dose=1, ind, end=0.5)
     mu2.0o2c2fp(p, times, dose=1, ind, end=0.5)
     mu2.1o1cfp(p, times, dose=1, ind)

_A_r_g_u_m_e_n_t_s:

       p: Vector of parameters. See the source file for details.

   times: Vector of times.

    dose: Vector of dose levels.

     ind: Indicator whether parent drug or metabolite.

     end: Time infusion ends.

_V_a_l_u_e:

     The profile of mean concentrations for the given times and doses
     is returned.

_A_u_t_h_o_r(_s):

     J.K. Lindsey

_E_x_a_m_p_l_e_s:

     library(repeated)
     times <- rep(1:20,2)
     dose <- c(rep(2,20),rep(5,20))
     # set up a mean function for gar based on mu1.1o1c:
     mu <- function(p) {
             ka <- exp(p[2])
             ke <- exp(p[3])
             exp(p[2]-p[1])/(ka-ke)*(exp(-ke*times)-exp(-ka*times))}
     conc <- matrix(rgamma(40,2,scale=mu(log(c(1,0.3,0.2)))/2),ncol=20,byrow=TRUE)
     conc[,2:20] <- conc[,2:20]+0.5*(conc[,1:19]-matrix(mu(log(c(1,0.3,0.2))),
             ncol=20,byrow=TRUE)[,1:19])
     conc <- ifelse(conc>0,conc,0.01)
     gar(conc, dist="gamma", times=1:20, mu=mu, preg=log(c(1,0.4,0.1)),
             pdepend=0.1, pshape=1)
     # changing variance
     shape <- mu
     gar(conc, dist="gamma", times=1:20, mu=mu, preg=log(c(0.5,0.4,0.1)),
             pdep=0.1, shape=shape, pshape=log(c(0.5,0.4,0.1)))

