powered by
Automatically select best fit slope for the given x(usually time) and log(y)(usually concentration) values.
plotFit(concData, id, Time, conc, mol = "", adm = "Extravascular", ID = "", Mol = "")
name of data table containing time-concentration data of multiple subjects
column name for subject ID
column name for the time
column name for the concentration
column name for molecular species
one of "Bolus" or "Infusion" or "Extravascular" to indicate drug administration mode
"Bolus"
"Infusion"
"Extravascular"
Subject ID for this plot
the name of molecular species to see
R-squared
adjusted R-squared
number of points used for slope
negative of slope, lambda_z
intercept of regression line
correlation of log(y) and x
earliest x for lambda_z
last x for lambda_z
predicted y value at last point, predicted concentration for the last time point
Find the best fit slope then plot it. Currently this function uses ordinary least square method(OLS) only. This function calles BestSlope function.
BestSlope
# NOT RUN { plotFit(Theoph, "Subject", "Time", "conc", ID="1") plotFit(Indometh, "Subject", "time", "conc", adm="Bolus", ID="1") # }
Run the code above in your browser using DataLab