estimate: Estimate Samples from Standard Curve

Description Usage Arguments Details Value Author(s) Examples

View source: R/estimate.R

Description

This function will estimate the unknown variable (example: concentration) based on a standard curve.

Usage

1
estimate (data, colname = "blankminus", fitformula = fiteq, method = "linear/nplr")

Arguments

data

data in dataframe format

colname

column name whose values has to be estimated

fitformula

formula used for fitting standard curve

method

method = "linear" if standard curve is linear in nature. method = "nplr" if standard curve is nonparametric logistic curve.

Details

For linear standard curve 'fitformula' need to generated using lm. For nonparametric logistic curve 'fitformula' need to generated using nplr.

Value

A dataframe with estimated values added to right as a new column "estimated".

Author(s)

A.A Palakkan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## loading data
data(data_DF1)

## Filtering standards
std<- dplyr::filter(data_DF1, data_DF1$id=="STD")
std <- aggregate(std$blankminus ~ std$concentration, FUN = mean )
colnames (std) <-c("con", "OD")

## 3-parametric regression curve fitting
fit1<-nplr::nplr(std$con,std$OD,npars=3,useLog = FALSE)

## Linear regression curve fitting
fit2<- stats::lm(formula = con ~ OD,data = std)

## Estimating the 'blankminus'
## eg:1 Based on nonparametric logistic regression fitting
estimated_nplr <- estimate(data_DF1,colname = "blankminus",fitformula = fit1,method = "nplr")

## eg:2 Based on linear regression fitting
estimated_lr<-estimate(data_DF1,colname="blankminus",fitformula=fit2,method="linear")

bioassays documentation built on Oct. 23, 2020, 6:48 p.m.