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)).