BestSlope | R Documentation |
It sequentially fits (log(y) ~ x) from the last point of x to the previous points with at least 3 points. It chooses a slope the highest adjusted R-square. If the difference is less then 1e-4, it pickes longer slope.
BestSlope(x, y, adm = "Extravascular", TOL=1e-4, excludeDelta = 1)
x |
vector values of x-axis, usually time |
y |
vector values of y-axis, usually concentration |
adm |
one of |
TOL |
tolerance. See Phoneix WinNonlin 6.4 User's Guide p33 for the detail. |
excludeDelta |
Improvement of R2ADJ larger than this value could exclude the last point. Default value 1 is for the compatibility with other software. |
Choosing the best terminal slope (y in log scale) in pharmacokinetic analysis is somewhat challenging, and it could vary by analysis performer.
Pheonix WinNonlin chooses a slope with highest adjusted R-squared and the longest one. The difference of adjusted R-Squared less than TOL considered to be 0.
This function uses ordinary least square method (OLS). Author recommends to use excludeDelta
option with about 0.3.
R2 |
R-squared |
R2ADJ |
adjusted R-squared |
LAMZNPT |
number of points used for slope |
LAMZ |
negative of the slope, lambda_z |
b0 |
intercept of the regression line |
CORRXY |
correlation of log(y) and x |
LAMZLL |
earliest x for lambda_z |
LAMZUL |
last x for lambda_z |
CLSTP |
predicted y value at the last point, predicted concentration for the last time point |
Kyun-Seop Bae <k@acr.kr>
Slope
BestSlope(Theoph[Theoph$Subject==1, "Time"], Theoph[Theoph$Subject==1, "conc"])
BestSlope(Indometh[Indometh$Subject==1, "time"], Indometh[Indometh$Subject==1, "conc"],
adm="Bolus")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.