best.singlefit: best.singlefit

Description Usage Arguments Value Examples

View source: R/dose_response_fitting.R

Description

Function where linear and several non-linear models are used to fit the curve of single drug effects using drm from the drc package.

Usage

1
2
best.singlefit(data, resp = "Birth_rate", conc = "CONC",
  type = "continuous", IC = "AIC", compare = FALSE, ...)

Arguments

data

Concentration-effect dataframe.

resp

Name of the column with the response values. Default is Birth_rate.

conc

Name of the column with the drug concentration values.

type

a character string specifying the data type (parameter estimation will depend on the data type as different log likelihood function will be used).

IC

string for supplying the information criterion to be used. "AIC" and "BIC" are the two options. "AIC" by default.

compare

logical indicating if the result of all the compared models should be returned (TRUE) or only the result of the model with the lowest AIC/BIC (FALSE, default)

...

Additional arguments for the selection of the best model fitting function. See ?model.select for more info.

Value

This function returns the best model fitted to the data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(AU565_dataset) 
#Fit the data with a 4 parameter log-logistic function:
best.singlefit(AU565_dataset,resp="Viable.cells",conc="CONC")
# The best model is the 3 parameter log-logistic function. See ?drc::LL.3
#To see the objective function and AIC of all the compared functions, 
# use the compare argument of the function:
best.singlefit(AU565_dataset,resp="Viable.cells",conc="CONC",compare=T)

## End(Not run)

Michorlab/ACESO documentation built on June 4, 2021, 4:57 p.m.