# Advan4 trans1 equivalent pumas code

**URL:** https://discourse.pumas.ai/t/advan4-trans1-equivalent-pumas-code/1134
**Category:** Basic Usage
**Created:** [February 10, 2025, 2:00pm UTC](https://discourse.pumas.ai/t/advan4-trans1-equivalent-pumas-code/1134 "2025-02-10T14:00:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yashokrajv](https://avatars.discourse-cdn.com/v4/letter/y/e5b9ba/32.png) [@yashokrajv](https://discourse.pumas.ai/u/yashokrajv)
#### Post date: [February 10, 2025, 2:00pm UTC](https://discourse.pumas.ai/t/advan4-trans1-equivalent-pumas-code/1134/1 "2025-02-10T14:00:41Z")

</div>

Hi All,  
Looking for an equivalent pumas code to translate the below nonmem code in **pre** block of the model. In nonmem advan4 trans1 is implemented.

```auto
KA = TVKA*EXP(ETA(1))
K = (TVCL/TVV2)*EXP(ETA(2))
V2 = TVV2*EXP(ETA(3))
K32= (TVQ/TVV3)*EXP(ETA(4))
K23= (TVQ/TVV2)*EXP(ETA(5))

```

Many thanks for the help.

---

<div class="post-metadata">

### Author: ![andreasnoack](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/andreasnoack/32/22_2.png) [@andreasnoack](https://discourse.pumas.ai/u/andreasnoack)
#### Post date: [February 10, 2025, 3:39pm UTC](https://discourse.pumas.ai/t/advan4-trans1-equivalent-pumas-code/1134/2 "2025-02-10T15:39:03Z")

</div>

In Pumas, you are looking for this model: [Analytical Solutions and Differential Equations · Pumas](https://docs.pumas.ai/stable/model_components/dynamical_types/#Pumas.Depots1Central1Periph1-model_components-dynamical_types). Notice that you’d have to define the parameters `CL`, `Q`, `Vc`, and `Vp` so if you want to apply random effects to the rate constants, like your example, you’d have to first define the rate constants and then convert to the physiological parameters, i.e.

```julia
CL = K*V2
Q = K23*V2
Vc = V2
Vp = V3

```

Here I’m reusing your variable names for simplicity so the Pumas model can be simplified such that you just define `Vc` directly instead of defining `V2`.
