plotFit: Plot best fit slope

View source: R/plotFit.R

plotFitR Documentation

Plot best fit slope

Description

Automatically select best fit slope for the given x(usually time) and log(y)(usually concentration) values.

Usage

plotFit(concData, id, Time, conc, mol = "", adm = "Extravascular", ID = "", Mol = "")

Arguments

concData

name of data table containing time-concentration data of multiple subjects

id

column name for subject ID

Time

column name for the time

conc

column name for the concentration

mol

column name for molecular species

adm

one of "Bolus" or "Infusion" or "Extravascular" to indicate drug administration mode

ID

Subject ID for this plot

Mol

the name of molecular species to see

Details

Find the best fit slope then plot it. Currently this function uses ordinary least square method(OLS) only. This function calles BestSlope function.

Value

R2

R-squared

R2ADJ

adjusted R-squared

LAMZNPT

number of points used for slope

LAMZ

negative of slope, lambda_z

b0

intercept of 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 last point, predicted concentration for the last time point

Author(s)

Jee Eun Lee <JeeEun.Lee@fda.hhs.gov>

See Also

BestSlope

Examples

plotFit(Theoph, "Subject", "Time", "conc", ID="1")
plotFit(Indometh, "Subject", "time", "conc", adm="Bolus", ID="1")

pkr documentation built on June 11, 2022, 9:05 a.m.