Skip to content

Not sure this is something R could do but it feels like it should be.

6 messages · Polwart Calum (County Durham and Darlington NHS Foundation Trust), Marc Schwartz, Jim Lemon +2 more

#
On Jun 6, 2013, at 10:03 AM, Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS FOUNDATION TRUST) <calum.polwart at nhs.net> wrote:

            
The first place I would start is with the two relevant CRAN Task Views:

  http://cran.r-project.org/web/views/ClinicalTrials.html

and

  http://cran.r-project.org/web/views/Pharmacokinetics.html


There is also another package not listed above that might be relevant:

  http://cran.r-project.org/web/packages/scaRabee/


Regards,

Marc Schwartz
#
On 06/07/2013 01:03 AM, Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS
FOUNDATION TRUST) wrote:
Hi Calum,
I can only answer from the perspective of someone who calculated doses 
of alcohol for experimental subjects many years ago. It was not possible 
to apply a linear function across the range due to a number of factors. 
One is that BAC, which was the target value, is dependent upon the 
proportion of the weight that represents the water compartment of the 
body. This varies with both weight (heavier people typically have a 
higher proportion of fat) and sex (women also tend to have slightly more 
fat). The real monkey wrench in the works was absorption rate, which 
often made nonsense of my calculations. This may not be as important in 
therapeutic drugs, for we were aiming at a specified BAC at a certain 
time after dosing rather than an average level. However, I suspect that 
many therapeutic drugs have a different dose by weight for children (we 
weren't dosing children) and choosing a starting point at the bottom of 
the range would almost certainly introduce a systematic error. My 
intuition would be to anchor the dosage rate in the middle of the scale 
and then extrapolate in both directions (adults only, of course).

Jim
2 days later
#
All those things affect therapeutic dosing.

I may have oversimplified what we are trying to achieve to avoid 
getting bogged down in the detail of what we are trying to achieve and 
provide something people might be able to relate to.

However, we can assume that they are already sorted out, so we know the 
theoretically know what the 'correct' dose is for a patient.  The hard 
bit is unless you want to give everyone liquid so you can measure any 
dose possible you have to have a dose that is a multiple of something 
(Amoxicillin doses in adults are multiples of 250 because thats the size 
of the capsule).

What we are trying to do is determine the most appropriate number to 
make the capsules.  (Our dosing is more complex but lets stick to 
something simple.  I can safely assure you that vritually no-one 
actually needs 250 or 500mg as a dose of amoxicillin... ...thats just a 
dose to get them into a therapeutic window, and I'm 99% certain 250 and 
500 are used coz they are round numbers.  if 337.5 more reliably got 
everyone in the window without kicking anyone out the window that'd be a 
better dose to use!  So... what I'm looking to do is model the 
'theoretical dose required' (which we know) and the dose delivered using 
several starting points to get the 'best fit'.  We know they need to be 
within 7% of each other, but if one starting point can get 85% of doses 
within 5% we think that might be better than one that only gets 50% 
within 5%.
We are actually using a starting point that may be middle and going up 
and down if need be.

I think what we may want to do is run a loop through each weight (in 
1kg increments) and calculate their theoretical dose, and the dose for 
each possible starting point (there are certain contraints on that 
already so there may only be 20 possible start points), then we 
calculate the % variance for each dose to theoretical dose and calculate 
the Area Under & Above (some will be negative) the curve and the one 
that has the lowest AUC is then the one that most "precisely" will dose 
the patient...?
#
On Jun 9, 2013, at 6:14 AM, Calum Polwart wrote:

            
I think you may have under-simplified rather than over-simplified. There is no such thing as getting "bogged down in detail". We need all the relevant details. I suspect that you have in mind a situation where you have multiple drugs and multiple forms in which they can be administered and are hoping for a processing method that "rounds" to the nearest tespoonful or tablet size given some set of patient specific factors such as age sex height or weight. If my guess is correct then you need to offer a sample set of data of at least theree types for A) drugs and phamacokinetic parameters, B) dosage forms, C) patient features. You also need to supply rules for "rounding" to he nearest "nice" unit of administration.
You need to describe explicitly how that determination is made.
I think you need to classify what pharmacokinetics apply to a particular drug (zeroth,  or first order kinetics, volume of distribution affected by <whatever>) and choose from a limited number of heuristics for drugs rahter than solving each case from first principles.
#
On 06/09/2013 11:14 PM, Calum Polwart wrote:
Okay, I think I see what you are attempting now. You are stuck with 
fairly large dosage increments (say powers of two) and you want to have 
a "base" value that will be appropriate for the greatest number of 
patients. So, your range of doses can be generated with:

d * 2 ^ (0:m)

where d is some constant and m+1 is the number of doses you want to 
generate. For your amoxcillin, d=250 and m=1, so you get 250 and 500mg. 
Given this relationship (or any other one you can define), you want to 
set your base dose so that it is close to the mode of the patient 
distribution. This means that the greatest number of patients will be 
suitably dosed with your base dose. I would probably try to solve this 
by brute force, setting the base dose at the mode and then moving it up 
and down until the dose was appropriate for the largest number of patients.

However, there are a lot of people on this list who would be more 
familiar with this sort of problem, and there may be a more elegant 
solution.

Jim