# Combination Drug Dosing

**URL:** <https://discourse.pumas.ai/t/combination-drug-dosing/41>\
**Category:** Uncategorized\
**Created:** [October 3, 2019, 9:00pm UTC](https://discourse.pumas.ai/t/combination-drug-dosing/41 "2019-10-03T21:00:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Donald](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/donald/32/785_2.png) [@Donald](https://discourse.pumas.ai/u/Donald)\
**Post date:** [October 3, 2019, 9:00pm UTC](https://discourse.pumas.ai/t/combination-drug-dosing/41/1 "2019-10-03T21:00:09Z")

</div>

Hello, could I get some help with simulating a combination (2 drugs) dosing regimen on a single subject?

I tried the following, but I’m getting an error:

subject1 = Subject(id=1, evs=[regimenA1,regimenB1])

Are multiple dosage forms supported under the Subject function?

---

<div class="post-metadata">

**Author:** ![vijay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/vijay/32/96_2.png) [@vijay](https://discourse.pumas.ai/u/vijay)\
**Post date:** [October 7, 2019, 9:12am UTC](https://discourse.pumas.ai/t/combination-drug-dosing/41/2 "2019-10-07T09:12:22Z")

</div>

Hi Donald,

Welcome to Pumas! Could you provide more details on exactly what you are trying to do for combination drug therapy? If you have two `DosageRegimens` as in your example you can do something like this.

```auto
julia> regimenA1 = DosageRegimen(100, time=0)
DosageRegimen(1×9 DataFrame
│ Row │ time │ cmt │ amt │ evid │ ii │ addl │ rate │ duration │ ss │
│ │ Float64 │ Int64 │ Float64 │ Int8 │ Float64 │ Int64 │ Float64 │ Float64 │ Int8 │
├─────┼─────────┼───────┼─────────┼──────┼─────────┼───────┼─────────┼──────────┼──────┤
│ 1 │ 0.0 │ 1 │ 100.0 │ 1 │ 0.0 │ 0 │ 0.0 │ 0.0 │ 0 │)

julia> regimenB1 = DosageRegimen(50, time=0)
DosageRegimen(1×9 DataFrame
│ Row │ time │ cmt │ amt │ evid │ ii │ addl │ rate │ duration │ ss │
│ │ Float64 │ Int64 │ Float64 │ Int8 │ Float64 │ Int64 │ Float64 │ Float64 │ Int8 │
├─────┼─────────┼───────┼─────────┼──────┼─────────┼───────┼─────────┼──────────┼──────┤
│ 1 │ 0.0 │ 1 │ 50.0 │ 1 │ 0.0 │ 0 │ 0.0 │ 0.0 │ 0 │)

julia> combregimen = DosageRegimen(regimenA1, regimenB1)
DosageRegimen(2×9 DataFrame
│ Row │ time │ cmt │ amt │ evid │ ii │ addl │ rate │ duration │ ss │
│ │ Float64 │ Int64 │ Float64 │ Int8 │ Float64 │ Int64 │ Float64 │ Float64 │ Int8 │
├─────┼─────────┼───────┼─────────┼──────┼─────────┼───────┼─────────┼──────────┼──────┤
│ 1 │ 0.0 │ 1 │ 100.0 │ 1 │ 0.0 │ 0 │ 0.0 │ 0.0 │ 0 │
│ 2 │ 0.0 │ 1 │ 50.0 │ 1 │ 0.0 │ 0 │ 0.0 │ 0.0 │ 0 │)

julia> s1 = Subject(id=1, evs=combregimen, cvs=(drug=["A","B"],))
Subject
  ID: 1
  Events: 2
  Covariates: (drug = ["A", "B"],)

julia> DataFrame(s1)
2×12 DataFrame
│ Row │ id │ amt │ dose │ tad │ time │ evid │ cmt │ ss │ ii │ base_time │ rate_dir │ drug │
│ │ String │ Float64 │ Float64 │ Float64 │ Float64 │ Int8 │ Int64 │ Int8 │ Float64 │ Float64 │ Int8 │ String │
├─────┼────────┼─────────┼─────────┼─────────┼─────────┼──────┼───────┼──────┼─────────┼───────────┼──────────┼────────┤
│ 1 │ 1 │ 100.0 │ 100.0 │ 0.0 │ 0.0 │ 1 │ 1 │ 0 │ 0.0 │ 0.0 │ 1 │ A │
│ 2 │ 1 │ 50.0 │ 100.0 │ 0.0 │ 0.0 │ 1 │ 1 │ 0 │ 0.0 │ 0.0 │ 1 │ B │

```

Essentially, the `DosageRegimen` can not only create individual regimens, but also can combine multiple `DosageRegimens` together as shown above. To differentiate that the first drug was `A` and the second was `B`, I just added a `cvs` (covariates) to the `Subject`.  
Note: Since we are dealing with only one covariate, notice the trailing `,` after the specification of the covariate.

Hope this helps.

Vijay

---

<div class="post-metadata">

**Author:** ![Aishwarya](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Aishwarya](https://discourse.pumas.ai/u/Aishwarya)\
**Post date:** [February 10, 2020, 6:35am UTC](https://discourse.pumas.ai/t/combination-drug-dosing/41/3 "2020-02-10T06:35:03Z")

</div>

Hi Donald,

Another way to combine dosage regimens for a single subject : You can try and separate dosage regimens and not to put them together in a single parentheses. Through this, you are clearly defining multiple dosage regimen for a single subject.

And make sure to use same round brackets on combining the dosage regimens. I encountered the same error and square brackets contributed to the error.

Let’s say  
A single subject who received a 500 mg IV dose at `time = 0`, followed by followed by 100 mg dose at `time = 12` that is given every 12 hours for 5 additional doses

```
ev1 = DosageRegimen(500, time=0, cmt=2,)
ev2 = DosageRegimen(100, time=12, cmt=1, ii=12, addl=4)
evcombined =DosageRegimen(ev1, ev2)
s1 = Subject(id=1, evs=evcombined, cvs=(isPM=0, wt=50))
obs1 = simobs(yourmodelname, s1, para, obstimes=0:1:120)
plot(obs1)

```

This should run your model with combined dosage regimen for a single subject.  
Hope this helped!

Regards,  
Aishwarya

---

<div class="post-metadata">

**Author:** ![vijay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pumas.ai/vijay/32/96_2.png) [@vijay](https://discourse.pumas.ai/u/vijay)\
**Post date:** [February 10, 2020, 7:03am UTC](https://discourse.pumas.ai/t/combination-drug-dosing/41/4 "2020-02-10T07:03:42Z")

</div>

Welcome to the Community @Aishwarya. Thanks for responding.
