doWlm {CCWeights} | R Documentation |
Perform Weighted Linear Regression
Description
Perform weighted linear regression and evaluate by using summed residual.
Usage
doWlm(DF, weights = NULL)
Arguments
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" |
Value
list, weighted linear regression result
Author(s)
Yonghui Dong
Examples
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")
[Package CCWeights version 0.1.6 Index]