Title: | Perform Weighted Linear Regression for Calibration Curve |
---|---|
Description: | Automated assessment and selection of weighting factors for accurate quantification using linear calibration curve. In addition, a 'shiny' App is provided, allowing users to analyze their data using an interactive graphical user interface, without any programming requirements. |
Authors: | Yonghui Dong |
Maintainer: | Yonghui Dong <[email protected]> |
License: | GPL-3 |
Version: | 0.1.6 |
Built: | 2025-02-02 03:56:14 UTC |
Source: | https://github.com/yonghuidong/ccweights |
Perform calibration
doCalibration(DF, weights = NULL)
doCalibration(DF, weights = NULL)
DF |
data frame, it must contain a column named 'Concentration' and a column named 'Response' |
weights |
default is NULL |
dataframe, the quantification result
Yonghui Dong
Concentration <- rep(c(10, 50, 100, "unknown"), each = 3) Response <- c(133, 156, 177, 6650, 7800, 8850, 13300, 15600, 17700, 156, 1450, 1400) DF <- cbind.data.frame(Concentration = Concentration, Response = Response) result <- doCalibration(DF)
Concentration <- rep(c(10, 50, 100, "unknown"), each = 3) Response <- c(133, 156, 177, 6650, 7800, 8850, 13300, 15600, 17700, 156, 1450, 1400) DF <- cbind.data.frame(Concentration = Concentration, Response = Response) result <- doCalibration(DF)
Evaluate different weighting factors.
doEvaluation(DF, p = 0.05, userWeights = NULL)
doEvaluation(DF, p = 0.05, userWeights = NULL)
DF |
data frame, it must contain a column named 'Concentration' and a column named 'Response' |
p |
p-value, default is 0.05 |
userWeights |
user defined weights in linear regression, default is NULL. User can easily define weights, e.g., "1/x", "1/x^2", "1/y" |
dataframe, weighting factor evaluation result
Yonghui Dong
Concentration <- rep(c(10, 50, 100, 500), each = 3) Response <- c(133, 156, 177, 1300, 1450, 1600, 4000, 3881, 3700, 140000, 139000, 140000) DF <- cbind.data.frame(Concentration = Concentration, Response = Response) result <- doEvaluation(DF)
Concentration <- rep(c(10, 50, 100, 500), each = 3) Response <- c(133, 156, 177, 1300, 1450, 1600, 4000, 3881, 3700, 140000, 139000, 140000) DF <- cbind.data.frame(Concentration = Concentration, Response = Response) result <- doEvaluation(DF)
perform F test to evaluate homoscedasticity.
doFtest(DF, p = 0.01, lower.tail = FALSE)
doFtest(DF, p = 0.01, lower.tail = FALSE)
DF |
data frame, it must contain a column named 'Concentration' and a column named 'Response' |
p |
p-value |
lower.tail |
default is FALSE |
dataframe, F test result
Yonghui Dong
Concentration <- rep(c(10, 50, 100, 500), each = 3) Response <- c(133, 156, 177, 1300, 1450, 1600, 4000, 3881, 3700, 140000, 139000, 140000) DF <- cbind.data.frame(Concentration, Response) result <- doFtest(DF, p = 0.01)
Concentration <- rep(c(10, 50, 100, 500), each = 3) Response <- c(133, 156, 177, 1300, 1450, 1600, 4000, 3881, 3700, 140000, 139000, 140000) DF <- cbind.data.frame(Concentration, Response) result <- doFtest(DF, p = 0.01)
Perform weighted linear regression and evaluate by using summed residual.
doWlm(DF, weights = NULL)
doWlm(DF, weights = NULL)
DF |
data frame, it must contain a column named 'Concentration' and a column named 'Response' |
weights |
the weights used in linear regression, default is NULL. User can easily define weights, e.g., "1/x", "1/x^2", "1/y" |
list, weighted linear regression result
Yonghui Dong
Concentration <- rep(c(10, 50, 100, 500), each = 3) Response <- c(133, 156, 177, 1300, 1450, 1600, 4000, 3881, 3700, 140000, 139000, 140000) DF <- cbind.data.frame(Concentration = Concentration, Response = Response) result <- doWlm(DF, weights = "1/x^2")
Concentration <- rep(c(10, 50, 100, 500), each = 3) Response <- c(133, 156, 177, 1300, 1450, 1600, 4000, 3881, 3700, 140000, 139000, 140000) DF <- cbind.data.frame(Concentration = Concentration, Response = Response) result <- doWlm(DF, weights = "1/x^2")
Two example data set: one with internal standards (IS), and one without IS
expData
expData
A list with 2 data frames:
the example data without IS
the example data with IS
Run CCWeights Gui.
runGui()
runGui()
Gui
Yonghui Dong
if(interactive()){}
if(interactive()){}