Plots regression curves for each set of records defined using by.
A log-linear plot will be made for each curve.
plot_reg(
x,
by = character(0),
th = NA,
bloqvar = "bloq",
timevar = "tad",
depvar = "dv",
timelab = "timevar",
deplab = "depvar",
exclvar = NA,
plotdir = NA,
...
)input dataset name
column names in x indicating grouping variables
file name of file with half-life estimation information for each curve
variable name containing the BLOQ flag (0: no, 1: yes)
variable name containing the actual sampling time after dose
variable name containing the dependent variable (e.g., concentration)
X-axis label (default: "timevar")
Y-axis label (default: "depvar")
variable name containing information about points to be excluded (these should have exclvar = 1)
directory where individual plot files will be saved
ignored
(invisible) plotdir. If the attribute 'plotdir' is empty, plots will be generated in standard output, otherwise plots will be saved as PNG file in the designated directory.
If elimination half-life was estimated for that curve, the following will be indicated in the plot:
Cmax (Yellow, even if no half-life was estimated)
points used in regression and resulting regression line (green)
points excluded from regression (red crossed)
estimate of elimination half-life and adjusted R-squared
Input dataset:
uncorrected dataset, used for half-life estimation
dataset containing results of the half-life estimation
# NOT RUN {
example(est.thalf)
x %>% filter(dv > 0) %>% plot_reg(by = 'subject', th = th)
# }
Run the code above in your browser using DataLab