Salacious title, but true story.

 dmethyl1 = {
      {0, 0},
      {.25, 1},
      {.5, 7},
      {1, 26},
      {1.5, 40},
      {2, 45},
      {2.5, 45},
      {3, 44},
      {3.5, 44},
      {4, 43},
      {4.5, 41},
      {5, 39},
      {6, 38},
      {7, 37},
      {8, 35},
      {9, 33},
      {10, 32},
      {11, 29},
      {12, 24},
      {24, 13},
      {48, 4},
      {60, 2},
      {72, 0}
     }

This data set represents d-methyl serum concentrations as a function of time after taking a single dose 30mg of Adderall.

cmaxd = Interpolation[dmethyl1, InterpolationOrder -> 3]

Gives the interpolation function. I need to translate this into a crude multi dose model. I need work out how to write a function that works like: cmulti=[cmaxd(t)+cmaxd(t-12)+cmaxd(t-24)...]

I'm having a hard time figuring out how to limit the range of the shifted functions before I add them. Its been ages since I've worked with math software. I am aware of the pharmacokinetic limitations of this kind of model. The DA is using a a wildly unrealistic reference range based on a 1x daily dosage. I just need to rebut that point.

She's really cute. My girlfriend, not the DA.

Thank you for any advice.

share|improve this question
    
I feel as though this question is dependent on some knowledge not included therein. What exactly is the nature of the multi-dose-model you wish to create? Could you give a small example of how you want this to work? – Mr.Wizard 22 hours ago
    
Also why are you using InterpolationOrder -> 3? That appears to produce a very poor fit to the data at least to my eye. – Mr.Wizard 22 hours ago
    
A mathematica help document suggested interpolationOrder 3, i felt like 1 looked better. – Prisoners Dilema 22 hours ago
12  
Umm, "Hire an expert witness" would be the standard way to go about this sort of thing. (Yes, I realize they cost real money.) – Daniel Lichtblau 13 hours ago
3  
Daniel You are absolutely correct. Hire an expert witness is the ideal solution, unfortunately, we had to hire attorneys in two states prior to the blood work coming back which has exhausted most of our available resources(>20k USD so far). The situation has spiraled completely out of control. I'm hesitant to post all of the details as it is a pending legal matter. I am extremely grateful for the help Mr. Wizard, J.M, swisher, and Bobthechemist and ubpdqn have provided so far. I'd like to send you guys an Amazon or iTunes Gift Card for your efforts. I'll PM each of you. – Prisoners Dilema 10 hours ago

Similar to previous answers, only I don't make the instantaneous absorption assumption since it isn't really necessary. The equation can be found here on page three, where ka and ke are the rates of absorption and elimination, respectively, D is the initial dose (in ng), V/F is the Volume of Distribution. The range of apparent volumes of distribution I've seen for Adderall are from 271 (F = 0.92, V = 250 mL) to 485 mL. The previous references give estimates for the absorption rate constant of ~ 1/h and since the elimination rate must be much less than ka in order to get the observed concentration profile, we have parameter estimates of (d = 30000, v = 250, f = 0.92, ka = 1, ke = 0.1). I combine fd/v = const = 110 since the model cannot discriminate these values. I'm assuming that the y axis in the original data is in ng/mL.

f1[t_, ka_, ke_, const_: 0.92*30000/250] := 
 const ka/(ka - ke) (Exp[-ke t] - Exp[-ka t])
nlm = NonlinearModelFit[dmethyl1, 
  f1[t, ka, ke, const], {{ka, 1}, {ke, 0.1}, {const, 110}}, t]

enter image description here

Nonlinear model fitting with reasonable parameter estimates yields a reasonable fit, with ka = 0.72 h^-1, ke = 0.072 h^-1 and fd/v = 56. ke and fd/v appear to be highly correlated; however fixing fd/v to the range of literature values does not appear to change the best-fit parameter values beyond the range of the standard errors.

The bottom of page 3 here provides the multi-dose first-order adsorption/elmination equation, which can be written as

f3[t_, ka_, ke_, const_, dt_, n_] :=
 Sum[const ka/(ka - ke) (Exp[-ke (t - dt i)] - 
     Exp[-ka (t - dt i)]) UnitStep[t - dt i], {i, 0, n}]

where dt is the dosing interval and n is the number of doses. In my simplified case, the dosing interval must be constant and must be the same amount as the original dose. An example with 6 doses spaced 12 hours apart:

Plot[f3[t, ka, ke, const, 12, 6] /. nlm["BestFitParameters"], {t, 0, 
  96}, Frame -> {True, True, False, False}, 
 FrameLabel -> {"Time (h)", "Amount (ng/mL)"}, 
 PlotLabel -> "Multi-dose absorption/elimination curve"]

enter image description here

share|improve this answer
    
That Su paper you linked to is nice. And they're from Merck to boot! – J. M. 13 hours ago
    
@bobthechemist Thank you for this model. The young woman in question has an fairly extreme outlier body type. 44kg, 160cm, BMI 17.5. The data set I drew from SLI381-111 is built from a sample N=18(14m/4f), mean weight = 73kg, mean height = 175cm, mean BMI 24.5. Do you have any recommendation on the best weigh to present an adjustment on the basis of weight? – Prisoners Dilema 7 hours ago
    
Shire's Labeling Claims "Gender Systemic exposure to amphetamine was 20-30% higher in women (N=20) than in men (N=20) due to the higher dose administered to women on a mg/kg body weight basis. When the exposure parameters (Cmax and AUC) were normalized by dose (mg/kg), these differences diminished. Age and gender had no direct effect on the pharmacokinetics of d- and l-amphetamine." Is it reasonable to simply show the adjustment by using 1.3*F3? – Prisoners Dilema 7 hours ago
    
@PrisonersDilema I have no experience in pharmacokinetics (I'm looking at this strictly from a modeling perspective) so my opinion is not terribly useful. Page 17 of the fda report I cite in my answer addresses weight and gender, and you might have some luck wading through that information. – bobthechemist 7 hours ago

Assuming the simplest kinetic model for elimination (and making the simplifying assumption of "instant absorption" to peak concentration):

conc = {{0, 0}, {.25, 1}, {.5, 7}, {1, 26}, {1.5, 40}, {2, 45}, {2.5, 
    45}, {3, 44}, {3.5, 44}, {4, 43}, {4.5, 41}, {5, 39}, {6, 38}, {7,
     37}, {8, 35}, {9, 33}, {10, 32}, {11, 29}, {12, 24}, {24, 
    13}, {48, 4}, {60, 2}, {72, 0}};
lp = ListPlot[conc];
em = conc[[6 ;;]];
nlm = NonlinearModelFit[em, { a Exp[- k t]}, {a, k}, t]
Show[lp, Plot[Evaluate@nlm[t], {t, 2, 72}]]
tc = k /. nlm["BestFitParameters"];
halflife = t /. Quiet[Solve[f[45, t] == 22.5, t][[1]]]
f[a_, t_] := a Exp[- tc t]
p[i_, n_] := Nest[f[#, i] + 45 &, 45, n]
pf[i_, n_] := 
  Total@Table[
    f[p[i, j], t - j i] UnitBox[(t - j i )/i - 1/2], {j, 0, n}];
Manipulate[
 Plot[pf[interval, 10], {t, 0, 10 interval}, Exclusions -> None, 
  PlotRange -> {0, 200}, Frame -> True, 
  GridLines -> {{4 halflife}, None}], {interval, {5, 8, 10, 12, 24}}]

From the single dose the half-life is approximately 12 hours. Therefore, approximately 48 hours to steady state. The Manipulate shows effect of different dosing intervals (10 intervals shown):

enter image description here

share|improve this answer
    
Looks about right to me; +1. But the halflife computation should come after the definition for f, no? – J. M. 20 hours ago

I have no experience with what you are trying to do so this is entirely guesswork but maybe you want something like this?

cmaxd = Interpolation[dmethyl1, InterpolationOrder -> 1];

f1[t_?NumericQ] := If[0 <= t <= 72, cmaxd[t], 0]

f2[t_] := Sum[f1[t - i], {i, 0, t, 12}]

Plot[f2[i], {i, 0, 120}, AxesLabel -> {"hour", "concentration"}]

enter image description here

share|improve this answer
    
It will take me some time to understand what you did, but yes, this looks like what I am going for. Thank you sir. – Prisoners Dilema 22 hours ago
    
@PrisonersDilema Okay, let me know if you have any questions. f1 is just a way to limit the input to the InterpolatingFunction so it doesn't see something outside its range and give erroneous extrapolation. – Mr.Wizard 22 hours ago

You can also do it with some timeseries arithmetic.

Construct $n$ shifted by 12 hours series:

n = 10

doses = Table[TimeSeriesShift[dmethyl1, {k, 12}], {k, 0, n-1}];

Combine them with interpolation order of 0 (extrapolation would be zero outside the domain intervals this way):

Off[InterpolatingFunction::dmval] (* Disable extrapolation warnings *)

ListLinePlot@TimeSeriesThread[Total, doses , 
   ResamplingMethod -> {"Interpolation", InterpolationOrder -> 0}]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.