licensed under a . Your use of this Creative Commons Attribution-NonCommercial-ShareAlike License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License. Your use of this
material constitutes acceptance of that license and the conditions of use of materials on this site.
Copyright 2006, The Johns Hopkins University and Karl W. Broman. All rights reserved. Use of these materials
permitted only in accordance with license rights granted. Materials provided “AS IS”; no representations or
warranties provided. User assumes all responsibility for use, and all liability related thereto, and must independently
review all materials for accuracy and efficacy. May contain materials owned by others. User is responsible for
obtaining permissions for use from third parties as needed.
A biochemical experiment
Michaelis-Menten equation
160
V =
initial velocity
140
Vmax × C
K +C
120
100
V = initial velocity
80
C = concentration
60
Vmax = maximum velocity
0.0
0.2
0.4
0.6
0.8
1.0
K = rate constant
concentration
Linearize
V =
⇒
1
K +C
=
V
Vmax × C
=
⇒
Vmax × C
K +C
1
=
V
1
K
+
Vmax × C Vmax
1
Vmax
+
K
Vmax
1
×
C
Fit the line
Model:
0.020
1 / initial velocity
0.018
1
= β0 + β1
V
0.016
0.014
0.012
Intercept
Slope
0.010
1
+ error
C
0.00697
0.00022
0.008
0.006
0
10
20
30
40
50
V̂max = 1/Intercept = 1/0.00697
= 143
1 / concentration
K̂ = Slope × V̂max = 0.031
Residuals vs fitted values
Which is more reasonable?
0.002
1
= β0 + β1
V
Residuals
0.001
0.000
−0.001
V =
−0.002
0.008
0.010
0.012
0.014
Fitted values
0.016
0.018
1
+ error
C
Vmax × C
+ error
K+C
Nonlinear regression
We imagine that
Vi =
Vmax × Ci
+ ǫ,
K + Ci
ǫ ∼ iid normal(0, σ 2)
We estimate Vmax and K by the values for which
!2
X
V̂max × Ci
RSS =
Vi −
K̂ + Ci
i
is minimized.
−→ An iterative method; need “starting values”.
Nonlinear regression in R
> library(nls)
> nls.out <- nls(vel ˜ (Vm * conc) / (K + conc),
data=mydata,
start = c(Vm=143, K=0.031))
> summary(nls.out)$param
Vm
K
Est
160.28
0.048
SE
6.48
0.008
t-val
24.7
6.1
P-val
1.4e-09
1.7e-04
The fit
Residuals vs fitted values
Nonlinear regression
20
160
15
140
Residuals
initial velocity
10
120
Regr of 1/V on 1/C
100
80
5
0
−5
−10
60
−15
0.0
0.2
0.4
0.6
0.8
1.0
60
80
concentration
100
120
140
Fitted values
A second set of data
V =
initial velocity
200
(Vmax + ∆Vmax x) × C
+ error
(K + ∆K x) + C
150
x = 0/1 if cells were
untreated/treated.
100
treated
untreated
50
0.0
0.2
0.4
0.6
concentration
0.8
1.0
Estimation in R
> nls.outC <- nls(vel ˜ ((Vm +dV * x) * conc)/
(K + dK*x + conc),
data=puro,
start=c(Vm=160, K=0.048, dV=0, dK=0))
> summary(nls.outC)$param
Vm
K
dV
dK
Est
160.28
0.048
52.40
0.016
SE
6.90
0.008
9.55
0.011
t-val
23.2
5.8
5.5
1.4
P-val
2.0e-15
1.5e-05
2.7e-05
1.7e-01
K’s equal vs not
200
initial velocity
150
100
treated
untreated
K’s =
K’s not =
50
0.0
0.2
0.4
0.6
concentration
0.8
1.0
From last time...
800
y
600
400
y = β0 + β1x + β2x2 + β3x3 + ε
200
10
20
30
40
50
60
70
x
An alternative model
Linear “spline”
y=
R code:

 β0 + β1 x + ǫ
if x ≤ x0
 β + β x + ǫ if x ≥ x
0
1 0
0
> f <- function(x,b0,b1,x0)
ifelse(x<x0, b0+b1*x, b0+b1*x0)
> nls.out <- nls(y ˜ f(time,b0,b1,x0), data=mydata,
start=c(b0=200, b1=100, x0=30))
> summary(nls.out)$param
Est
SE t-val
b0
-146
71.3
-2.0
b1
39
4.3
9.0
x0
26
1.8
14.6
P-val
5.8e-02
2.1e-07
2.9e-10
80
Results
1200
1000
y
800
600
400
200
0
0
20
40
60
80
100
x
One last example...
0.48
y = a + be−ct + ε
chlorine
0.46
0.44
0.42
0.40
0.38
10
15
20
25
time
30
35
40
R code
> nls.out <- nls(chlorine ˜ a + b*exp(-c*time), data=cl,
start=c(a=0.05, b=0.49, c=0.1))
> summary(nls.out)$param
a
b
c
Est
0.390
0.219
0.099
SE
0.006
0.031
0.018
t-val
66.7
7.0
5.5
P-val
1.9e-43
1.7e-08
2.4e-06