Description Usage Arguments Details Value Author(s) See Also Examples
Computes linear model using the robust linear regression.
1 | lm.coefs(x, y, method.reg)
|
x |
a vector of ordinate values. |
y |
a vector of abscissa values. |
method.reg |
defines the method ("rfit", "lmrob", "rq", "least") for the linear regression. |
lm.coefs
is a convenient wrapper around few functions performing
normal (least squares) and robust linear regression. If the robust linear
regression is impossible, lm.coefs
will give a warning and perform linear
regression using the least squares method.
This function can be used to calculate the background of an amplification
curve. The coefficients of the analysis can be used for a trend based
correction of the entire data set.
A data frame with one column and two rows representing coefficients of the linear model.
Stefan Roediger, Michal Burdukiewicz
1 2 3 4 5 6 7 8 9 10 11 | plot(VIMCFX96_69[, 1], VIMCFX96_69[, 2], type = "l", xlab = "Cycle",
ylab = "Fluorescence")
rect(1,0,10,5000)
method <- c("lmrob", "rq", "least", "rfit")
for (i in 1:4) {
tmp <- lm.coefs(VIMCFX96_69[1:10, 1], VIMCFX96_69[1:10, 2],
method.reg = method[i])
abline(a = tmp[1, 1], b = tmp[2, 1], col = i + 1, lwd = 1.5)
}
legend(2, 3000, c("Data", "lmrob", "rq", "least", "rfit"), lty = 1, col = 1:5,
cex = 1.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.