Helper function for linear models

Description

This function helps process linear models, such as patlak.plot or logan.plot. It finds the optimal fitting point by calling findbestfit and proceeeds to compute the kinetic parameters, that will mostly consist of the intercept and slope of the linear regression, along with their standard errors.

Usage

1
  processlinear(termx, termy, plot = TRUE, ...)

Arguments

termx,termy

The x and y values of the graph.

plot

Should the result be shown? Defaults to TRUE.

...

Further parameters for the plot function.

Details

It plot is set to TRUE, the regression will be shown on screen. The data points used to compute the regression are displayed with a filled style, while the ones that have not been used are displayed using open circles.

Value

Returns a list with three fields: kparms, the computed kinetic parameters; stderrors, the standard errors for each parameter as a percentage; fit, the actual fitted object.