# PD compartment initialization

**URL:** <https://forum.certara.com/t/pd-compartment-initialization/2571>\
**Category:** Modelling and Simulation\
**Created:** [June 2, 2013, 2:00pm UTC](https://forum.certara.com/t/pd-compartment-initialization/2571 "2013-06-02T14:00:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramya\_Godavarty](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@Ramya\_Godavarty](https://forum.certara.com/u/Ramya_Godavarty)\
**Post date:** [June 2, 2013, 2:00pm UTC](https://forum.certara.com/t/pd-compartment-initialization/2571/1 "2013-06-02T14:00:04Z")

</div>

Hi, I am working on an indirect response model. As a first step I am trying to model only the response data using the following code: test(){ EFF=0 sequence{E = 1.35} # initializes the PD compartment to a literature value deriv(E = Kin\*(1-EFF) - Kout \* E) Kin=Kin0_exp(-Kdel_t) # assume Kin decreased exponentially with time stparm(Kdel = exp(tvKdel + nKdel)) stparm(Kin0 = exp(tvKin0 + nKin0)) stparm(Kout = exp(tvKout + nKout)) fixef(tvKdel = c(, -4.81, )) fixef(tvKin0 = c(, 1.99, )) fixef(tvKout = c(, -3.69, )) error(EEps = 0.2) observe(EObs = E\*(1+ EEps)) ranef(block(nKdel,nKin0, nKout)= c(1,0.15,1,0.24,0.05,1)) } As you see, in the absence of predose values for the biomarkers, I am initializing the compartment with a value from the literature. Although the model fit is nice, I would like to add some variability to this value, so that different subjects have different initial PD compartment values. I tried the following code: stparm(base=exp(baseTV + nbase)) fixef(baseTV(freeze) = 0.3) # (log of 1.35) ranef(diag(nbase) = 0.2)) sequence{E = base} However, after running the model, all subjects turn out with identical IPREDs at time zero (with a value within the variability set above). Do you have any suggestions? Thanks, Dora

---

<div class="post-metadata">

**Author:** ![minhaj](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@minhaj](https://forum.certara.com/u/minhaj)\
**Post date:** [June 2, 2013, 5:58pm UTC](https://forum.certara.com/t/pd-compartment-initialization/2571/2 "2013-06-02T17:58:18Z")

</div>

Dear Dora You have one syntax error ranef(diag(nbase) = 0.2)) should be ranef(diag(nbase) =c( 0.2)) Hope it helps Best Serge
