aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/transform_odeparms.html
blob: c14740c27cdc224f87ef14dd309d5b20be223921 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
  <head>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms • mkin</title>

<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">


<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>

<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->


  </head>

  <body>
    <div class="container template-reference-topic">
      <header>
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="../index.html">mkin</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../reference/index.html">Functions and data</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
    Articles
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
    <li>
      <a href="../articles/mkin.html">Introduction to mkin</a>
    </li>
    <li>
      <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
    </li>
    <li>
      <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
    </li>
    <li>
      <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
    </li>
    <li>
      <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
    </li>
  </ul>
</li>
<li>
  <a href="../news/index.html">News</a>
</li>
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="http://github.com/jranke/mkin">
    <span class="fa fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      
      </header>

      <div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Functions to transform and backtransform kinetic parameters for fitting</h1>
    </div>

    
    <p>The transformations are intended to map parameters that should only take
  on restricted values to the full scale of real numbers. For kinetic rate
  constants and other paramters that can only take on positive values, a
  simple log transformation is used. For compositional parameters, such as
  the formations fractions that should always sum up to 1 and can not be
  negative, the <code><a href='ilr.html'>ilr</a></code> transformation is used.</p>
<p>The transformation of sets of formation fractions is fragile, as it supposes
  the same ordering of the components in forward and backward transformation.
  This is no problem for the internal use in <code><a href='mkinfit.html'>mkinfit</a></code>.</p>
    

    <pre class="usage"><span class='fu'>transform_odeparms</span>(<span class='no'>parms</span>, <span class='no'>mkinmod</span>,
                   <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>backtransform_odeparms</span>(<span class='no'>transparms</span>, <span class='no'>mkinmod</span>,
                       <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>parms</th>
      <td><p>Parameters of kinetic models as used in the differential equations.</p></td>
    </tr>
    <tr>
      <th>transparms</th>
      <td><p>Transformed parameters of kinetic models as used in the fitting procedure.</p></td>
    </tr>
    <tr>
      <th>mkinmod</th>
      <td><p>The kinetic model of class <code><a href='mkinmod.html'>mkinmod</a></code>, containing the names of
    the model variables that are needed for grouping the formation fractions
    before <code><a href='ilr.html'>ilr</a></code> transformation, the parameter names and
    the information if the pathway to sink is included in the model.</p></td>
    </tr>
    <tr>
      <th>transform_rates</th>
      <td><p>Boolean specifying if kinetic rate constants should be transformed in the
    model specification used in the fitting for better compliance with the
    assumption of normal distribution of the estimator. If TRUE, also
    alpha and beta parameters of the FOMC model are log-transformed, as well
    as k1 and k2 rate constants for the DFOP and HS models and the break point tb
    of the HS model.</p></td>
    </tr>
    <tr>
      <th>transform_fractions</th>
      <td><p>Boolean specifying if formation fractions constants should be transformed in the
    model specification used in the fitting for better compliance with the
    assumption of normal distribution of the estimator. The default (TRUE) is
    to do transformations. The g parameter of the DFOP and HS models are also
    transformed, as they can also be seen as compositional data. The
    transformation used for these transformations is the <code><a href='ilr.html'>ilr</a></code>
    transformation.</p></td>
    </tr>
    </table>
    
    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>A vector of transformed or backtransformed parameters with the same names
  as the original parameters.</p>
    

    <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
    <pre class="examples"><div class='input'><span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span>
<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>summary</span>(<span class='no'>fit</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>) <span class='co'># See transformed and backtransformed parameters</span></div><div class='output co'>#&gt; mkin version:    0.9.45.2 
#&gt; R version:       3.4.0 
#&gt; Date of fit:     Fri May  5 12:46:24 2017 
#&gt; Date of summary: Fri May  5 12:46:24 2017 
#&gt; 
#&gt; Equations:
#&gt; d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
#&gt; d_m1/dt = + k_parent_m1 * parent - k_m1_sink * m1
#&gt; 
#&gt; Model predictions using solution type deSolve 
#&gt; 
#&gt; Fitted with method Port using 153 model solutions performed in 0.61 s
#&gt; 
#&gt; Weighting: none
#&gt; 
#&gt; Starting values for parameters to be optimised:
#&gt;                  value   type
#&gt; parent_0      100.7500  state
#&gt; k_parent_sink   0.1000 deparm
#&gt; k_parent_m1     0.1001 deparm
#&gt; k_m1_sink       0.1002 deparm
#&gt; 
#&gt; Starting values for the transformed parameters actually optimised:
#&gt;                        value lower upper
#&gt; parent_0          100.750000  -Inf   Inf
#&gt; log_k_parent_sink  -2.302585  -Inf   Inf
#&gt; log_k_parent_m1    -2.301586  -Inf   Inf
#&gt; log_k_m1_sink      -2.300587  -Inf   Inf
#&gt; 
#&gt; Fixed parameter values:
#&gt;      value  type
#&gt; m1_0     0 state
#&gt; 
#&gt; Optimised, transformed parameters with symmetric confidence intervals:
#&gt;                   Estimate Std. Error  Lower   Upper
#&gt; parent_0            99.600    1.61400 96.330 102.900
#&gt; log_k_parent_sink   -3.038    0.07826 -3.197  -2.879
#&gt; log_k_parent_m1     -2.980    0.04124 -3.064  -2.897
#&gt; log_k_m1_sink       -5.248    0.13610 -5.523  -4.972
#&gt; 
#&gt; Parameter correlation:
#&gt;                   parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink
#&gt; parent_0           1.00000            0.6075        -0.06625       -0.1701
#&gt; log_k_parent_sink  0.60752            1.0000        -0.08740       -0.6253
#&gt; log_k_parent_m1   -0.06625           -0.0874         1.00000        0.4716
#&gt; log_k_m1_sink     -0.17006           -0.6253         0.47164        1.0000
#&gt; 
#&gt; Residual standard error: 3.211 on 36 degrees of freedom
#&gt; 
#&gt; Backtransformed parameters:
#&gt; Confidence intervals for internally transformed parameters are asymmetric.
#&gt; t-test (unrealistically) based on the assumption of normal distribution
#&gt; for estimators of untransformed parameters.
#&gt;                Estimate t value    Pr(&gt;t)     Lower     Upper
#&gt; parent_0      99.600000  61.720 2.024e-38 96.330000 1.029e+02
#&gt; k_parent_sink  0.047920  12.780 3.050e-15  0.040890 5.616e-02
#&gt; k_parent_m1    0.050780  24.250 3.407e-24  0.046700 5.521e-02
#&gt; k_m1_sink      0.005261   7.349 5.758e-09  0.003992 6.933e-03
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.398       4 15
#&gt; parent     6.827       3  6
#&gt; m1         4.490       1  9
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_sink 0.4855
#&gt; parent_m1   0.5145
#&gt; m1_sink     1.0000
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   7.023  23.33
#&gt; m1     131.761 437.70</div><div class='input'>

<span class='no'>fit.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; mkin version:    0.9.45.2 
#&gt; R version:       3.4.0 
#&gt; Date of fit:     Fri May  5 12:46:26 2017 
#&gt; Date of summary: Fri May  5 12:46:26 2017 
#&gt; 
#&gt; Equations:
#&gt; d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent
#&gt; d_m1/dt = + k_parent_m1 * parent - k_m1_sink * m1
#&gt; 
#&gt; Model predictions using solution type deSolve 
#&gt; 
#&gt; Fitted with method Port using 352 model solutions performed in 1.437 s
#&gt; 
#&gt; Weighting: none
#&gt; 
#&gt; Starting values for parameters to be optimised:
#&gt;                  value   type
#&gt; parent_0      100.7500  state
#&gt; k_parent_sink   0.1000 deparm
#&gt; k_parent_m1     0.1001 deparm
#&gt; k_m1_sink       0.1002 deparm
#&gt; 
#&gt; Starting values for the transformed parameters actually optimised:
#&gt;                  value lower upper
#&gt; parent_0      100.7500  -Inf   Inf
#&gt; k_parent_sink   0.1000     0   Inf
#&gt; k_parent_m1     0.1001     0   Inf
#&gt; k_m1_sink       0.1002     0   Inf
#&gt; 
#&gt; Fixed parameter values:
#&gt;      value  type
#&gt; m1_0     0 state
#&gt; 
#&gt; Optimised, transformed parameters with symmetric confidence intervals:
#&gt;                Estimate Std. Error     Lower     Upper
#&gt; parent_0      99.600000  1.6140000 96.330000 1.029e+02
#&gt; k_parent_sink  0.047920  0.0037500  0.040310 5.553e-02
#&gt; k_parent_m1    0.050780  0.0020940  0.046530 5.502e-02
#&gt; k_m1_sink      0.005261  0.0007159  0.003809 6.713e-03
#&gt; 
#&gt; Parameter correlation:
#&gt;               parent_0 k_parent_sink k_parent_m1 k_m1_sink
#&gt; parent_0       1.00000        0.6075    -0.06625   -0.1701
#&gt; k_parent_sink  0.60752        1.0000    -0.08740   -0.6253
#&gt; k_parent_m1   -0.06625       -0.0874     1.00000    0.4716
#&gt; k_m1_sink     -0.17006       -0.6253     0.47164    1.0000
#&gt; 
#&gt; Residual standard error: 3.211 on 36 degrees of freedom
#&gt; 
#&gt; Backtransformed parameters:
#&gt; Confidence intervals for internally transformed parameters are asymmetric.
#&gt; t-test (unrealistically) based on the assumption of normal distribution
#&gt; for estimators of untransformed parameters.
#&gt;                Estimate t value    Pr(&gt;t)     Lower     Upper
#&gt; parent_0      99.600000  61.720 2.024e-38 96.330000 1.029e+02
#&gt; k_parent_sink  0.047920  12.780 3.050e-15  0.040310 5.553e-02
#&gt; k_parent_m1    0.050780  24.250 3.407e-24  0.046530 5.502e-02
#&gt; k_m1_sink      0.005261   7.349 5.758e-09  0.003809 6.713e-03
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.398       4 15
#&gt; parent     6.827       3  6
#&gt; m1         4.490       1  9
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_sink 0.4855
#&gt; parent_m1   0.5145
#&gt; m1_sink     1.0000
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   7.023  23.33
#&gt; m1     131.761 437.70</div><div class='input'>

<span class='no'>initials</span> <span class='kw'>&lt;-</span> <span class='no'>fit</span>$<span class='no'>start</span>$<span class='no'>value</span>
<span class='fu'>names</span>(<span class='no'>initials</span>) <span class='kw'>&lt;-</span> <span class='fu'>rownames</span>(<span class='no'>fit</span>$<span class='no'>start</span>)
<span class='no'>transformed</span> <span class='kw'>&lt;-</span> <span class='no'>fit</span>$<span class='no'>start_transformed</span>$<span class='no'>value</span>
<span class='fu'>names</span>(<span class='no'>transformed</span>) <span class='kw'>&lt;-</span> <span class='fu'>rownames</span>(<span class='no'>fit</span>$<span class='no'>start_transformed</span>)
<span class='fu'>transform_odeparms</span>(<span class='no'>initials</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#&gt;          parent_0 log_k_parent_sink   log_k_parent_m1     log_k_m1_sink 
#&gt;        100.750000         -2.302585         -2.301586         -2.300587 </div><div class='input'><span class='fu'>backtransform_odeparms</span>(<span class='no'>transformed</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#&gt;      parent_0 k_parent_sink   k_parent_m1     k_m1_sink 
#&gt;      100.7500        0.1000        0.1001        0.1002 </div><div class='input'>

<span class='co'># The case of formation fractions</span>
<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
  <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
<span class='no'>fit.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>summary</span>(<span class='no'>fit.ff</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; mkin version:    0.9.45.2 
#&gt; R version:       3.4.0 
#&gt; Date of fit:     Fri May  5 12:46:27 2017 
#&gt; Date of summary: Fri May  5 12:46:27 2017 
#&gt; 
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
#&gt; d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1
#&gt; 
#&gt; Model predictions using solution type deSolve 
#&gt; 
#&gt; Fitted with method Port using 185 model solutions performed in 0.776 s
#&gt; 
#&gt; Weighting: none
#&gt; 
#&gt; Starting values for parameters to be optimised:
#&gt;                   value   type
#&gt; parent_0       100.7500  state
#&gt; k_parent         0.1000 deparm
#&gt; k_m1             0.1001 deparm
#&gt; f_parent_to_m1   0.5000 deparm
#&gt; 
#&gt; Starting values for the transformed parameters actually optimised:
#&gt;                     value lower upper
#&gt; parent_0       100.750000  -Inf   Inf
#&gt; log_k_parent    -2.302585  -Inf   Inf
#&gt; log_k_m1        -2.301586  -Inf   Inf
#&gt; f_parent_ilr_1   0.000000  -Inf   Inf
#&gt; 
#&gt; Fixed parameter values:
#&gt;      value  type
#&gt; m1_0     0 state
#&gt; 
#&gt; Optimised, transformed parameters with symmetric confidence intervals:
#&gt;                Estimate Std. Error   Lower    Upper
#&gt; parent_0       99.60000    1.61400 96.3300 102.9000
#&gt; log_k_parent   -2.31600    0.04187 -2.4010  -2.2310
#&gt; log_k_m1       -5.24800    0.13610 -5.5230  -4.9720
#&gt; f_parent_ilr_1  0.04096    0.06477 -0.0904   0.1723
#&gt; 
#&gt; Parameter correlation:
#&gt;                parent_0 log_k_parent log_k_m1 f_parent_ilr_1
#&gt; parent_0         1.0000       0.5178  -0.1701        -0.5489
#&gt; log_k_parent     0.5178       1.0000  -0.3285        -0.5451
#&gt; log_k_m1        -0.1701      -0.3285   1.0000         0.7466
#&gt; f_parent_ilr_1  -0.5489      -0.5451   0.7466         1.0000
#&gt; 
#&gt; Residual standard error: 3.211 on 36 degrees of freedom
#&gt; 
#&gt; Backtransformed parameters:
#&gt; Confidence intervals for internally transformed parameters are asymmetric.
#&gt; t-test (unrealistically) based on the assumption of normal distribution
#&gt; for estimators of untransformed parameters.
#&gt;                 Estimate t value    Pr(&gt;t)     Lower     Upper
#&gt; parent_0       99.600000  61.720 2.024e-38 96.330000 1.029e+02
#&gt; k_parent        0.098700  23.880 5.701e-24  0.090660 1.074e-01
#&gt; k_m1            0.005261   7.349 5.758e-09  0.003992 6.933e-03
#&gt; f_parent_to_m1  0.514500  22.490 4.374e-23  0.468100 5.606e-01
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.398       4 15
#&gt; parent     6.459       2  7
#&gt; m1         4.690       2  8
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_m1   0.5145
#&gt; parent_sink 0.4855
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   7.023  23.33
#&gt; m1     131.761 437.70</div><div class='input'><span class='no'>initials</span> <span class='kw'>&lt;-</span> <span class='fu'>c</span>(<span class='st'>"f_parent_to_m1"</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)
<span class='no'>transformed</span> <span class='kw'>&lt;-</span> <span class='fu'>transform_odeparms</span>(<span class='no'>initials</span>, <span class='no'>SFO_SFO.ff</span>)
<span class='fu'>backtransform_odeparms</span>(<span class='no'>transformed</span>, <span class='no'>SFO_SFO.ff</span>)</div><div class='output co'>#&gt; f_parent_to_m1 
#&gt;            0.5 </div><div class='input'>
<span class='co'># And without sink</span>
<span class='no'>SFO_SFO.ff.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
  <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
  <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>

<span class='no'>fit.ff.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff.2</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='fu'>summary</span>(<span class='no'>fit.ff.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; mkin version:    0.9.45.2 
#&gt; R version:       3.4.0 
#&gt; Date of fit:     Fri May  5 12:46:28 2017 
#&gt; Date of summary: Fri May  5 12:46:28 2017 
#&gt; 
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
#&gt; d_m1/dt = + k_parent * parent - k_m1 * m1
#&gt; 
#&gt; Model predictions using solution type deSolve 
#&gt; 
#&gt; Fitted with method Port using 104 model solutions performed in 0.433 s
#&gt; 
#&gt; Weighting: none
#&gt; 
#&gt; Starting values for parameters to be optimised:
#&gt;             value   type
#&gt; parent_0 100.7500  state
#&gt; k_parent   0.1000 deparm
#&gt; k_m1       0.1001 deparm
#&gt; 
#&gt; Starting values for the transformed parameters actually optimised:
#&gt;                   value lower upper
#&gt; parent_0     100.750000  -Inf   Inf
#&gt; log_k_parent  -2.302585  -Inf   Inf
#&gt; log_k_m1      -2.301586  -Inf   Inf
#&gt; 
#&gt; Fixed parameter values:
#&gt;      value  type
#&gt; m1_0     0 state
#&gt; 
#&gt; Optimised, transformed parameters with symmetric confidence intervals:
#&gt;              Estimate Std. Error Lower  Upper
#&gt; parent_0       84.790    2.96500 78.78 90.800
#&gt; log_k_parent   -2.756    0.08088 -2.92 -2.593
#&gt; log_k_m1       -4.214    0.11150 -4.44 -3.988
#&gt; 
#&gt; Parameter correlation:
#&gt;              parent_0 log_k_parent log_k_m1
#&gt; parent_0       1.0000      0.11059  0.46156
#&gt; log_k_parent   0.1106      1.00000  0.06274
#&gt; log_k_m1       0.4616      0.06274  1.00000
#&gt; 
#&gt; Residual standard error: 8.333 on 37 degrees of freedom
#&gt; 
#&gt; Backtransformed parameters:
#&gt; Confidence intervals for internally transformed parameters are asymmetric.
#&gt; t-test (unrealistically) based on the assumption of normal distribution
#&gt; for estimators of untransformed parameters.
#&gt;          Estimate t value    Pr(&gt;t)    Lower    Upper
#&gt; parent_0 84.79000  28.600 3.938e-27 78.78000 90.80000
#&gt; k_parent  0.06352  12.360 5.237e-15  0.05392  0.07483
#&gt; k_m1      0.01478   8.966 4.114e-11  0.01179  0.01853
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   19.66       3 16
#&gt; parent     17.56       2  7
#&gt; m1         18.71       1  9
#&gt; 
#&gt; Estimated disappearance times:
#&gt;         DT50   DT90
#&gt; parent 10.91  36.25
#&gt; m1     46.89 155.75</div><div class='input'>
</div></pre>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
    <h2>Contents</h2>
    <ul class="nav nav-pills nav-stacked">
      <li><a href="#arguments">Arguments</a></li>
      
      <li><a href="#value">Value</a></li>
      
      <li><a href="#examples">Examples</a></li>
    </ul>

    <h2>Author</h2>
    
  Johannes Ranke

  </div>
</div>

      <footer>
      <div class="copyright">
  <p>Developed by Johannes Ranke.</p>
</div>

<div class="pkgdown">
  <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>

      </footer>
   </div>

  </body>
</html>

Contact - Imprint