Fit Emax model to data

Estimate parameters Emax, EC50 and Hill parameter from x and y values provided with a data frame. Error model parameters are estimated alongside the model parameters via a maximum- likelihood approach.

fit_EmaxModel(data, Emax = NULL, EC50 = NULL, Hill = NULL, y0 = 0,
  errmodel = "abs", log10Data = "")

Arguments

data

data frame with x values (first column) and y values (second column).

Emax

assume Emax to be fixed on this value. If NULL, Emax is estimated.

EC50

assume EC50 to be fixed on this value. If NULL, EC50 is estimated.

Hill

assume Emax to be fixed on this value. If NULL, Hill is estimated.

y0

assume y0 (intercept) to be fixed on this value. If NULL, y0 is estimated.

errmodel

the error model to be use, either "abs" (absolute error), "rel" (proportional error) or "absrel" (absolute + proportional error).

log10Data

specifies if x or y values are log10-transformed. Possible values are "x" (first column contains log10-values), "y" (second column contains log10-values), "xy" (both columns contain log10-values) or "" (no column contains log10-values).

Value

list with

  • objval (final objective function value, -2*log(L))

  • converged (convergence TRUE or FALSE)

  • iterations (number of iterations)

  • parameters (data frame of parameter values, estimated and fixed)

  • prd (prediction function to evaluate the fitted model at new x values)

  • prediction (predicted values at the x values provded with data)

  • plot (function that produces a plot)

  • table (parameter estimation table)

Details

The model y = y0 + Emax * x^Hill / (EC50^Hill + x^Hill) is fitted to the x and y values provided with data. The fit is based on minimization of twice the negative log-likelihood (-2*log(L)).

See also

Examples

mydata <- data.frame( log10Conc = log10(1:10), Value = 5*(1:10)^5/(4^5 + (1:10)^5) + rnorm(10, 0, .1) ) myfit <- fit_EmaxModel(mydata, errmodel = "abs", log10Data = "x") myfit$table
#> Name | Value | SE | RSE | Fixed #> ------------------------------------------- #> EC50 | 3.994 | 0.030 | 0.7436% | FALSE #> Emax | 4.890 | 0.038 | 0.7670% | FALSE #> Hill | 5.81 | 0.24 | 4.06% | FALSE #> y0 | 0 | -- | --% | TRUE #> sigma_abs | 0.086 | 0.014 | 15.8% | FALSE #> sigma_rel | 0 | -- | --% | TRUE
myfit$plot()