top of page

SEB113

For solutions, purchase a LIVE CHAT plan or contact us

Due date 11:59pm Sunday 11th September 2022

Introduction
Theophylline is an anti-asthmatic drug that was distributed in tablet form for ingestion orally (American Society of Health-System Pharmacists Inc. 2018). In the last few decades, research has led to the development of inhalers and nebulizers for delivery of a range of different anti-asthmatic drugs (N. and Fitzgerald 2010). Nonetheless, the investigation of theophylline allows us to understand the uptake of a drug from the stomach into the bloodstream and its clearance via the kidneys.
This problem solving task contains two main objectives. The first is to examine, describe, and visualise experimental data that comes from a study of the pharmokinetics of theophylline in patients’ bloodstreams, after an oral administration of the drug. The second is to consider a mathematical model of the system to describe the dynamics (how it changes with time) of theophylline within the bloodstream. You will then use the information you have synthesized from both the experimental data and the mathematical model to answer questions about the behavior of theophylline and the accuracy of the mathematical model.
Section A. Experimental Data [30% Total]
A1 Data Structure (5%)
A1.1 Importing the data
In this section of the problem solving task, you will be investigating the Theoph dataset in R. Note that this is a built-in dataset, and to store it in your environment you simply need to run data(Theoph).
Exercise: How many observations are contained within your data set?
Answer:
Exercise: How many variables are contained within your data set?
Answer:
A1.2 Data Dictionary
Describe the variables contained within the Theoph data. Since this is a built-in dataset, you can access information on it by running ?datasets::Theoph. While the range of the data is a summary statistic, it is customary to include the range of the variables in the data dictionary. For categorical variables, you are only required to give a range if the variable is ordinal, otherwise, use the range column in the table below to describe the nominal categories. Use descriptive titles for variables rather than the column name in the data set. You may use R for to help you with your data summary.
Exercise: Given the above instructions, complete the table below by adding a new row for each variable in the Theoph data set.
Answer:
Variable Type Units Range



Exercise: Which variable in our data frame represents our outcome/response/dependent variable?
Answer:
Exercise: Which variables in our data frame represents potential explanatory/independent variables?
Answer:
A2 Analysis
A2.1 Numerical summaries (10%)
In this section, you will need to calculate summary statistics that help the reader understand the data without needing to look at the entire dataset.
Ensure your tables have an appropriate number of columns and rows, have horizontal borders in appropriate places and have captions above the table (select the entire table, right click on it and select “Insert Caption” in Microsoft Word).
Where necessary, round to two decimal places and ensure the units are described appropriately.
Summarising total dataset
Exercise: Generate a table that shows the min, mean, median, max and standard deviation of the variables weight and dose. Show all results in one table, rounded to two decimal places (you may need to stitch several tables together).
Answer:
Summarising within each subject
Exercise: Generate a table that shows the minimum, median and maximum concentration for each subject
Answer:
A2.2 Graphical summaries (15%)
In this section, use Tufte’s principles of graphical excellence to guide the creation of ggplot2 figures that help the reader understand the variability in the data. Ensure all code is included in the R script file you upload. All plots are to be labelled appropriately and included at a size and resolution such that the plot is legible. There are many different ways to visualise the data, so don’t feel restricted to one particular type of plot. Ensure your plots have meaningful captions (below the figure) and/or titles.
A2.2.1 Univariate summaries
Exercise: Create a plot that shows the variability in weight.
Answer:
Exercise: Create a plot that shows the variability in dose across all the subjects.
Answer:
Exercise: Create a plot that shows the variability in concentration in each subject.
Answer:
A2.2.2 Multivariate summaries
Exercise: Create a plot that shows how concentration in the blood stream varies with time.
Answer:
Exercise: Create a plot that shows how the concentration varies by time and subject.
Answer:
Exercise: Recreate the plot from the previous activity, but this time add a smooth line of best fit to the data.
Answer:
Section B. Mathematical Model [50% Total]
B1 The System
Download the pst1data.csv data file from Blackboard and individualise it in R by retaining the row that contains your student number. The values in this row will be used for solving and visualising the solution.
B1.1 Conceptual and quantitative model (5%)
The first order compartment model for pharmacokinetics describes the passage of an ingested compound, such as theophylline, from the stomach into the bloodstream. Over the course of a few hours, the amount in the stomach, , and bloodstream, , vary from their initial values.
The compound is absorbed from the stomach into the bloodstream, such that the rate of change of the amount in the stomach is given by the following model:

with initial amount having units mg (milligrams).
Exercise: Given the information about the units of and , state the value of with appropriate units. Show your working/explain your reasoning.
Answer:
The rate of change of the amount in the bloodstream is driven by the absorption from the stomach as well as the clearance of the compound from the bloodstream through the kidneys, with rate parameter . The model is

Exercise: What is an appropriate initial condition for the amount of the compound in the bloodstream? State it with appropriate units.
Answer:
Exercise: Given the information about the units of and , state the value of with appropriate units. Show your working/explain your reasoning.
Answer:
B2. Analysis
B2.1 Solution in the stomach (10%)
Exercise: Show that is the solution to the above differential equation for (equation (1)).
Answer:
B2.2 Solution in the bloodstream
Substituting into the differential equation for (equation (2)) we obtain

A test solution to this differential equation takes the form

where and are constants to be determined.
B2.2.1 Setting up the test solution (10%)
Exercise: Differentiate the test solution above (4) to obtain and call this (5). Show your working.
Answer:
Exercise: Substitute the test solution (4) into the right hand side of the differential equation above (3). Show your working.
Answer:
Exercise: Set the derivative of the test solution (5) equal to the answer from the previous exercise so that you have an expression involving on both left and right hand sides. You should see appear exactly once.
Answer:
B2.2.2 Solving for the parameters in the test solution (15%)
We now need to obtain the values of and that satisfy the above equation.
Exercise: Factorise the above equation by grouping all terms involving together on each side, and all terms involving together on each side.
Answer:
Consider the terms multiplying on each side. These terms inside the brackets on each side must be equal in order for the solution to be valid.
Exercise: Setting the left-hand group with equal to the right hand group with , determine the value of . Show your working.
Answer:
We cannot use the same technique to solve for , unfortunately. We will use our initial condition for to obtain instead.
Exercise: Substitute the value of that you determined into the test solution, set and solve for . Show working.
Answer:
Exercise: Substitute the values of and into the test solution below to obtain .
Answer:
Exercise: For what value of is the amount in the bloodstream at its maximum? Show your working.
Answer:
B3 Visualisation (10%)
Exercise: Copy and paste the below code fragment into your R script file and complete it to be a function that reads in a value of time, , and a vector of parameters for , and returns .
calculate_blood_amount <- function(){

c_0 <-
k_a <-
k_c <-

return()

}
Exercise: Using the values of given to you in the pst1data.csv file, plot the amount of the compound in the bloodstream for the first 24 hours since ingestion. Ensure that your visualisation is readable and clearly labelled. Show, on your plot, the time (in hours) at which the maximum concentration occurs (rounded to two decimal places).
Answer:
Exercise: Create a data frame containing a sequence of times from 0 to 24 hours in fifteen minute increments. Create two columns, Stomach and Bloodstream containing, respectively, the amounts of the compound in the stomach and bloodstream. Create a table showing the concentrations in both the stomach and bloodstream during the first two hours (in fifteen minute increments).
Answer:
Exercise: Create a visualisation that shows and . Hint: you may want to use the gather() function to prepare your data for plotting.
Answer:
Section C. Interpretation [20% Total]
Write 2-3 sentences for each answer, ensuring that you refer back to your results and/or the scientific context of the problem.
Exercise: What happens to the amounts of compound in each of the bloodstream and stomach as ? Why?
Answer:
Exercise: What factors about this system might influence the rates at which the compound is absorbed and cleared? What assumptions might we need to change about our model?
Answer:
Exercise: Consider the context of the problem. Describe why the rate of change of the amount in the blood stream slows from its initial growth before eventually becoming negative.
Answer:
Exercise: Looking at the plots you have creating in each section, what can you say about the accuracy of the mathematical model for Theophylline in the bloodstream (section B) when compared with the real data (section A)?
Answer:
Finishing up
Ensure you include the completed document and your R script file when uploading to Blackboard. Ensure all R code used to generate solutions is included in your .R file.
References
American Society of Health-System Pharmacists Inc. 2018. “Theophylline.” Online: https://medlineplus.gov/druginfo/meds/a681006.html.
N., Shahidi, and J.M. Fitzgerald. 2010. “Current Recommendations for the Treatment of Mild Asthma.” Journal of Asthma and Allergy 3. doi:10.2147/JAA.S14420.

For solutions, purchase a LIVE CHAT plan or contact us

Limited time offer:

Follow us on Instagram and tag 10 friends for a $50 voucher! No minimum purchase required.

bottom of page