0

I am trying to calculate rate for the following data. I tried Michaelis menten equation, however, Km was coming negative. I am now trying to fit hill equation, but I am getting error message. I think my starting values are not so good. Any help will be very appreciated.

Thanks, Krina

x<- c(0.0,  2.5,  5.0, 10.0, 25.0)
y <- c(4.91, 1.32, 1.18, 1.12, 1.09)

fo <- y~(Emax*(x^hill)/((EC50^hill)+(x^hill)))
st <- c(Emax=1.06, EC50=0.5, hill=1)

fit <- nls(fo, data = data.frame(x, y), start = st, trace = T)

Error in numericDeriv(form[[3L]], names(ind), env) : 
  Missing value or an infinity produced when evaluating the model
Krina M
  • 135
  • 2
  • 13
  • you should have a look at your data by plotting it. The way x and y are defined, there is no way you are going to fit MM, with or without Hill coefficients >1. – David Heckmann Mar 13 '17 at 23:35
  • Since you seem open to a variety of equations try the various ones in the drc package using the `drm` function. – G. Grothendieck Mar 14 '17 at 01:18

2 Answers2

1

I fit the data you posted to a few hundred known, named equations using a genetic algorithm for initial parameter estimation and found an excellent fit to a simple power law equation as follows (also see attached graph):

y = (a + x)b + Offset

a =  3.6792869983309306E-01
b = -1.3439157691306818E+00
Offset =  1.0766655470363218E+00

Degrees of freedom (error): 2
Degrees of freedom (regression): 2
Chi-squared: 1.98157151386e-06
R-squared: 0.999999822702
R-squared adjusted: 0.999999645405
Model F-statistic: 5640229.45337
Model F-statistic p-value: 1.77297720061e-07
Model log-likelihood: 29.7579529506
AIC: -10.7031811802
BIC: -10.9375184328
Root Mean Squared Error (RMSE): 0.000629534989315

a = 3.6792869983309306E-01
  std err: 2.36769E-06
  t-stat: 2.39112E+02
  p-stat: 1.74898E-05
  95% confidence intervals: [3.61308E-01, 3.74549E-01]

b = -1.3439157691306818E+00
  std err: 2.91468E-05
  t-stat: -2.48929E+02
  p-stat: 1.61375E-05
  95% confidence intervals: [-1.36714E+00, -1.32069E+00]

Offset = 1.0766655470363218E+00
  std err: 9.37265E-07
  t-stat: 1.11211E+03
  p-stat: 8.08538E-07
  95% confidence intervals: [1.07250E+00, 1.08083E+00]

Coefficient Covariance Matrix
  [ 2.38970842 -8.3732707   1.30483649]
  [ -8.3732707   29.41789844  -4.52058247]
  [ 1.30483649 -4.52058247  0.94598199]

model plot

James Phillips
  • 4,526
  • 3
  • 13
  • 11
0

I was able to get a good fit using log-logistic model in drc library. However, I am not able to find parameters definition for this model. Is it similar to hill model with log transformation?

library(drc)
fit.ll <- drm(y~x, data=data.frame(x,y), fct=LL.5(), type="continuous")
print(summary(fit.ll))
plot(fit.ll)

example output fit

Bonlenfum
  • 19,101
  • 2
  • 53
  • 56
Krina M
  • 135
  • 2
  • 13
  • Try `?LL.5` to get help. Also note that you are fitting 5 points with a 5 parameter model so you will be overfitting. You might want to try a model with fewer parameters such as AR.3. – G. Grothendieck Mar 14 '17 at 04:00