Donald
October 3, 2019, 9:00pm
1
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?
vijay
October 7, 2019, 9:12am
2
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.
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
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
1 Like
vijay
February 10, 2020, 7:03am
4
Welcome to the Community @Aishwarya . Thanks for responding.
1 Like