aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/mkinfit.html
blob: f6ffd21d0074b6da776c90ef7c04cb26752dc7ed (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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
<!-- 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>Fit a kinetic model to data with one or more state variables — mkinfit • 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://cdn.mathjax.org/mathjax/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">Reference</a>
</li>
<li>
  <a href="../articles/index.html">Articles</a>
</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>Fit a kinetic model to data with one or more state variables</h1>
    </div>

    
    <p>This function uses the Flexible Modelling Environment package
  <code>FME</code> to create a function calculating the model cost, i.e. the
  deviation between the kinetic model and the observed data. This model cost is
  then minimised using the Port algorithm <code>nlminb</code>,
  using the specified initial or fixed parameters and starting values.
  Per default, parameters in the kinetic models are internally transformed in order
  to better satisfy the assumption of a normal distribution of their estimators.
  In each step of the optimsation, the kinetic model is solved using the
  function <code><a href='mkinpredict.html'>mkinpredict</a></code>. The variance of the residuals for each
  observed variable can optionally be iteratively reweighted until convergence
  using the argument <code>reweight.method = &quot;obs&quot;</code>.</p>
    

    <pre><span class='fu'>mkinfit</span>(<span class='no'>mkinmod</span>, <span class='no'>observed</span>,
  <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
  <span class='kw'>state.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
  <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>fixed_initials</span> <span class='kw'>=</span> <span class='fu'>names</span>(<span class='no'>mkinmod</span>$<span class='no'>diffs</span>)[-<span class='fl'>1</span>],
  <span class='kw'>from_max_mean</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
  <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"auto"</span>, <span class='st'>"analytical"</span>, <span class='st'>"eigen"</span>, <span class='st'>"deSolve"</span>),
  <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>,
  <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
  <span class='kw'>method.modFit</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"Port"</span>, <span class='st'>"Marq"</span>, <span class='st'>"SANN"</span>, <span class='st'>"Nelder-Mead"</span>, <span class='st'>"BFGS"</span>, <span class='st'>"CG"</span>, <span class='st'>"L-BFGS-B"</span>),
  <span class='kw'>maxit.modFit</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
  <span class='kw'>control.modFit</span> <span class='kw'>=</span> <span class='fu'>list</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='kw'>plot</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>weight</span> <span class='kw'>=</span> <span class='st'>"none"</span>,
  <span class='kw'>scaleVar</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
  <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-8</span>, <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, <span class='kw'>n.outtimes</span> <span class='kw'>=</span> <span class='fl'>100</span>,
  <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='kw'>reweight.tol</span> <span class='kw'>=</span> <span class='fl'>1e-8</span>, <span class='kw'>reweight.max.iter</span> <span class='kw'>=</span> <span class='fl'>10</span>,
  <span class='kw'>trace_parms</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
    <dl class="dl-horizontal">
      <dt>mkinmod</dt>
      <dd>
    A list of class <code><a href='mkinmod.html'>mkinmod</a></code>, containing the kinetic model to be
    fitted to the data, or one of the shorthand names (&quot;SFO&quot;, &quot;FOMC&quot;, &quot;DFOP&quot;,
    &quot;HS&quot;, &quot;SFORB&quot;). If a shorthand name is given, a parent only degradation
    model is generated for the variable with the highest value in
    <code>observed</code>.
  </dd>
      <dt>observed</dt>
      <dd>
    The observed data. It has to be in the long format as described in
    <code>modFit</code>, i.e. the first column called &quot;name&quot; must contain the
    name of the observed variable for each data point. The second column must
    contain the times of observation, named &quot;time&quot;.  The third column must be
    named &quot;value&quot; and contain the observed values. Optionally, a further column
    can contain weights for each data point. Its name must be passed as a
    further argument named <code>err</code> which is then passed on to
    <code>modFit</code>.
  </dd>
      <dt>parms.ini</dt>
      <dd>
    A named vector of initial values for the parameters, including parameters
    to be optimised and potentially also fixed parameters as indicated by
    <code>fixed_parms</code>.  If set to &quot;auto&quot;, initial values for rate constants
    are set to default values.  Using parameter names that are not in the model
    gives an error.

    It is possible to only specify a subset of the parameters that the model
    needs. You can use the parameter lists &quot;bparms.ode&quot; from a previously
    fitted model, which contains the differential equation parameters from this
    model. This works nicely if the models are nested. An example is given
    below.
  </dd>
      <dt>state.ini</dt>
      <dd>
    A named vector of initial values for the state variables of the model. In
    case the observed variables are represented by more than one model
    variable, the names will differ from the names of the observed variables
    (see <code>map</code> component of <code><a href='mkinmod.html'>mkinmod</a></code>). The default is to set
    the initial value of the first model variable to the mean of the time zero
    values for the variable with the maximum observed value, and all others to 0.
    If this variable has no time zero observations, its initial value is set to 100.
  </dd>
      <dt>fixed_parms</dt>
      <dd>
    The names of parameters that should not be optimised but rather kept at the
    values specified in <code>parms.ini</code>.
  </dd>
      <dt>fixed_initials</dt>
      <dd>
    The names of model variables for which the initial state at time 0 should
    be excluded from the optimisation. Defaults to all state variables except
    for the first one.
  </dd>
      <dt>from_max_mean</dt>
      <dd>
    If this is set to TRUE, and the model has only one observed variable, then
    data before the time of the maximum observed value (after averaging for each
    sampling time) are discarded, and this time is subtracted from all
    remaining time values, so the time of the maximum observed mean value is
    the new time zero.
  </dd>
      <dt>solution_type</dt>
      <dd>
    If set to &quot;eigen&quot;, the solution of the system of differential equations is
    based on the spectral decomposition of the coefficient matrix in cases that
    this is possible. If set to &quot;deSolve&quot;, a numerical ode solver from package
    <code>deSolve</code> is used. If set to &quot;analytical&quot;, an analytical
    solution of the model is used. This is only implemented for simple
    degradation experiments with only one state variable, i.e. with no
    metabolites. The default is &quot;auto&quot;, which uses &quot;analytical&quot; if possible,
    otherwise &quot;eigen&quot; if the model can be expressed using eigenvalues and
    eigenvectors, and finally &quot;deSolve&quot; for the remaining models (time
    dependence of degradation rates and metabolites). This argument is passed
    on to the helper function <code><a href='mkinpredict.html'>mkinpredict</a></code>.
  </dd>
      <dt>method.ode</dt>
      <dd>
    The solution method passed via <code><a href='mkinpredict.html'>mkinpredict</a></code> to
    <code>ode</code> in case the solution type is &quot;deSolve&quot;. The default
    &quot;lsoda&quot; is performant, but sometimes fails to converge.
  </dd>
      <dt>use_compiled</dt>
      <dd>
    If set to <code>FALSE</code>, no compiled version of the <code><a href='mkinmod.html'>mkinmod</a></code>
    model is used, in the calls to <code><a href='mkinpredict.html'>mkinpredict</a></code> even if
    a compiled verion is present.
  </dd>
      <dt>method.modFit</dt>
      <dd>
    The optimisation method passed to <code>modFit</code>.

    In order to optimally deal with problems where local minima occur, the
    &quot;Port&quot; algorithm is now used per default as it is less prone to get trapped
    in local minima and depends less on starting values for parameters than
    the Levenberg Marquardt variant selected by &quot;Marq&quot;.  However, &quot;Port&quot; needs
    more iterations.

    The former default &quot;Marq&quot; is the Levenberg Marquardt algorithm
    <code>nls.lm</code> from the package <code>minpack.lm</code> and usually needs
    the least number of iterations.

    The &quot;Pseudo&quot; algorithm is not included because it needs finite parameter bounds
    which are currently not supported.

    The &quot;Newton&quot; algorithm is not included because its number of iterations
    can not be controlled by <code>control.modFit</code> and it does not appear
    to provide advantages over the other algorithms.
  </dd>
      <dt>maxit.modFit</dt>
      <dd>
    Maximum number of iterations in the optimisation. If not &quot;auto&quot;, this will
    be passed to the method called by <code>modFit</code>, overriding
    what may be specified in the next argument <code>control.modFit</code>.
  </dd>
      <dt>control.modFit</dt>
      <dd>
    Additional arguments passed to the optimisation method used by
    <code>modFit</code>.
  </dd>
      <dt>transform_rates</dt>
      <dd>
    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.
    If FALSE, zero is used as a lower bound for the rates in the optimisation.
  </dd>
      <dt>transform_fractions</dt>
      <dd>
    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. If TRUE, 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.
  </dd>
      <dt>plot</dt>
      <dd>
    Should the observed values and the numerical solutions be plotted at each
    stage of the optimisation?
  </dd>
      <dt>quiet</dt>
      <dd>
    Suppress printing out the current model cost after each improvement?
  </dd>
      <dt>err </dt>
      <dd>either <code>NULL</code>, or the name of the column with the
    <em>error</em> estimates, used to weigh the residuals (see details of
    <code>modCost</code>); if <code>NULL</code>, then the residuals are not weighed.
  </dd>
      <dt>weight</dt>
      <dd>
    only if <code>err</code>=<code>NULL</code>: how to weight the residuals, one of &quot;none&quot;,
    &quot;std&quot;, &quot;mean&quot;, see details of <code>modCost</code>.
  </dd>
      <dt>scaleVar</dt>
      <dd>
    Will be passed to <code>modCost</code>. Default is not to scale Variables
    according to the number of observations.
  </dd>
      <dt>atol</dt>
      <dd>
    Absolute error tolerance, passed to <code>ode</code>. Default is 1e-8,
    lower than in <code>lsoda</code>.
  </dd>
      <dt>rtol</dt>
      <dd>
    Absolute error tolerance, passed to <code>ode</code>. Default is 1e-10,
    much lower than in <code>lsoda</code>.
  </dd>
      <dt>n.outtimes</dt>
      <dd>
    The length of the dataseries that is produced by the model prediction
    function <code><a href='mkinpredict.html'>mkinpredict</a></code>. This impacts the accuracy of
    the numerical solver if that is used (see <code>solution_type</code> argument.
    The default value is 100.
  </dd>
      <dt>reweight.method</dt>
      <dd>
    The method used for iteratively reweighting residuals, also known
    as iteratively reweighted least squares (IRLS). Default is NULL,
    the other method implemented is called &quot;obs&quot;, meaning that each
    observed variable is assumed to have its own variance, this is
    estimated from the fit and used for weighting the residuals
    in each iteration until convergence of this estimate up to
    <code>reweight.tol</code> or up to the maximum number of iterations
    specified by <code>reweight.max.iter</code>.
  </dd>
      <dt>reweight.tol</dt>
      <dd>
    Tolerance for convergence criterion for the variance components
    in IRLS fits.
  </dd>
      <dt>reweight.max.iter</dt>
      <dd>
    Maximum iterations in IRLS fits.
  </dd>
      <dt>trace_parms</dt>
      <dd>
    Should a trace of the parameter values be listed?
  </dd>
      <dt>&amp;#8230;</dt>
      <dd>
    Further arguments that will be passed to <code>modFit</code>.
  </dd>
    </dl>
    
    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>A list with &quot;mkinfit&quot; and &quot;modFit&quot; in the class attribute.
  A summary can be obtained by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p>
    
    <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>

    <p>Plotting methods <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code> and
  <code><a href='mkinparplot.html'>mkinparplot</a></code>.</p>
    <p>Fitting of several models to several datasets in a single call to
  <code><a href='mmkin.html'>mmkin</a></code>.</p>
    
    <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>

    <p>The implementation of iteratively reweighted least squares is inspired by the
  work of the KinGUII team at Bayer Crop Science (Walter Schmitt and Zhenglei
  Gao). A similar implemention can also be found in CAKE 2.0, which is the
  other GUI derivative of mkin, sponsored by Syngenta.</p>
    
    <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>

    <p>When using the &quot;IORE&quot; submodel for metabolites, fitting with
  &quot;transform_rates = TRUE&quot; (the default) often leads to failures of the
  numerical ODE solver. In this situation it may help to switch off the
  internal rate transformation.</p>
    

    <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
    <pre class="examples"><div class='input'><span class='co'># Use shorthand notation for parent only degradation</span>
<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</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>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:37 2016 
#&gt; Date of summary: Fri Nov 18 15:19:37 2016 
#&gt; 
#&gt; Equations:
#&gt; d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
#&gt; 
#&gt; Model predictions using solution type analytical 
#&gt; 
#&gt; Fitted with method Port using 64 model solutions performed in 0.152 s
#&gt; 
#&gt; Weighting: none
#&gt; 
#&gt; Starting values for parameters to be optimised:
#&gt;          value   type
#&gt; parent_0  85.1  state
#&gt; alpha      1.0 deparm
#&gt; beta      10.0 deparm
#&gt; 
#&gt; Starting values for the transformed parameters actually optimised:
#&gt;               value lower upper
#&gt; parent_0  85.100000  -Inf   Inf
#&gt; log_alpha  0.000000  -Inf   Inf
#&gt; log_beta   2.302585  -Inf   Inf
#&gt; 
#&gt; Fixed parameter values:
#&gt; None
#&gt; 
#&gt; Optimised, transformed parameters with symmetric confidence intervals:
#&gt;           Estimate Std. Error    Lower   Upper
#&gt; parent_0  85.87000     2.2460 80.38000 91.3700
#&gt; log_alpha  0.05192     0.1605 -0.34080  0.4446
#&gt; log_beta   0.65100     0.2801 -0.03452  1.3360
#&gt; 
#&gt; Parameter correlation:
#&gt;           parent_0 log_alpha log_beta
#&gt; parent_0    1.0000   -0.2033  -0.3624
#&gt; log_alpha  -0.2033    1.0000   0.9547
#&gt; log_beta   -0.3624    0.9547   1.0000
#&gt; 
#&gt; Residual standard error: 2.275 on 6 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   85.870  38.230 1.069e-08 80.3800 91.370
#&gt; alpha       1.053   6.231 3.953e-04  0.7112  1.560
#&gt; beta        1.917   3.570 5.895e-03  0.9661  3.806
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.657       3  6
#&gt; parent     6.657       3  6
#&gt; 
#&gt; Estimated disappearance times:
#&gt;         DT50  DT90 DT50back
#&gt; parent 1.785 15.15     4.56
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted residual
#&gt;     0   parent     85.1    85.875  -0.7749
#&gt;     1   parent     57.9    55.191   2.7091
#&gt;     3   parent     29.9    31.845  -1.9452
#&gt;     7   parent     14.6    17.012  -2.4124
#&gt;    14   parent      9.7     9.241   0.4590
#&gt;    28   parent      6.6     4.754   1.8460
#&gt;    63   parent      4.0     2.102   1.8977
#&gt;    91   parent      3.9     1.441   2.4590
#&gt;   119   parent      0.6     1.092  -0.4919</div><div class='input'>
<span class='co'># One parent compound, one metabolite, both single first order.</span>
<span class='co'># Use mkinsub for convenience in model formulation. Pathway to sink included per default.</span>
<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'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></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='fu'>print</span>(<span class='fu'>system.time</span>(<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>,
                           <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#&gt;    user  system elapsed 
#&gt;   1.220   1.184   0.904 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt;          parent_0 log_k_parent_sink   log_k_parent_m1     log_k_m1_sink 
#&gt;          99.59848          -3.03822          -2.98030          -5.24750 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; $ff
#&gt; parent_sink   parent_m1     m1_sink 
#&gt;    0.485524    0.514476    1.000000 
#&gt; 
#&gt; $SFORB
#&gt; logical(0)
#&gt; 
#&gt; $distimes
#&gt;              DT50      DT90
#&gt; parent   7.022929  23.32967
#&gt; m1     131.760712 437.69961
#&gt; </div><div class='input'>
<span class='co'># deSolve is slower when no C compiler (gcc) was available during model generation</span>
<span class='fu'>print</span>(<span class='fu'>system.time</span>(<span class='no'>fit.deSolve</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>,
                           <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)))</div><div class='output co'>#&gt; Model cost at call  1 :  18915.53 
#&gt; Model cost at call  2 :  18915.53 
#&gt; Model cost at call  6 :  11424.02 
#&gt; Model cost at call  10 :  11424 
#&gt; Model cost at call  12 :  4094.396 
#&gt; Model cost at call  16 :  4094.396 
#&gt; Model cost at call  19 :  1340.595 
#&gt; Model cost at call  20 :  1340.593 
#&gt; Model cost at call  25 :  1072.239 
#&gt; Model cost at call  28 :  1072.236 
#&gt; Model cost at call  30 :  874.2614 
#&gt; Model cost at call  33 :  874.2611 
#&gt; Model cost at call  35 :  616.2379 
#&gt; Model cost at call  37 :  616.2374 
#&gt; Model cost at call  40 :  467.4388 
#&gt; Model cost at call  42 :  467.4382 
#&gt; Model cost at call  46 :  398.2914 
#&gt; Model cost at call  48 :  398.2914 
#&gt; Model cost at call  49 :  398.2913 
#&gt; Model cost at call  51 :  395.0712 
#&gt; Model cost at call  54 :  395.0711 
#&gt; Model cost at call  56 :  378.3298 
#&gt; Model cost at call  59 :  378.3298 
#&gt; Model cost at call  62 :  376.9812 
#&gt; Model cost at call  64 :  376.9811 
#&gt; Model cost at call  67 :  375.2085 
#&gt; Model cost at call  69 :  375.2085 
#&gt; Model cost at call  70 :  375.2085 
#&gt; Model cost at call  71 :  375.2085 
#&gt; Model cost at call  72 :  374.5723 
#&gt; Model cost at call  74 :  374.5723 
#&gt; Model cost at call  77 :  374.0075 
#&gt; Model cost at call  79 :  374.0075 
#&gt; Model cost at call  80 :  374.0075 
#&gt; Model cost at call  82 :  373.1711 
#&gt; Model cost at call  84 :  373.1711 
#&gt; Model cost at call  87 :  372.6445 
#&gt; Model cost at call  88 :  372.1614 
#&gt; Model cost at call  90 :  372.1614 
#&gt; Model cost at call  91 :  372.1614 
#&gt; Model cost at call  94 :  371.6464 
#&gt; Model cost at call  99 :  371.4299 
#&gt; Model cost at call  101 :  371.4299 
#&gt; Model cost at call  104 :  371.407 
#&gt; Model cost at call  106 :  371.407 
#&gt; Model cost at call  107 :  371.407 
#&gt; Model cost at call  109 :  371.2524 
#&gt; Model cost at call  113 :  371.2524 
#&gt; Model cost at call  114 :  371.2136 
#&gt; Model cost at call  115 :  371.2136 
#&gt; Model cost at call  116 :  371.2136 
#&gt; Model cost at call  119 :  371.2134 
#&gt; Model cost at call  120 :  371.2134 
#&gt; Model cost at call  122 :  371.2134 
#&gt; Model cost at call  123 :  371.2134 
#&gt; Model cost at call  125 :  371.2134 
#&gt; Model cost at call  126 :  371.2134 
#&gt; Model cost at call  135 :  371.2134 
#&gt; Model cost at call  147 :  371.2134 
#&gt; Model cost at call  152 :  371.2134 
#&gt; Optimisation by method Port successfully terminated.
#&gt;    user  system elapsed 
#&gt;   0.712   0.040   0.707 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt;          parent_0 log_k_parent_sink   log_k_parent_m1     log_k_m1_sink 
#&gt;          99.59848          -3.03822          -2.98030          -5.24750 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; $ff
#&gt; parent_sink   parent_m1     m1_sink 
#&gt;    0.485524    0.514476    1.000000 
#&gt; 
#&gt; $SFORB
#&gt; logical(0)
#&gt; 
#&gt; $distimes
#&gt;              DT50      DT90
#&gt; parent   7.022929  23.32967
#&gt; m1     131.760713 437.69961
#&gt; </div><div class='input'>

<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC</span>

<span class='no'>FOMC_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'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"m1"</span>),
  <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></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.FOMC_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  18857.28 
#&gt; Model cost at call  4 :  18857.28 
#&gt; Model cost at call  5 :  18857.28 
#&gt; Model cost at call  8 :  15273.94 
#&gt; Model cost at call  9 :  15273.93 
#&gt; Model cost at call  12 :  15273.67 
#&gt; Model cost at call  13 :  15273.64 
#&gt; Model cost at call  14 :  12764.42 
#&gt; Model cost at call  15 :  8382.7 
#&gt; Model cost at call  20 :  8382.696 
#&gt; Model cost at call  23 :  2729.177 
#&gt; Model cost at call  24 :  2729.175 
#&gt; Model cost at call  26 :  2729.164 
#&gt; Model cost at call  30 :  2299.383 
#&gt; Model cost at call  34 :  2299.379 
#&gt; Model cost at call  35 :  2299.373 
#&gt; Model cost at call  36 :  1944.782 
#&gt; Model cost at call  40 :  1944.782 
#&gt; Model cost at call  42 :  1328.087 
#&gt; Model cost at call  43 :  908.661 
#&gt; Model cost at call  44 :  908.6604 
#&gt; Model cost at call  50 :  877.3556 
#&gt; Model cost at call  51 :  877.3554 
#&gt; Model cost at call  54 :  877.3546 
#&gt; Model cost at call  56 :  769.5186 
#&gt; Model cost at call  59 :  769.5157 
#&gt; Model cost at call  62 :  690.3426 
#&gt; Model cost at call  66 :  690.3425 
#&gt; Model cost at call  68 :  608.4032 
#&gt; Model cost at call  72 :  608.4031 
#&gt; Model cost at call  73 :  608.4031 
#&gt; Model cost at call  74 :  601.5178 
#&gt; Model cost at call  78 :  601.5174 
#&gt; Model cost at call  79 :  601.5174 
#&gt; Model cost at call  80 :  459.9885 
#&gt; Model cost at call  81 :  459.9883 
#&gt; Model cost at call  83 :  459.9878 
#&gt; Model cost at call  87 :  447.0145 
#&gt; Model cost at call  91 :  447.0145 
#&gt; Model cost at call  94 :  445.7322 
#&gt; Model cost at call  97 :  445.7322 
#&gt; Model cost at call  99 :  445.7322 
#&gt; Model cost at call  100 :  444.6965 
#&gt; Model cost at call  103 :  444.6965 
#&gt; Model cost at call  106 :  442.9742 
#&gt; Model cost at call  109 :  442.9742 
#&gt; Model cost at call  112 :  439.9665 
#&gt; Model cost at call  115 :  439.9665 
#&gt; Model cost at call  116 :  439.9664 
#&gt; Model cost at call  118 :  435.0752 
#&gt; Model cost at call  121 :  435.0751 
#&gt; Model cost at call  124 :  430.4718 
#&gt; Model cost at call  127 :  430.4717 
#&gt; Model cost at call  132 :  424.7004 
#&gt; Model cost at call  134 :  424.7003 
#&gt; Model cost at call  138 :  423.6102 
#&gt; Model cost at call  141 :  423.6102 
#&gt; Model cost at call  142 :  423.6102 
#&gt; Model cost at call  144 :  421.1786 
#&gt; Model cost at call  147 :  421.1786 
#&gt; Model cost at call  148 :  421.1786 
#&gt; Model cost at call  150 :  418.1431 
#&gt; Model cost at call  151 :  412.8665 
#&gt; Model cost at call  152 :  396.6067 
#&gt; Model cost at call  154 :  396.6067 
#&gt; Model cost at call  158 :  391.0492 
#&gt; Model cost at call  160 :  391.0492 
#&gt; Model cost at call  164 :  385.8205 
#&gt; Model cost at call  165 :  385.8205 
#&gt; Model cost at call  170 :  379.7674 
#&gt; Model cost at call  171 :  379.7674 
#&gt; Model cost at call  172 :  379.7674 
#&gt; Model cost at call  176 :  374.9389 
#&gt; Model cost at call  177 :  374.9389 
#&gt; Model cost at call  182 :  372.727 
#&gt; Model cost at call  185 :  372.727 
#&gt; Model cost at call  188 :  371.5297 
#&gt; Model cost at call  194 :  370.3738 
#&gt; Model cost at call  195 :  370.3738 
#&gt; Model cost at call  200 :  370.0182 
#&gt; Model cost at call  206 :  369.8634 
#&gt; Model cost at call  212 :  369.8188 
#&gt; Model cost at call  213 :  369.8188 
#&gt; Model cost at call  219 :  369.8114 
#&gt; Model cost at call  221 :  369.8114 
#&gt; Model cost at call  224 :  369.8114 
#&gt; Model cost at call  226 :  369.8114 
#&gt; Model cost at call  230 :  369.8105 
#&gt; Model cost at call  231 :  369.8105 
#&gt; Model cost at call  235 :  369.8105 
#&gt; Model cost at call  236 :  369.8105 
#&gt; Model cost at call  237 :  369.8105 
#&gt; Model cost at call  238 :  369.8105 
#&gt; Model cost at call  249 :  369.8105 
#&gt; Model cost at call  260 :  369.8105 
#&gt; Model cost at call  275 :  369.8105 
#&gt; Model cost at call  276 :  369.8105 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='co'># Use starting parameters from parent only FOMC fit</span>
<span class='no'>fit.FOMC</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  3237.008 
#&gt; Model cost at call  3 :  3237.007 
#&gt; Model cost at call  6 :  671.2571 
#&gt; Model cost at call  7 :  671.2559 
#&gt; Model cost at call  8 :  671.2301 
#&gt; Model cost at call  9 :  671.2249 
#&gt; Model cost at call  10 :  468.4899 
#&gt; Model cost at call  12 :  468.4899 
#&gt; Model cost at call  14 :  371.3486 
#&gt; Model cost at call  16 :  371.3485 
#&gt; Model cost at call  18 :  346.2972 
#&gt; Model cost at call  19 :  346.2971 
#&gt; Model cost at call  20 :  346.297 
#&gt; Model cost at call  21 :  346.2969 
#&gt; Model cost at call  22 :  269.7053 
#&gt; Model cost at call  23 :  269.7053 
#&gt; Model cost at call  26 :  243.9936 
#&gt; Model cost at call  27 :  235.1625 
#&gt; Model cost at call  28 :  235.1624 
#&gt; Model cost at call  30 :  235.1624 
#&gt; Model cost at call  31 :  224.2195 
#&gt; Model cost at call  35 :  218.1922 
#&gt; Model cost at call  36 :  218.1922 
#&gt; Model cost at call  38 :  218.1922 
#&gt; Model cost at call  39 :  211.5012 
#&gt; Model cost at call  41 :  211.5012 
#&gt; Model cost at call  43 :  207.9511 
#&gt; Model cost at call  44 :  207.9511 
#&gt; Model cost at call  47 :  206.5377 
#&gt; Model cost at call  51 :  205.8736 
#&gt; Model cost at call  55 :  205.5625 
#&gt; Model cost at call  59 :  205.4704 
#&gt; Model cost at call  63 :  205.4499 
#&gt; Model cost at call  67 :  205.448 
#&gt; Model cost at call  69 :  205.448 
#&gt; Model cost at call  70 :  205.448 
#&gt; Model cost at call  73 :  205.448 
#&gt; Model cost at call  74 :  205.4478 
#&gt; Model cost at call  75 :  205.4478 
#&gt; Model cost at call  77 :  205.4478 
#&gt; Model cost at call  79 :  205.4478 
#&gt; Model cost at call  84 :  205.4478 
#&gt; Model cost at call  95 :  205.4478 
#&gt; Model cost at call  98 :  205.4478 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='no'>fit.FOMC_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>,
  <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.FOMC</span>$<span class='no'>bparms.ode</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  15169.96 
#&gt; Model cost at call  2 :  15169.96 
#&gt; Model cost at call  7 :  8247.462 
#&gt; Model cost at call  14 :  6734.371 
#&gt; Model cost at call  15 :  6734.339 
#&gt; Model cost at call  16 :  6734.136 
#&gt; Model cost at call  20 :  4855.056 
#&gt; Model cost at call  24 :  4855.038 
#&gt; Model cost at call  27 :  1239.986 
#&gt; Model cost at call  29 :  1239.985 
#&gt; Model cost at call  34 :  1030.523 
#&gt; Model cost at call  38 :  1030.523 
#&gt; Model cost at call  40 :  894.2766 
#&gt; Model cost at call  43 :  894.275 
#&gt; Model cost at call  46 :  750.3629 
#&gt; Model cost at call  49 :  750.3623 
#&gt; Model cost at call  52 :  627.6819 
#&gt; Model cost at call  55 :  627.6818 
#&gt; Model cost at call  58 :  546.2947 
#&gt; Model cost at call  61 :  546.2944 
#&gt; Model cost at call  65 :  502.5529 
#&gt; Model cost at call  69 :  502.5525 
#&gt; Model cost at call  70 :  502.5525 
#&gt; Model cost at call  71 :  475.2423 
#&gt; Model cost at call  72 :  465.5298 
#&gt; Model cost at call  75 :  465.5298 
#&gt; Model cost at call  76 :  465.5297 
#&gt; Model cost at call  78 :  464.9476 
#&gt; Model cost at call  81 :  464.9476 
#&gt; Model cost at call  82 :  464.9473 
#&gt; Model cost at call  84 :  426.9626 
#&gt; Model cost at call  88 :  426.9626 
#&gt; Model cost at call  90 :  414.5235 
#&gt; Model cost at call  93 :  414.5234 
#&gt; Model cost at call  96 :  412.1478 
#&gt; Model cost at call  99 :  412.1477 
#&gt; Model cost at call  100 :  412.1477 
#&gt; Model cost at call  101 :  412.1477 
#&gt; Model cost at call  102 :  394.146 
#&gt; Model cost at call  105 :  394.146 
#&gt; Model cost at call  106 :  394.146 
#&gt; Model cost at call  107 :  394.146 
#&gt; Model cost at call  108 :  384.2002 
#&gt; Model cost at call  112 :  384.2001 
#&gt; Model cost at call  113 :  384.2001 
#&gt; Model cost at call  115 :  380.5495 
#&gt; Model cost at call  119 :  380.5494 
#&gt; Model cost at call  120 :  380.5494 
#&gt; Model cost at call  121 :  378.4803 
#&gt; Model cost at call  123 :  378.4802 
#&gt; Model cost at call  124 :  378.4792 
#&gt; Model cost at call  127 :  374.8432 
#&gt; Model cost at call  129 :  374.8431 
#&gt; Model cost at call  133 :  372.8364 
#&gt; Model cost at call  136 :  372.8364 
#&gt; Model cost at call  137 :  372.8363 
#&gt; Model cost at call  138 :  372.8363 
#&gt; Model cost at call  141 :  372.668 
#&gt; Model cost at call  145 :  372.6679 
#&gt; Model cost at call  147 :  372.5882 
#&gt; Model cost at call  150 :  372.5882 
#&gt; Model cost at call  153 :  372.4828 
#&gt; Model cost at call  156 :  372.4828 
#&gt; Model cost at call  159 :  372.3639 
#&gt; Model cost at call  162 :  372.3639 
#&gt; Model cost at call  163 :  372.3639 
#&gt; Model cost at call  164 :  372.3639 
#&gt; Model cost at call  165 :  372.1959 
#&gt; Model cost at call  168 :  372.1959 
#&gt; Model cost at call  171 :  371.9627 
#&gt; Model cost at call  172 :  371.7467 
#&gt; Model cost at call  173 :  371.1161 
#&gt; Model cost at call  174 :  370.3326 
#&gt; Model cost at call  177 :  370.3326 
#&gt; Model cost at call  178 :  370.3326 
#&gt; Model cost at call  180 :  370.3267 
#&gt; Model cost at call  186 :  370.0471 
#&gt; Model cost at call  187 :  370.0471 
#&gt; Model cost at call  193 :  369.9649 
#&gt; Model cost at call  194 :  369.9649 
#&gt; Model cost at call  196 :  369.9649 
#&gt; Model cost at call  199 :  369.8684 
#&gt; Model cost at call  200 :  369.8684 
#&gt; Model cost at call  204 :  369.8684 
#&gt; Model cost at call  206 :  369.8349 
#&gt; Model cost at call  207 :  369.8349 
#&gt; Model cost at call  209 :  369.8349 
#&gt; Model cost at call  210 :  369.8349 
#&gt; Model cost at call  211 :  369.8349 
#&gt; Model cost at call  212 :  369.8105 
#&gt; Model cost at call  214 :  369.8105 
#&gt; Model cost at call  218 :  369.8105 
#&gt; Model cost at call  220 :  369.8105 
#&gt; Model cost at call  225 :  369.8105 
#&gt; Model cost at call  229 :  369.8105 
#&gt; Model cost at call  231 :  369.8105 
#&gt; Model cost at call  232 :  369.8105 
#&gt; Model cost at call  236 :  369.8105 
#&gt; Model cost at call  239 :  369.8105 
#&gt; Model cost at call  240 :  369.8105 
#&gt; Model cost at call  255 :  369.8105 
#&gt; Model cost at call  258 :  369.8105 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'>
<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, SFORB</span>
<span class='no'>SFORB_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'>"SFORB"</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.SFORB_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  19233.21 
#&gt; Model cost at call  2 :  19233.21 
#&gt; Model cost at call  5 :  19233.21 
#&gt; Model cost at call  8 :  14482.65 
#&gt; Model cost at call  11 :  14482.51 
#&gt; Model cost at call  13 :  14482.17 
#&gt; Model cost at call  15 :  6973.814 
#&gt; Model cost at call  16 :  5161.041 
#&gt; Model cost at call  17 :  5161.029 
#&gt; Model cost at call  22 :  5161.026 
#&gt; Model cost at call  24 :  3249.595 
#&gt; Model cost at call  26 :  3249.595 
#&gt; Model cost at call  27 :  3249.519 
#&gt; Model cost at call  31 :  2615.891 
#&gt; Model cost at call  32 :  2615.888 
#&gt; Model cost at call  39 :  989.1788 
#&gt; Model cost at call  44 :  989.1772 
#&gt; Model cost at call  45 :  989.1771 
#&gt; Model cost at call  47 :  647.4307 
#&gt; Model cost at call  50 :  647.4302 
#&gt; Model cost at call  51 :  647.4261 
#&gt; Model cost at call  54 :  626.7937 
#&gt; Model cost at call  55 :  626.7935 
#&gt; Model cost at call  56 :  626.7931 
#&gt; Model cost at call  61 :  527.9042 
#&gt; Model cost at call  62 :  527.9041 
#&gt; Model cost at call  68 :  505.8828 
#&gt; Model cost at call  70 :  505.8828 
#&gt; Model cost at call  73 :  505.8827 
#&gt; Model cost at call  75 :  452.8932 
#&gt; Model cost at call  77 :  452.893 
#&gt; Model cost at call  82 :  414.4918 
#&gt; Model cost at call  83 :  414.4918 
#&gt; Model cost at call  84 :  414.4918 
#&gt; Model cost at call  88 :  414.4917 
#&gt; Model cost at call  89 :  408.2617 
#&gt; Model cost at call  90 :  408.2616 
#&gt; Model cost at call  91 :  408.2616 
#&gt; Model cost at call  95 :  408.2615 
#&gt; Model cost at call  96 :  384.4461 
#&gt; Model cost at call  102 :  384.4461 
#&gt; Model cost at call  104 :  383.4905 
#&gt; Model cost at call  105 :  383.4905 
#&gt; Model cost at call  106 :  383.4905 
#&gt; Model cost at call  109 :  383.4904 
#&gt; Model cost at call  111 :  381.8828 
#&gt; Model cost at call  112 :  381.8827 
#&gt; Model cost at call  118 :  380.8499 
#&gt; Model cost at call  120 :  380.8499 
#&gt; Model cost at call  123 :  380.8499 
#&gt; Model cost at call  125 :  379.1403 
#&gt; Model cost at call  127 :  379.1402 
#&gt; Model cost at call  132 :  376.4962 
#&gt; Model cost at call  133 :  373.0958 
#&gt; Model cost at call  134 :  365.247 
#&gt; Model cost at call  137 :  365.2469 
#&gt; Model cost at call  142 :  360.8231 
#&gt; Model cost at call  143 :  360.8231 
#&gt; Model cost at call  146 :  360.8231 
#&gt; Model cost at call  148 :  360.8231 
#&gt; Model cost at call  149 :  358.3976 
#&gt; Model cost at call  152 :  358.3976 
#&gt; Model cost at call  154 :  358.3976 
#&gt; Model cost at call  156 :  355.9066 
#&gt; Model cost at call  157 :  355.9066 
#&gt; Model cost at call  163 :  354.3386 
#&gt; Model cost at call  164 :  353.6335 
#&gt; Model cost at call  172 :  353.2094 
#&gt; Model cost at call  173 :  353.2094 
#&gt; Model cost at call  174 :  353.2093 
#&gt; Model cost at call  177 :  353.2093 
#&gt; Model cost at call  178 :  353.2093 
#&gt; Model cost at call  179 :  352.6641 
#&gt; Model cost at call  182 :  352.6641 
#&gt; Model cost at call  183 :  352.6641 
#&gt; Model cost at call  186 :  352.4908 
#&gt; Model cost at call  187 :  352.4429 
#&gt; Model cost at call  195 :  352.3246 
#&gt; Model cost at call  203 :  352.2858 
#&gt; Model cost at call  204 :  352.2858 
#&gt; Model cost at call  205 :  352.2858 
#&gt; Model cost at call  206 :  352.2858 
#&gt; Model cost at call  207 :  352.2858 
#&gt; Model cost at call  210 :  352.2332 
#&gt; Model cost at call  211 :  352.2081 
#&gt; Model cost at call  214 :  352.2081 
#&gt; Model cost at call  216 :  352.2081 
#&gt; Model cost at call  218 :  352.2049 
#&gt; Model cost at call  219 :  352.2049 
#&gt; Model cost at call  220 :  352.2049 
#&gt; Model cost at call  226 :  352.2048 
#&gt; Model cost at call  228 :  352.2048 
#&gt; Model cost at call  231 :  352.2048 
#&gt; Model cost at call  232 :  352.2048 
#&gt; Model cost at call  238 :  352.2048 
#&gt; Model cost at call  239 :  352.2048 
#&gt; Model cost at call  251 :  352.2048 
#&gt; Model cost at call  264 :  352.2048 
#&gt; Model cost at call  283 :  352.2048 
#&gt; Model cost at call  284 :  352.2048 
#&gt; Model cost at call  285 :  352.2048 
#&gt; Model cost at call  286 :  352.2048 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='no'>fit.SFORB_SFO.deSolve</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  19233.21 
#&gt; Model cost at call  2 :  19233.21 
#&gt; Model cost at call  5 :  19233.21 
#&gt; Model cost at call  8 :  14482.65 
#&gt; Model cost at call  11 :  14482.51 
#&gt; Model cost at call  13 :  14482.17 
#&gt; Model cost at call  15 :  6973.814 
#&gt; Model cost at call  16 :  5161.041 
#&gt; Model cost at call  17 :  5161.029 
#&gt; Model cost at call  22 :  5161.026 
#&gt; Model cost at call  24 :  3249.595 
#&gt; Model cost at call  26 :  3249.595 
#&gt; Model cost at call  27 :  3249.519 
#&gt; Model cost at call  31 :  2615.891 
#&gt; Model cost at call  32 :  2615.888 
#&gt; Model cost at call  39 :  989.1788 
#&gt; Model cost at call  44 :  989.1772 
#&gt; Model cost at call  45 :  989.1771 
#&gt; Model cost at call  47 :  647.4307 
#&gt; Model cost at call  50 :  647.4302 
#&gt; Model cost at call  51 :  647.4261 
#&gt; Model cost at call  54 :  626.7937 
#&gt; Model cost at call  55 :  626.7935 
#&gt; Model cost at call  56 :  626.7931 
#&gt; Model cost at call  61 :  527.9042 
#&gt; Model cost at call  62 :  527.9041 
#&gt; Model cost at call  68 :  505.8828 
#&gt; Model cost at call  70 :  505.8828 
#&gt; Model cost at call  73 :  505.8827 
#&gt; Model cost at call  75 :  452.8932 
#&gt; Model cost at call  77 :  452.893 
#&gt; Model cost at call  82 :  414.4918 
#&gt; Model cost at call  83 :  414.4918 
#&gt; Model cost at call  84 :  414.4918 
#&gt; Model cost at call  88 :  414.4917 
#&gt; Model cost at call  89 :  408.2617 
#&gt; Model cost at call  90 :  408.2616 
#&gt; Model cost at call  91 :  408.2616 
#&gt; Model cost at call  95 :  408.2615 
#&gt; Model cost at call  96 :  384.4461 
#&gt; Model cost at call  102 :  384.4461 
#&gt; Model cost at call  104 :  383.4905 
#&gt; Model cost at call  105 :  383.4905 
#&gt; Model cost at call  106 :  383.4905 
#&gt; Model cost at call  109 :  383.4904 
#&gt; Model cost at call  111 :  381.8828 
#&gt; Model cost at call  112 :  381.8827 
#&gt; Model cost at call  118 :  380.8499 
#&gt; Model cost at call  120 :  380.8499 
#&gt; Model cost at call  123 :  380.8499 
#&gt; Model cost at call  125 :  379.1403 
#&gt; Model cost at call  127 :  379.1402 
#&gt; Model cost at call  132 :  376.4962 
#&gt; Model cost at call  133 :  373.0958 
#&gt; Model cost at call  134 :  365.247 
#&gt; Model cost at call  137 :  365.2469 
#&gt; Model cost at call  142 :  360.8231 
#&gt; Model cost at call  143 :  360.8231 
#&gt; Model cost at call  146 :  360.8231 
#&gt; Model cost at call  148 :  360.8231 
#&gt; Model cost at call  149 :  358.3976 
#&gt; Model cost at call  152 :  358.3976 
#&gt; Model cost at call  154 :  358.3976 
#&gt; Model cost at call  156 :  355.9066 
#&gt; Model cost at call  157 :  355.9066 
#&gt; Model cost at call  163 :  354.3386 
#&gt; Model cost at call  164 :  353.6335 
#&gt; Model cost at call  172 :  353.2094 
#&gt; Model cost at call  173 :  353.2094 
#&gt; Model cost at call  174 :  353.2093 
#&gt; Model cost at call  177 :  353.2093 
#&gt; Model cost at call  178 :  353.2093 
#&gt; Model cost at call  179 :  352.6641 
#&gt; Model cost at call  182 :  352.6641 
#&gt; Model cost at call  183 :  352.6641 
#&gt; Model cost at call  186 :  352.4908 
#&gt; Model cost at call  187 :  352.4429 
#&gt; Model cost at call  195 :  352.3246 
#&gt; Model cost at call  203 :  352.2858 
#&gt; Model cost at call  204 :  352.2858 
#&gt; Model cost at call  205 :  352.2858 
#&gt; Model cost at call  206 :  352.2858 
#&gt; Model cost at call  207 :  352.2858 
#&gt; Model cost at call  210 :  352.2332 
#&gt; Model cost at call  211 :  352.2081 
#&gt; Model cost at call  214 :  352.2081 
#&gt; Model cost at call  216 :  352.2081 
#&gt; Model cost at call  218 :  352.2049 
#&gt; Model cost at call  219 :  352.2049 
#&gt; Model cost at call  220 :  352.2049 
#&gt; Model cost at call  226 :  352.2048 
#&gt; Model cost at call  228 :  352.2048 
#&gt; Model cost at call  231 :  352.2048 
#&gt; Model cost at call  232 :  352.2048 
#&gt; Model cost at call  238 :  352.2048 
#&gt; Model cost at call  239 :  352.2048 
#&gt; Model cost at call  251 :  352.2048 
#&gt; Model cost at call  264 :  352.2048 
#&gt; Model cost at call  283 :  352.2048 
#&gt; Model cost at call  284 :  352.2048 
#&gt; Model cost at call  285 :  352.2048 
#&gt; Model cost at call  286 :  352.2048 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='co'># Use starting parameters from parent only SFORB fit (not really needed in this case)</span>
<span class='no'>fit.SFORB</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"SFORB"</span>, <span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  10426.65 
#&gt; Model cost at call  3 :  10426.65 
#&gt; Model cost at call  6 :  1995.326 
#&gt; Model cost at call  7 :  1995.322 
#&gt; Model cost at call  8 :  1995.14 
#&gt; Model cost at call  11 :  718.5568 
#&gt; Model cost at call  12 :  718.5566 
#&gt; Model cost at call  13 :  718.5563 
#&gt; Model cost at call  16 :  408.9208 
#&gt; Model cost at call  17 :  408.9204 
#&gt; Model cost at call  18 :  408.9204 
#&gt; Model cost at call  20 :  408.9203 
#&gt; Model cost at call  21 :  402.7935 
#&gt; Model cost at call  22 :  402.793 
#&gt; Model cost at call  26 :  202.0443 
#&gt; Model cost at call  28 :  202.0443 
#&gt; Model cost at call  30 :  202.0443 
#&gt; Model cost at call  31 :  196.438 
#&gt; Model cost at call  36 :  196.1947 
#&gt; Model cost at call  37 :  196.1947 
#&gt; Model cost at call  41 :  192.9338 
#&gt; Model cost at call  43 :  192.9338 
#&gt; Model cost at call  45 :  192.9338 
#&gt; Model cost at call  46 :  191.6452 
#&gt; Model cost at call  47 :  191.6452 
#&gt; Model cost at call  51 :  188.9328 
#&gt; Model cost at call  54 :  188.9328 
#&gt; Model cost at call  55 :  188.9328 
#&gt; Model cost at call  56 :  183.6499 
#&gt; Model cost at call  59 :  183.6499 
#&gt; Model cost at call  62 :  181.9039 
#&gt; Model cost at call  67 :  179.0543 
#&gt; Model cost at call  68 :  179.0543 
#&gt; Model cost at call  69 :  179.0543 
#&gt; Model cost at call  70 :  179.0543 
#&gt; Model cost at call  72 :  176.749 
#&gt; Model cost at call  73 :  176.2321 
#&gt; Model cost at call  74 :  176.232 
#&gt; Model cost at call  75 :  176.232 
#&gt; Model cost at call  76 :  176.232 
#&gt; Model cost at call  78 :  175.3914 
#&gt; Model cost at call  79 :  175.3914 
#&gt; Model cost at call  81 :  175.3913 
#&gt; Model cost at call  83 :  174.6257 
#&gt; Model cost at call  84 :  174.6257 
#&gt; Model cost at call  89 :  174.1476 
#&gt; Model cost at call  92 :  174.1476 
#&gt; Model cost at call  93 :  174.1476 
#&gt; Model cost at call  94 :  173.8512 
#&gt; Model cost at call  99 :  173.6987 
#&gt; Model cost at call  104 :  173.6813 
#&gt; Model cost at call  105 :  173.6813 
#&gt; Model cost at call  106 :  173.6813 
#&gt; Model cost at call  107 :  173.6813 
#&gt; Model cost at call  108 :  173.6813 
#&gt; Model cost at call  109 :  173.6802 
#&gt; Model cost at call  110 :  173.6802 
#&gt; Model cost at call  111 :  173.6802 
#&gt; Model cost at call  112 :  173.6802 
#&gt; Model cost at call  113 :  173.6802 
#&gt; Model cost at call  114 :  173.6799 
#&gt; Model cost at call  116 :  173.6799 
#&gt; Model cost at call  118 :  173.6799 
#&gt; Model cost at call  119 :  173.6799 
#&gt; Model cost at call  120 :  173.6799 
#&gt; Model cost at call  129 :  173.6799 
#&gt; Model cost at call  141 :  173.6799 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='no'>fit.SFORB_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.SFORB</span>$<span class='no'>bparms.ode</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  18365.33 
#&gt; Model cost at call  2 :  18365.33 
#&gt; Model cost at call  8 :  11666.4 
#&gt; Model cost at call  9 :  10992.15 
#&gt; Model cost at call  10 :  10992.13 
#&gt; Model cost at call  11 :  10991.95 
#&gt; Model cost at call  12 :  10991.17 
#&gt; Model cost at call  14 :  10990.65 
#&gt; Model cost at call  17 :  3940.801 
#&gt; Model cost at call  20 :  3940.8 
#&gt; Model cost at call  22 :  3940.798 
#&gt; Model cost at call  24 :  3241.199 
#&gt; Model cost at call  27 :  3241.198 
#&gt; Model cost at call  30 :  3241.192 
#&gt; Model cost at call  31 :  1518.749 
#&gt; Model cost at call  37 :  1518.747 
#&gt; Model cost at call  39 :  1091.836 
#&gt; Model cost at call  42 :  1091.835 
#&gt; Model cost at call  43 :  1091.835 
#&gt; Model cost at call  44 :  1091.804 
#&gt; Model cost at call  46 :  927.8538 
#&gt; Model cost at call  49 :  927.8529 
#&gt; Model cost at call  53 :  638.102 
#&gt; Model cost at call  56 :  638.1019 
#&gt; Model cost at call  58 :  638.1018 
#&gt; Model cost at call  61 :  560.4352 
#&gt; Model cost at call  62 :  560.435 
#&gt; Model cost at call  63 :  560.4327 
#&gt; Model cost at call  68 :  423.9629 
#&gt; Model cost at call  69 :  423.9629 
#&gt; Model cost at call  70 :  423.9629 
#&gt; Model cost at call  71 :  423.9628 
#&gt; Model cost at call  73 :  423.9628 
#&gt; Model cost at call  75 :  395.8015 
#&gt; Model cost at call  78 :  395.8013 
#&gt; Model cost at call  79 :  395.8013 
#&gt; Model cost at call  83 :  365.6975 
#&gt; Model cost at call  84 :  365.6975 
#&gt; Model cost at call  88 :  365.6975 
#&gt; Model cost at call  91 :  362.9843 
#&gt; Model cost at call  93 :  362.9843 
#&gt; Model cost at call  98 :  361.5506 
#&gt; Model cost at call  99 :  361.5506 
#&gt; Model cost at call  100 :  361.5505 
#&gt; Model cost at call  105 :  359.0492 
#&gt; Model cost at call  106 :  359.0492 
#&gt; Model cost at call  112 :  357.6574 
#&gt; Model cost at call  113 :  357.6574 
#&gt; Model cost at call  114 :  357.6574 
#&gt; Model cost at call  115 :  357.6574 
#&gt; Model cost at call  119 :  355.4518 
#&gt; Model cost at call  120 :  355.4518 
#&gt; Model cost at call  127 :  354.9045 
#&gt; Model cost at call  129 :  354.9045 
#&gt; Model cost at call  131 :  354.9045 
#&gt; Model cost at call  134 :  354.4168 
#&gt; Model cost at call  135 :  354.4168 
#&gt; Model cost at call  137 :  354.4167 
#&gt; Model cost at call  141 :  353.7901 
#&gt; Model cost at call  142 :  353.7901 
#&gt; Model cost at call  143 :  353.7899 
#&gt; Model cost at call  149 :  353.3233 
#&gt; Model cost at call  151 :  353.3233 
#&gt; Model cost at call  154 :  353.3233 
#&gt; Model cost at call  156 :  353.2939 
#&gt; Model cost at call  158 :  353.2938 
#&gt; Model cost at call  159 :  353.2938 
#&gt; Model cost at call  160 :  353.2938 
#&gt; Model cost at call  163 :  353.0571 
#&gt; Model cost at call  165 :  353.0571 
#&gt; Model cost at call  170 :  352.9457 
#&gt; Model cost at call  171 :  352.7458 
#&gt; Model cost at call  173 :  352.7457 
#&gt; Model cost at call  178 :  352.6377 
#&gt; Model cost at call  180 :  352.6377 
#&gt; Model cost at call  183 :  352.6377 
#&gt; Model cost at call  185 :  352.5377 
#&gt; Model cost at call  187 :  352.5377 
#&gt; Model cost at call  188 :  352.5377 
#&gt; Model cost at call  191 :  352.5377 
#&gt; Model cost at call  193 :  352.4479 
#&gt; Model cost at call  195 :  352.4479 
#&gt; Model cost at call  198 :  352.4479 
#&gt; Model cost at call  200 :  352.4021 
#&gt; Model cost at call  202 :  352.4021 
#&gt; Model cost at call  205 :  352.4021 
#&gt; Model cost at call  207 :  352.3465 
#&gt; Model cost at call  210 :  352.3465 
#&gt; Model cost at call  214 :  352.3031 
#&gt; Model cost at call  216 :  352.3031 
#&gt; Model cost at call  221 :  352.2632 
#&gt; Model cost at call  223 :  352.2632 
#&gt; Model cost at call  228 :  352.2367 
#&gt; Model cost at call  230 :  352.2367 
#&gt; Model cost at call  231 :  352.2367 
#&gt; Model cost at call  233 :  352.2367 
#&gt; Model cost at call  235 :  352.215 
#&gt; Model cost at call  238 :  352.215 
#&gt; Model cost at call  239 :  352.215 
#&gt; Model cost at call  242 :  352.207 
#&gt; Model cost at call  245 :  352.207 
#&gt; Model cost at call  250 :  352.2053 
#&gt; Model cost at call  251 :  352.2053 
#&gt; Model cost at call  253 :  352.2053 
#&gt; Model cost at call  256 :  352.2053 
#&gt; Model cost at call  258 :  352.2053 
#&gt; Model cost at call  259 :  352.2052 
#&gt; Model cost at call  260 :  352.2052 
#&gt; Model cost at call  263 :  352.2052 
#&gt; Model cost at call  271 :  352.2048 
#&gt; Model cost at call  273 :  352.2048 
#&gt; Model cost at call  274 :  352.2048 
#&gt; Model cost at call  281 :  352.2048 
#&gt; Model cost at call  282 :  352.2048 
#&gt; Model cost at call  286 :  352.2048 
#&gt; Model cost at call  289 :  352.2048 
#&gt; Model cost at call  294 :  352.2048 
#&gt; Model cost at call  296 :  352.2048 
#&gt; Model cost at call  300 :  352.2048 
#&gt; Model cost at call  307 :  352.2048 
#&gt; Model cost at call  325 :  352.2048 
#&gt; Model cost at call  331 :  352.2048 
#&gt; Model cost at call  333 :  352.2048 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'>


<span class='co'># Weighted fits, including IRLS</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'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
                      <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></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'>f.noweight</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  15156.12 
#&gt; Model cost at call  2 :  15156.12 
#&gt; Model cost at call  6 :  8243.644 
#&gt; Model cost at call  12 :  6290.714 
#&gt; Model cost at call  13 :  6290.684 
#&gt; Model cost at call  15 :  6290.453 
#&gt; Model cost at call  18 :  1700.75 
#&gt; Model cost at call  20 :  1700.612 
#&gt; Model cost at call  24 :  1190.923 
#&gt; Model cost at call  26 :  1190.922 
#&gt; Model cost at call  29 :  1017.417 
#&gt; Model cost at call  31 :  1017.417 
#&gt; Model cost at call  33 :  1017.416 
#&gt; Model cost at call  34 :  644.0471 
#&gt; Model cost at call  36 :  644.0469 
#&gt; Model cost at call  38 :  644.0468 
#&gt; Model cost at call  39 :  590.5024 
#&gt; Model cost at call  41 :  590.5021 
#&gt; Model cost at call  43 :  590.5015 
#&gt; Model cost at call  44 :  543.2187 
#&gt; Model cost at call  45 :  543.2183 
#&gt; Model cost at call  46 :  543.2182 
#&gt; Model cost at call  50 :  391.348 
#&gt; Model cost at call  51 :  391.3479 
#&gt; Model cost at call  56 :  386.4789 
#&gt; Model cost at call  58 :  386.4789 
#&gt; Model cost at call  60 :  386.4779 
#&gt; Model cost at call  61 :  384.0686 
#&gt; Model cost at call  63 :  384.0686 
#&gt; Model cost at call  66 :  382.7812 
#&gt; Model cost at call  68 :  382.7812 
#&gt; Model cost at call  70 :  382.7812 
#&gt; Model cost at call  71 :  378.9272 
#&gt; Model cost at call  73 :  378.9272 
#&gt; Model cost at call  75 :  378.9272 
#&gt; Model cost at call  76 :  377.4846 
#&gt; Model cost at call  78 :  377.4846 
#&gt; Model cost at call  81 :  375.9738 
#&gt; Model cost at call  83 :  375.9738 
#&gt; Model cost at call  86 :  375.3387 
#&gt; Model cost at call  88 :  375.3387 
#&gt; Model cost at call  91 :  374.5774 
#&gt; Model cost at call  93 :  374.5774 
#&gt; Model cost at call  95 :  374.5774 
#&gt; Model cost at call  96 :  373.5447 
#&gt; Model cost at call  100 :  373.5446 
#&gt; Model cost at call  102 :  373.2643 
#&gt; Model cost at call  104 :  373.2643 
#&gt; Model cost at call  107 :  372.6799 
#&gt; Model cost at call  111 :  372.6798 
#&gt; Model cost at call  114 :  372.6325 
#&gt; Model cost at call  116 :  372.6325 
#&gt; Model cost at call  119 :  372.6159 
#&gt; Model cost at call  121 :  372.6159 
#&gt; Model cost at call  123 :  372.6159 
#&gt; Model cost at call  124 :  372.5845 
#&gt; Model cost at call  126 :  372.5845 
#&gt; Model cost at call  129 :  372.5375 
#&gt; Model cost at call  130 :  372.4771 
#&gt; Model cost at call  131 :  372.2008 
#&gt; Model cost at call  132 :  371.4923 
#&gt; Model cost at call  134 :  371.4923 
#&gt; Model cost at call  137 :  371.3022 
#&gt; Model cost at call  139 :  371.3022 
#&gt; Model cost at call  143 :  371.2271 
#&gt; Model cost at call  144 :  371.2271 
#&gt; Model cost at call  148 :  371.2202 
#&gt; Model cost at call  149 :  371.215 
#&gt; Model cost at call  152 :  371.215 
#&gt; Model cost at call  154 :  371.2136 
#&gt; Model cost at call  155 :  371.2136 
#&gt; Model cost at call  156 :  371.2136 
#&gt; Model cost at call  160 :  371.2134 
#&gt; Model cost at call  164 :  371.2134 
#&gt; Model cost at call  167 :  371.2134 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='fu'>summary</span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:47 2016 
#&gt; Date of summary: Fri Nov 18 15:19:47 2016 
#&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.748 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
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted   residual
#&gt;     0   parent    99.46 9.960e+01 -1.385e-01
#&gt;     0   parent   102.04 9.960e+01  2.442e+00
#&gt;     1   parent    93.50 9.024e+01  3.262e+00
#&gt;     1   parent    92.50 9.024e+01  2.262e+00
#&gt;     3   parent    63.23 7.407e+01 -1.084e+01
#&gt;     3   parent    68.99 7.407e+01 -5.083e+00
#&gt;     7   parent    52.32 4.991e+01  2.408e+00
#&gt;     7   parent    55.13 4.991e+01  5.218e+00
#&gt;    14   parent    27.27 2.501e+01  2.257e+00
#&gt;    14   parent    26.64 2.501e+01  1.627e+00
#&gt;    21   parent    11.50 1.253e+01 -1.035e+00
#&gt;    21   parent    11.64 1.253e+01 -8.946e-01
#&gt;    35   parent     2.85 3.148e+00 -2.979e-01
#&gt;    35   parent     2.91 3.148e+00 -2.379e-01
#&gt;    50   parent     0.69 7.162e-01 -2.624e-02
#&gt;    50   parent     0.63 7.162e-01 -8.624e-02
#&gt;    75   parent     0.05 6.074e-02 -1.074e-02
#&gt;    75   parent     0.06 6.074e-02 -7.381e-04
#&gt;   100   parent       NA 5.151e-03         NA
#&gt;   100   parent       NA 5.151e-03         NA
#&gt;   120   parent       NA 7.155e-04         NA
#&gt;   120   parent       NA 7.155e-04         NA
#&gt;     0       m1     0.00 0.000e+00  0.000e+00
#&gt;     0       m1     0.00 0.000e+00  0.000e+00
#&gt;     1       m1     4.84 4.803e+00  3.704e-02
#&gt;     1       m1     5.64 4.803e+00  8.370e-01
#&gt;     3       m1    12.91 1.302e+01 -1.140e-01
#&gt;     3       m1    12.96 1.302e+01 -6.400e-02
#&gt;     7       m1    22.97 2.504e+01 -2.075e+00
#&gt;     7       m1    24.47 2.504e+01 -5.748e-01
#&gt;    14       m1    41.69 3.669e+01  5.000e+00
#&gt;    14       m1    33.21 3.669e+01 -3.480e+00
#&gt;    21       m1    44.37 4.165e+01  2.717e+00
#&gt;    21       m1    46.44 4.165e+01  4.787e+00
#&gt;    35       m1    41.22 4.331e+01 -2.093e+00
#&gt;    35       m1    37.95 4.331e+01 -5.363e+00
#&gt;    50       m1    41.19 4.122e+01 -2.831e-02
#&gt;    50       m1    40.01 4.122e+01 -1.208e+00
#&gt;    75       m1    40.09 3.645e+01  3.643e+00
#&gt;    75       m1    33.85 3.645e+01 -2.597e+00
#&gt;   100       m1    31.04 3.198e+01 -9.416e-01
#&gt;   100       m1    33.13 3.198e+01  1.148e+00
#&gt;   120       m1    25.15 2.879e+01 -3.640e+00
#&gt;   120       m1    33.31 2.879e+01  4.520e+00</div><div class='input'><span class='no'>f.irls</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"obs"</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  15156.12 
#&gt; Model cost at call  2 :  15156.12 
#&gt; Model cost at call  6 :  8243.644 
#&gt; Model cost at call  12 :  6290.714 
#&gt; Model cost at call  13 :  6290.684 
#&gt; Model cost at call  15 :  6290.453 
#&gt; Model cost at call  18 :  1700.75 
#&gt; Model cost at call  20 :  1700.612 
#&gt; Model cost at call  24 :  1190.923 
#&gt; Model cost at call  26 :  1190.922 
#&gt; Model cost at call  29 :  1017.417 
#&gt; Model cost at call  31 :  1017.417 
#&gt; Model cost at call  33 :  1017.416 
#&gt; Model cost at call  34 :  644.0471 
#&gt; Model cost at call  36 :  644.0469 
#&gt; Model cost at call  38 :  644.0468 
#&gt; Model cost at call  39 :  590.5024 
#&gt; Model cost at call  41 :  590.5021 
#&gt; Model cost at call  43 :  590.5015 
#&gt; Model cost at call  44 :  543.2187 
#&gt; Model cost at call  45 :  543.2183 
#&gt; Model cost at call  46 :  543.2182 
#&gt; Model cost at call  50 :  391.348 
#&gt; Model cost at call  51 :  391.3479 
#&gt; Model cost at call  56 :  386.4789 
#&gt; Model cost at call  58 :  386.4789 
#&gt; Model cost at call  60 :  386.4779 
#&gt; Model cost at call  61 :  384.0686 
#&gt; Model cost at call  63 :  384.0686 
#&gt; Model cost at call  66 :  382.7812 
#&gt; Model cost at call  68 :  382.7812 
#&gt; Model cost at call  70 :  382.7812 
#&gt; Model cost at call  71 :  378.9272 
#&gt; Model cost at call  73 :  378.9272 
#&gt; Model cost at call  75 :  378.9272 
#&gt; Model cost at call  76 :  377.4846 
#&gt; Model cost at call  78 :  377.4846 
#&gt; Model cost at call  81 :  375.9738 
#&gt; Model cost at call  83 :  375.9738 
#&gt; Model cost at call  86 :  375.3387 
#&gt; Model cost at call  88 :  375.3387 
#&gt; Model cost at call  91 :  374.5774 
#&gt; Model cost at call  93 :  374.5774 
#&gt; Model cost at call  95 :  374.5774 
#&gt; Model cost at call  96 :  373.5447 
#&gt; Model cost at call  100 :  373.5446 
#&gt; Model cost at call  102 :  373.2643 
#&gt; Model cost at call  104 :  373.2643 
#&gt; Model cost at call  107 :  372.6799 
#&gt; Model cost at call  111 :  372.6798 
#&gt; Model cost at call  114 :  372.6325 
#&gt; Model cost at call  116 :  372.6325 
#&gt; Model cost at call  119 :  372.6159 
#&gt; Model cost at call  121 :  372.6159 
#&gt; Model cost at call  123 :  372.6159 
#&gt; Model cost at call  124 :  372.5845 
#&gt; Model cost at call  126 :  372.5845 
#&gt; Model cost at call  129 :  372.5375 
#&gt; Model cost at call  130 :  372.4771 
#&gt; Model cost at call  131 :  372.2008 
#&gt; Model cost at call  132 :  371.4923 
#&gt; Model cost at call  134 :  371.4923 
#&gt; Model cost at call  137 :  371.3022 
#&gt; Model cost at call  139 :  371.3022 
#&gt; Model cost at call  143 :  371.2271 
#&gt; Model cost at call  144 :  371.2271 
#&gt; Model cost at call  148 :  371.2202 
#&gt; Model cost at call  149 :  371.215 
#&gt; Model cost at call  152 :  371.215 
#&gt; Model cost at call  154 :  371.2136 
#&gt; Model cost at call  155 :  371.2136 
#&gt; Model cost at call  156 :  371.2136 
#&gt; Model cost at call  160 :  371.2134 
#&gt; Model cost at call  164 :  371.2134 
#&gt; Model cost at call  167 :  371.2134 
#&gt; IRLS based on variance estimates for each observed variable
#&gt; Initial variance estimates are:
#&gt;    parent        m1 
#&gt; 11.552581  7.421226 
#&gt; Model cost at call  186 :  40 
#&gt; Model cost at call  188 :  40 
#&gt; Model cost at call  194 :  39.99562 
#&gt; Model cost at call  195 :  39.99562 
#&gt; Model cost at call  201 :  39.9956 
#&gt; Model cost at call  203 :  39.99528 
#&gt; Model cost at call  205 :  39.99528 
#&gt; Model cost at call  207 :  39.99528 
#&gt; Model cost at call  209 :  39.99515 
#&gt; Model cost at call  211 :  39.99515 
#&gt; Model cost at call  214 :  39.99515 
#&gt; Model cost at call  215 :  39.99505 
#&gt; Model cost at call  217 :  39.99505 
#&gt; Model cost at call  219 :  39.99505 
#&gt; Model cost at call  220 :  39.99489 
#&gt; Model cost at call  222 :  39.99489 
#&gt; Model cost at call  224 :  39.99489 
#&gt; Model cost at call  225 :  39.99479 
#&gt; Model cost at call  227 :  39.99479 
#&gt; Model cost at call  231 :  39.99467 
#&gt; Model cost at call  234 :  39.99467 
#&gt; Model cost at call  235 :  39.99467 
#&gt; Model cost at call  236 :  39.99458 
#&gt; Model cost at call  238 :  39.99458 
#&gt; Model cost at call  239 :  39.99458 
#&gt; Model cost at call  241 :  39.99452 
#&gt; Model cost at call  242 :  39.99444 
#&gt; Model cost at call  243 :  39.99433 
#&gt; Model cost at call  245 :  39.99433 
#&gt; Model cost at call  248 :  39.99383 
#&gt; Model cost at call  250 :  39.99383 
#&gt; Model cost at call  251 :  39.99383 
#&gt; Model cost at call  252 :  39.99383 
#&gt; Model cost at call  253 :  39.9935 
#&gt; Model cost at call  254 :  39.99309 
#&gt; Model cost at call  256 :  39.99309 
#&gt; Model cost at call  261 :  39.99295 
#&gt; Model cost at call  264 :  39.99295 
#&gt; Model cost at call  267 :  39.99281 
#&gt; Model cost at call  272 :  39.99281 
#&gt; Model cost at call  273 :  39.99278 
#&gt; Model cost at call  276 :  39.99278 
#&gt; Model cost at call  278 :  39.99278 
#&gt; Model cost at call  279 :  39.99278 
#&gt; Model cost at call  281 :  39.99278 
#&gt; Model cost at call  283 :  39.99278 
#&gt; Model cost at call  286 :  39.99278 
#&gt; Model cost at call  289 :  39.99278 
#&gt; Model cost at call  290 :  39.99278 
#&gt; Iteration 1 yields variance estimates:
#&gt;    parent        m1 
#&gt; 11.573172  7.407968 
#&gt; Sum of squared differences to last variance estimates: 1.5e-05 
#&gt; Iteration 2 yields variance estimates:
#&gt;    parent        m1 
#&gt; 11.573405  7.407846 
#&gt; Sum of squared differences to last variance estimates: 1.7e-09 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='fu'>summary</span>(<span class='no'>f.irls</span>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:50 2016 
#&gt; Date of summary: Fri Nov 18 15:19:50 2016 
#&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 486 model solutions performed in 2.052 s
#&gt; 
#&gt; Weighting: none then iterative reweighting method obs
#&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.67000    1.79200 96.04000 103.300
#&gt; log_k_parent   -2.31200    0.04560 -2.40400  -2.220
#&gt; log_k_m1       -5.25100    0.12510 -5.50500  -4.998
#&gt; f_parent_ilr_1  0.03785    0.06318 -0.09027   0.166
#&gt; 
#&gt; Parameter correlation:
#&gt;                parent_0 log_k_parent log_k_m1 f_parent_ilr_1
#&gt; parent_0         1.0000       0.5083  -0.1979        -0.6148
#&gt; log_k_parent     0.5083       1.0000  -0.3894        -0.6062
#&gt; log_k_m1        -0.1979      -0.3894   1.0000         0.7417
#&gt; f_parent_ilr_1  -0.6148      -0.6062   0.7417         1.0000
#&gt; 
#&gt; Residual standard error: 1.054 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.67000  55.630 8.183e-37 96.040000 1.033e+02
#&gt; k_parent        0.09906  21.930 1.016e-22  0.090310 1.087e-01
#&gt; k_m1            0.00524   7.996 8.487e-10  0.004066 6.753e-03
#&gt; f_parent_to_m1  0.51340  23.000 2.039e-23  0.468100 5.584e-01
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.399       4 15
#&gt; parent     6.466       2  7
#&gt; m1         4.679       2  8
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_m1   0.5134
#&gt; parent_sink 0.4866
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   6.997  23.24
#&gt; m1     132.282 439.43
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted   residual   err
#&gt;     0   parent    99.46 9.967e+01 -2.122e-01 3.402
#&gt;     0   parent   102.04 9.967e+01  2.368e+00 3.402
#&gt;     1   parent    93.50 9.027e+01  3.228e+00 3.402
#&gt;     1   parent    92.50 9.027e+01  2.228e+00 3.402
#&gt;     3   parent    63.23 7.405e+01 -1.082e+01 3.402
#&gt;     3   parent    68.99 7.405e+01 -5.056e+00 3.402
#&gt;     7   parent    52.32 4.982e+01  2.499e+00 3.402
#&gt;     7   parent    55.13 4.982e+01  5.309e+00 3.402
#&gt;    14   parent    27.27 2.490e+01  2.367e+00 3.402
#&gt;    14   parent    26.64 2.490e+01  1.737e+00 3.402
#&gt;    21   parent    11.50 1.245e+01 -9.477e-01 3.402
#&gt;    21   parent    11.64 1.245e+01 -8.077e-01 3.402
#&gt;    35   parent     2.85 3.110e+00 -2.600e-01 3.402
#&gt;    35   parent     2.91 3.110e+00 -2.000e-01 3.402
#&gt;    50   parent     0.69 7.037e-01 -1.375e-02 3.402
#&gt;    50   parent     0.63 7.037e-01 -7.375e-02 3.402
#&gt;    75   parent     0.05 5.913e-02 -9.134e-03 3.402
#&gt;    75   parent     0.06 5.913e-02  8.661e-04 3.402
#&gt;   100   parent       NA 4.969e-03         NA 3.402
#&gt;   100   parent       NA 4.969e-03         NA 3.402
#&gt;   120   parent       NA 6.852e-04         NA 3.402
#&gt;   120   parent       NA 6.852e-04         NA 3.402
#&gt;     0       m1     0.00 0.000e+00  0.000e+00 2.722
#&gt;     0       m1     0.00 0.000e+00  0.000e+00 2.722
#&gt;     1       m1     4.84 4.813e+00  2.672e-02 2.722
#&gt;     1       m1     5.64 4.813e+00  8.267e-01 2.722
#&gt;     3       m1    12.91 1.305e+01 -1.378e-01 2.722
#&gt;     3       m1    12.96 1.305e+01 -8.779e-02 2.722
#&gt;     7       m1    22.97 2.508e+01 -2.106e+00 2.722
#&gt;     7       m1    24.47 2.508e+01 -6.061e-01 2.722
#&gt;    14       m1    41.69 3.671e+01  4.983e+00 2.722
#&gt;    14       m1    33.21 3.671e+01 -3.497e+00 2.722
#&gt;    21       m1    44.37 4.165e+01  2.719e+00 2.722
#&gt;    21       m1    46.44 4.165e+01  4.789e+00 2.722
#&gt;    35       m1    41.22 4.329e+01 -2.069e+00 2.722
#&gt;    35       m1    37.95 4.329e+01 -5.339e+00 2.722
#&gt;    50       m1    41.19 4.119e+01 -3.388e-03 2.722
#&gt;    50       m1    40.01 4.119e+01 -1.183e+00 2.722
#&gt;    75       m1    40.09 3.644e+01  3.652e+00 2.722
#&gt;    75       m1    33.85 3.644e+01 -2.588e+00 2.722
#&gt;   100       m1    31.04 3.199e+01 -9.497e-01 2.722
#&gt;   100       m1    33.13 3.199e+01  1.140e+00 2.722
#&gt;   120       m1    25.15 2.881e+01 -3.659e+00 2.722
#&gt;   120       m1    33.31 2.881e+01  4.501e+00 2.722</div><div class='input'><span class='no'>f.w.mean</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>weight</span> <span class='kw'>=</span> <span class='st'>"mean"</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  19.80132 
#&gt; Model cost at call  2 :  19.80132 
#&gt; Model cost at call  6 :  10.68776 
#&gt; Model cost at call  12 :  7.14353 
#&gt; Model cost at call  13 :  7.143529 
#&gt; Model cost at call  15 :  7.143511 
#&gt; Model cost at call  18 :  2.189024 
#&gt; Model cost at call  20 :  2.189019 
#&gt; Model cost at call  23 :  1.587262 
#&gt; Model cost at call  25 :  1.587261 
#&gt; Model cost at call  26 :  1.58726 
#&gt; Model cost at call  28 :  1.036794 
#&gt; Model cost at call  29 :  1.036794 
#&gt; Model cost at call  30 :  1.036793 
#&gt; Model cost at call  34 :  0.4939937 
#&gt; Model cost at call  35 :  0.4939937 
#&gt; Model cost at call  38 :  0.4939936 
#&gt; Model cost at call  39 :  0.4018506 
#&gt; Model cost at call  43 :  0.4018505 
#&gt; Model cost at call  45 :  0.3797853 
#&gt; Model cost at call  51 :  0.3669779 
#&gt; Model cost at call  55 :  0.3669778 
#&gt; Model cost at call  56 :  0.3585654 
#&gt; Model cost at call  57 :  0.3533252 
#&gt; Model cost at call  62 :  0.3502505 
#&gt; Model cost at call  64 :  0.3502505 
#&gt; Model cost at call  66 :  0.3502505 
#&gt; Model cost at call  67 :  0.3501535 
#&gt; Model cost at call  72 :  0.3501187 
#&gt; Model cost at call  74 :  0.3501187 
#&gt; Model cost at call  75 :  0.3501187 
#&gt; Model cost at call  77 :  0.3500378 
#&gt; Model cost at call  79 :  0.3500378 
#&gt; Model cost at call  83 :  0.349831 
#&gt; Model cost at call  88 :  0.3494286 
#&gt; Model cost at call  93 :  0.3488101 
#&gt; Model cost at call  98 :  0.3481444 
#&gt; Model cost at call  103 :  0.3478528 
#&gt; Model cost at call  108 :  0.3478092 
#&gt; Model cost at call  109 :  0.3478092 
#&gt; Model cost at call  113 :  0.347807 
#&gt; Model cost at call  116 :  0.347807 
#&gt; Model cost at call  117 :  0.347807 
#&gt; Model cost at call  119 :  0.347807 
#&gt; Model cost at call  120 :  0.347807 
#&gt; Model cost at call  125 :  0.347807 
#&gt; Model cost at call  126 :  0.347807 
#&gt; Model cost at call  128 :  0.347807 
#&gt; Model cost at call  137 :  0.347807 
#&gt; Model cost at call  148 :  0.347807 
#&gt; Model cost at call  152 :  0.347807 
#&gt; Model cost at call  154 :  0.347807 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='fu'>summary</span>(<span class='no'>f.w.mean</span>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:50 2016 
#&gt; Date of summary: Fri Nov 18 15:19:50 2016 
#&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 155 model solutions performed in 0.636 s
#&gt; 
#&gt; Weighting: mean
#&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.7300    1.93200 95.81000 103.6000
#&gt; log_k_parent    -2.3090    0.04837 -2.40700  -2.2110
#&gt; log_k_m1        -5.2550    0.12070 -5.49900  -5.0100
#&gt; f_parent_ilr_1   0.0354    0.06344 -0.09327   0.1641
#&gt; 
#&gt; Parameter correlation:
#&gt;                parent_0 log_k_parent log_k_m1 f_parent_ilr_1
#&gt; parent_0         1.0000       0.5004  -0.2143        -0.6514
#&gt; log_k_parent     0.5004       1.0000  -0.4282        -0.6383
#&gt; log_k_m1        -0.2143      -0.4282   1.0000         0.7390
#&gt; f_parent_ilr_1  -0.6514      -0.6383   0.7390         1.0000
#&gt; 
#&gt; Residual standard error: 0.09829 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.730000  51.630 1.166e-35 95.81000 1.036e+02
#&gt; k_parent        0.099360  20.670 7.304e-22  0.09007 1.096e-01
#&gt; k_m1            0.005224   8.287 3.649e-10  0.00409 6.672e-03
#&gt; f_parent_to_m1  0.512500  22.860 2.497e-23  0.46710 5.578e-01
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.401       4 15
#&gt; parent     6.473       2  7
#&gt; m1         4.671       2  8
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_m1   0.5125
#&gt; parent_sink 0.4875
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   6.976  23.18
#&gt; m1     132.696 440.81
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted   residual
#&gt;     0   parent    99.46 99.730570  -0.270570
#&gt;     0   parent   102.04 99.730570   2.309430
#&gt;     1   parent    93.50 90.298055   3.201945
#&gt;     1   parent    92.50 90.298055   2.201945
#&gt;     3   parent    63.23 74.025028 -10.795028
#&gt;     3   parent    68.99 74.025028  -5.035028
#&gt;     7   parent    52.32 49.748382   2.571618
#&gt;     7   parent    55.13 49.748382   5.381618
#&gt;    14   parent    27.27 24.815876   2.454124
#&gt;    14   parent    26.64 24.815876   1.824124
#&gt;    21   parent    11.50 12.378849  -0.878849
#&gt;    21   parent    11.64 12.378849  -0.738849
#&gt;    35   parent     2.85  3.080219  -0.230219
#&gt;    35   parent     2.91  3.080219  -0.170219
#&gt;    50   parent     0.69  0.693958  -0.003958
#&gt;    50   parent     0.63  0.693958  -0.063958
#&gt;    75   parent     0.05  0.057888  -0.007888
#&gt;    75   parent     0.06  0.057888   0.002112
#&gt;   100   parent       NA  0.004829         NA
#&gt;   100   parent       NA  0.004829         NA
#&gt;   120   parent       NA  0.000662         NA
#&gt;   120   parent       NA  0.000662         NA
#&gt;     0       m1     0.00  0.000000   0.000000
#&gt;     0       m1     0.00  0.000000   0.000000
#&gt;     1       m1     4.84  4.821488   0.018512
#&gt;     1       m1     5.64  4.821488   0.818512
#&gt;     3       m1    12.91 13.066692  -0.156692
#&gt;     3       m1    12.96 13.066692  -0.106692
#&gt;     7       m1    22.97 25.101058  -2.131058
#&gt;     7       m1    24.47 25.101058  -0.631058
#&gt;    14       m1    41.69 36.720923   4.969077
#&gt;    14       m1    33.21 36.720923  -3.510923
#&gt;    21       m1    44.37 41.648353   2.721647
#&gt;    21       m1    46.44 41.648353   4.791647
#&gt;    35       m1    41.22 43.269225  -2.049225
#&gt;    35       m1    37.95 43.269225  -5.319225
#&gt;    50       m1    41.19 41.173639   0.016361
#&gt;    50       m1    40.01 41.173639  -1.163639
#&gt;    75       m1    40.09 36.431224   3.658776
#&gt;    75       m1    33.85 36.431224  -2.581224
#&gt;   100       m1    31.04 31.996124  -0.956124
#&gt;   100       m1    33.13 31.996124   1.133876
#&gt;   120       m1    25.15 28.824128  -3.674128
#&gt;   120       m1    33.31 28.824128   4.485872</div><div class='input'><span class='no'>f.w.value</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='fu'>subset</span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"value"</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  11.21571 
#&gt; Model cost at call  2 :  11.21571 
#&gt; Model cost at call  3 :  11.21571 
#&gt; Model cost at call  8 :  11.12803 
#&gt; Model cost at call  10 :  11.128 
#&gt; Model cost at call  13 :  10.88016 
#&gt; Model cost at call  15 :  10.88016 
#&gt; Model cost at call  18 :  10.58819 
#&gt; Model cost at call  20 :  10.58819 
#&gt; Model cost at call  23 :  9.71699 
#&gt; Model cost at call  24 :  7.794026 
#&gt; Model cost at call  26 :  7.794026 
#&gt; Model cost at call  31 :  6.89734 
#&gt; Model cost at call  33 :  6.897337 
#&gt; Model cost at call  36 :  5.2239 
#&gt; Model cost at call  37 :  3.357735 
#&gt; Model cost at call  41 :  3.357733 
#&gt; Model cost at call  44 :  2.982323 
#&gt; Model cost at call  46 :  2.982322 
#&gt; Model cost at call  49 :  2.703946 
#&gt; Model cost at call  50 :  2.080395 
#&gt; Model cost at call  55 :  0.5307591 
#&gt; Model cost at call  56 :  0.5307591 
#&gt; Model cost at call  57 :  0.5307591 
#&gt; Model cost at call  59 :  0.5307584 
#&gt; Model cost at call  60 :  0.3240066 
#&gt; Model cost at call  61 :  0.3240066 
#&gt; Model cost at call  64 :  0.3240066 
#&gt; Model cost at call  65 :  0.2601108 
#&gt; Model cost at call  70 :  0.2414055 
#&gt; Model cost at call  74 :  0.2414055 
#&gt; Model cost at call  75 :  0.2404251 
#&gt; Model cost at call  80 :  0.2404087 
#&gt; Model cost at call  82 :  0.2404087 
#&gt; Model cost at call  85 :  0.2404054 
#&gt; Model cost at call  88 :  0.2404054 
#&gt; Model cost at call  92 :  0.2403931 
#&gt; Model cost at call  93 :  0.2403784 
#&gt; Model cost at call  98 :  0.2403784 
#&gt; Model cost at call  99 :  0.2403322 
#&gt; Model cost at call  104 :  0.2402188 
#&gt; Model cost at call  109 :  0.2400275 
#&gt; Model cost at call  114 :  0.239844 
#&gt; Model cost at call  119 :  0.2397153 
#&gt; Model cost at call  120 :  0.2397153 
#&gt; Model cost at call  124 :  0.2396978 
#&gt; Model cost at call  126 :  0.2396978 
#&gt; Model cost at call  130 :  0.239697 
#&gt; Model cost at call  131 :  0.2396963 
#&gt; Model cost at call  133 :  0.2396963 
#&gt; Model cost at call  138 :  0.2396962 
#&gt; Model cost at call  139 :  0.2396962 
#&gt; Model cost at call  141 :  0.2396962 
#&gt; Model cost at call  144 :  0.2396962 
#&gt; Model cost at call  147 :  0.2396962 
#&gt; Model cost at call  156 :  0.2396962 
#&gt; Model cost at call  167 :  0.2396962 
#&gt; Model cost at call  169 :  0.2396962 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='fu'>summary</span>(<span class='no'>f.w.value</span>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:51 2016 
#&gt; Date of summary: Fri Nov 18 15:19:51 2016 
#&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 174 model solutions performed in 0.789 s
#&gt; 
#&gt; Weighting: manual
#&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.6600   2.712000 94.14000 105.2000
#&gt; log_k_parent    -2.2980   0.008118 -2.31500  -2.2820
#&gt; log_k_m1        -5.2410   0.096690 -5.43800  -5.0450
#&gt; f_parent_ilr_1   0.0231   0.057990 -0.09474   0.1409
#&gt; 
#&gt; Parameter correlation:
#&gt;                parent_0 log_k_parent log_k_m1 f_parent_ilr_1
#&gt; parent_0        1.00000       0.6844 -0.08687        -0.7564
#&gt; log_k_parent    0.68435       1.0000 -0.12694        -0.5812
#&gt; log_k_m1       -0.08687      -0.1269  1.00000         0.5195
#&gt; f_parent_ilr_1 -0.75644      -0.5812  0.51951         1.0000
#&gt; 
#&gt; Residual standard error: 0.08396 on 34 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.660000   36.75 2.957e-29 94.14000 1.052e+02
#&gt; k_parent        0.100400  123.20 5.927e-47  0.09878 1.021e-01
#&gt; k_m1            0.005295   10.34 2.447e-12  0.00435 6.444e-03
#&gt; f_parent_to_m1  0.508200   24.79 1.184e-23  0.46660 5.497e-01
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.461       4 15
#&gt; parent     6.520       2  7
#&gt; m1         4.744       2  8
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_m1   0.5082
#&gt; parent_sink 0.4918
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   6.902  22.93
#&gt; m1     130.916 434.89
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted   residual    err
#&gt;     0   parent    99.46  99.65571  -0.195714  99.46
#&gt;     0   parent   102.04  99.65571   2.384286 102.04
#&gt;     1   parent    93.50  90.13383   3.366170  93.50
#&gt;     1   parent    92.50  90.13383   2.366170  92.50
#&gt;     3   parent    63.23  73.73252 -10.502518  63.23
#&gt;     3   parent    68.99  73.73252  -4.742518  68.99
#&gt;     7   parent    52.32  49.34027   2.979728  52.32
#&gt;     7   parent    55.13  49.34027   5.789728  55.13
#&gt;    14   parent    27.27  24.42873   2.841271  27.27
#&gt;    14   parent    26.64  24.42873   2.211271  26.64
#&gt;    21   parent    11.50  12.09484  -0.594842  11.50
#&gt;    21   parent    11.64  12.09484  -0.454842  11.64
#&gt;    35   parent     2.85   2.96482  -0.114824   2.85
#&gt;    35   parent     2.91   2.96482  -0.054824   2.91
#&gt;    50   parent     0.69   0.65733   0.032670   0.69
#&gt;    50   parent     0.63   0.65733  -0.027330   0.63
#&gt;    75   parent     0.05   0.05339  -0.003386   0.05
#&gt;    75   parent     0.06   0.05339   0.006614   0.06
#&gt;     1       m1     4.84   4.82570   0.014301   4.84
#&gt;     1       m1     5.64   4.82570   0.814301   5.64
#&gt;     3       m1    12.91  13.06402  -0.154020  12.91
#&gt;     3       m1    12.96  13.06402  -0.104020  12.96
#&gt;     7       m1    22.97  25.04656  -2.076564  22.97
#&gt;     7       m1    24.47  25.04656  -0.576564  24.47
#&gt;    14       m1    41.69  36.53601   5.153988  41.69
#&gt;    14       m1    33.21  36.53601  -3.326012  33.21
#&gt;    21       m1    44.37  41.34639   3.023609  44.37
#&gt;    21       m1    46.44  41.34639   5.093609  46.44
#&gt;    35       m1    41.22  42.82669  -1.606690  41.22
#&gt;    35       m1    37.95  42.82669  -4.876690  37.95
#&gt;    50       m1    41.19  40.67342   0.516578  41.19
#&gt;    50       m1    40.01  40.67342  -0.663422  40.01
#&gt;    75       m1    40.09  35.91105   4.178947  40.09
#&gt;    75       m1    33.85  35.91105  -2.061053  33.85
#&gt;   100       m1    31.04  31.48161  -0.441612  31.04
#&gt;   100       m1    33.13  31.48161   1.648388  33.13
#&gt;   120       m1    25.15  28.32018  -3.170181  25.15
#&gt;   120       m1    33.31  28.32018   4.989819  33.31</div><div class='input'>


<span class='co'># Manual weighting</span>
<span class='no'>dw</span> <span class='kw'>&lt;-</span> <span class='no'>FOCUS_2006_D</span>
<span class='no'>errors</span> <span class='kw'>&lt;-</span> <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>1</span>)
<span class='no'>dw</span>$<span class='no'>err.man</span> <span class='kw'>&lt;-</span> <span class='no'>errors</span>[<span class='no'>FOCUS_2006_D</span>$<span class='no'>name</span>]
<span class='no'>f.w.man</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>dw</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"err.man"</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  3949.676 
#&gt; Model cost at call  2 :  3949.676 
#&gt; Model cost at call  5 :  3949.676 
#&gt; Model cost at call  6 :  2252.859 
#&gt; Model cost at call  8 :  2252.858 
#&gt; Model cost at call  9 :  2252.826 
#&gt; Model cost at call  13 :  1567.343 
#&gt; Model cost at call  14 :  1567.342 
#&gt; Model cost at call  15 :  1567.333 
#&gt; Model cost at call  18 :  1041.524 
#&gt; Model cost at call  19 :  1041.522 
#&gt; Model cost at call  24 :  840.4649 
#&gt; Model cost at call  26 :  840.4646 
#&gt; Model cost at call  29 :  782.303 
#&gt; Model cost at call  31 :  782.3028 
#&gt; Model cost at call  34 :  664.539 
#&gt; Model cost at call  36 :  664.5389 
#&gt; Model cost at call  40 :  615.7908 
#&gt; Model cost at call  42 :  615.7907 
#&gt; Model cost at call  45 :  569.5971 
#&gt; Model cost at call  47 :  569.597 
#&gt; Model cost at call  50 :  517.3175 
#&gt; Model cost at call  52 :  517.3173 
#&gt; Model cost at call  56 :  464.8158 
#&gt; Model cost at call  58 :  464.8157 
#&gt; Model cost at call  62 :  433.0031 
#&gt; Model cost at call  64 :  433.003 
#&gt; Model cost at call  67 :  423.7407 
#&gt; Model cost at call  69 :  423.7406 
#&gt; Model cost at call  70 :  423.7392 
#&gt; Model cost at call  72 :  346.2781 
#&gt; Model cost at call  74 :  346.278 
#&gt; Model cost at call  75 :  346.2779 
#&gt; Model cost at call  78 :  334.5399 
#&gt; Model cost at call  80 :  334.5398 
#&gt; Model cost at call  83 :  324.139 
#&gt; Model cost at call  85 :  324.1389 
#&gt; Model cost at call  88 :  319.7514 
#&gt; Model cost at call  90 :  319.7514 
#&gt; Model cost at call  94 :  300.9426 
#&gt; Model cost at call  96 :  300.9425 
#&gt; Model cost at call  100 :  295.8803 
#&gt; Model cost at call  102 :  295.8803 
#&gt; Model cost at call  105 :  290.3288 
#&gt; Model cost at call  107 :  290.3287 
#&gt; Model cost at call  111 :  284.3257 
#&gt; Model cost at call  113 :  284.3257 
#&gt; Model cost at call  116 :  282.3972 
#&gt; Model cost at call  118 :  282.3972 
#&gt; Model cost at call  122 :  273.7385 
#&gt; Model cost at call  124 :  273.7385 
#&gt; Model cost at call  128 :  271.8379 
#&gt; Model cost at call  130 :  271.8379 
#&gt; Model cost at call  133 :  270.064 
#&gt; Model cost at call  135 :  270.064 
#&gt; Model cost at call  138 :  268.0107 
#&gt; Model cost at call  140 :  268.0107 
#&gt; Model cost at call  144 :  265.6194 
#&gt; Model cost at call  146 :  265.6194 
#&gt; Model cost at call  148 :  265.6194 
#&gt; Model cost at call  149 :  263.4825 
#&gt; Model cost at call  151 :  263.4825 
#&gt; Model cost at call  153 :  263.4824 
#&gt; Model cost at call  154 :  262.0988 
#&gt; Model cost at call  156 :  262.0988 
#&gt; Model cost at call  160 :  260.7078 
#&gt; Model cost at call  162 :  260.7078 
#&gt; Model cost at call  165 :  259.9453 
#&gt; Model cost at call  167 :  259.9453 
#&gt; Model cost at call  170 :  258.9623 
#&gt; Model cost at call  172 :  258.9623 
#&gt; Model cost at call  174 :  258.962 
#&gt; Model cost at call  176 :  258.0119 
#&gt; Model cost at call  178 :  258.0119 
#&gt; Model cost at call  180 :  258.0119 
#&gt; Model cost at call  181 :  257.8698 
#&gt; Model cost at call  183 :  257.8698 
#&gt; Model cost at call  186 :  256.8608 
#&gt; Model cost at call  188 :  256.8608 
#&gt; Model cost at call  190 :  256.8608 
#&gt; Model cost at call  191 :  256.2306 
#&gt; Model cost at call  193 :  256.2306 
#&gt; Model cost at call  195 :  256.2305 
#&gt; Model cost at call  196 :  255.7119 
#&gt; Model cost at call  198 :  255.7118 
#&gt; Model cost at call  201 :  255.3323 
#&gt; Model cost at call  203 :  255.3323 
#&gt; Model cost at call  205 :  255.3323 
#&gt; Model cost at call  206 :  254.6653 
#&gt; Model cost at call  208 :  254.6653 
#&gt; Model cost at call  211 :  254.3984 
#&gt; Model cost at call  213 :  254.3984 
#&gt; Model cost at call  216 :  253.3199 
#&gt; Model cost at call  218 :  253.3199 
#&gt; Model cost at call  220 :  253.3198 
#&gt; Model cost at call  221 :  252.4845 
#&gt; Model cost at call  223 :  252.4845 
#&gt; Model cost at call  225 :  252.4845 
#&gt; Model cost at call  226 :  251.6917 
#&gt; Model cost at call  229 :  251.6917 
#&gt; Model cost at call  230 :  251.6917 
#&gt; Model cost at call  233 :  251.0189 
#&gt; Model cost at call  235 :  251.0189 
#&gt; Model cost at call  238 :  250.6912 
#&gt; Model cost at call  240 :  250.6912 
#&gt; Model cost at call  243 :  250.5546 
#&gt; Model cost at call  245 :  250.5546 
#&gt; Model cost at call  248 :  250.466 
#&gt; Model cost at call  249 :  250.3744 
#&gt; Model cost at call  250 :  249.9681 
#&gt; Model cost at call  251 :  249.2215 
#&gt; Model cost at call  260 :  248.919 
#&gt; Model cost at call  264 :  248.919 
#&gt; Model cost at call  265 :  248.8876 
#&gt; Model cost at call  267 :  248.8876 
#&gt; Model cost at call  270 :  248.8521 
#&gt; Model cost at call  271 :  248.8178 
#&gt; Model cost at call  272 :  248.6837 
#&gt; Model cost at call  273 :  248.5989 
#&gt; Model cost at call  276 :  248.5989 
#&gt; Model cost at call  278 :  248.5935 
#&gt; Model cost at call  280 :  248.5935 
#&gt; Model cost at call  282 :  248.5935 
#&gt; Model cost at call  283 :  248.5902 
#&gt; Model cost at call  284 :  248.5902 
#&gt; Model cost at call  289 :  248.5902 
#&gt; Model cost at call  298 :  248.5902 
#&gt; Model cost at call  309 :  248.5902 
#&gt; Model cost at call  311 :  248.5902 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='fu'>summary</span>(<span class='no'>f.w.man</span>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:53 2016 
#&gt; Date of summary: Fri Nov 18 15:19:53 2016 
#&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 316 model solutions performed in 1.337 s
#&gt; 
#&gt; Weighting: manual
#&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.49000    1.33200 96.7800 102.2000
#&gt; log_k_parent   -2.32100    0.03550 -2.3930  -2.2490
#&gt; log_k_m1       -5.24100    0.21280 -5.6730  -4.8100
#&gt; f_parent_ilr_1  0.04571    0.08966 -0.1361   0.2275
#&gt; 
#&gt; Parameter correlation:
#&gt;                parent_0 log_k_parent log_k_m1 f_parent_ilr_1
#&gt; parent_0        1.00000       0.5312 -0.09455        -0.3351
#&gt; log_k_parent    0.53123       1.0000 -0.17800        -0.3360
#&gt; log_k_m1       -0.09455      -0.1780  1.00000         0.7616
#&gt; f_parent_ilr_1 -0.33513      -0.3360  0.76156         1.0000
#&gt; 
#&gt; Residual standard error: 2.628 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.490000   74.69 2.222e-41 96.780000 1.022e+02
#&gt; k_parent        0.098140   28.17 2.012e-26  0.091320 1.055e-01
#&gt; k_m1            0.005292    4.70 1.873e-05  0.003437 8.148e-03
#&gt; f_parent_to_m1  0.516200   16.30 1.686e-18  0.452000 5.798e-01
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.400       4 15
#&gt; parent     6.454       2  7
#&gt; m1         4.708       2  8
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_m1   0.5162
#&gt; parent_sink 0.4838
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   7.063  23.46
#&gt; m1     130.971 435.08
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted   residual err
#&gt;     0   parent    99.46 99.485977  -0.025977   1
#&gt;     0   parent   102.04 99.485977   2.554023   1
#&gt;     1   parent    93.50 90.186118   3.313882   1
#&gt;     1   parent    92.50 90.186118   2.313882   1
#&gt;     3   parent    63.23 74.113162 -10.883162   1
#&gt;     3   parent    68.99 74.113162  -5.123162   1
#&gt;     7   parent    52.32 50.050295   2.269705   1
#&gt;     7   parent    55.13 50.050295   5.079705   1
#&gt;    14   parent    27.27 25.179750   2.090250   1
#&gt;    14   parent    26.64 25.179750   1.460250   1
#&gt;    21   parent    11.50 12.667654  -1.167654   1
#&gt;    21   parent    11.64 12.667654  -1.027654   1
#&gt;    35   parent     2.85  3.206164  -0.356164   1
#&gt;    35   parent     2.91  3.206164  -0.296164   1
#&gt;    50   parent     0.69  0.735619  -0.045619   1
#&gt;    50   parent     0.63  0.735619  -0.105619   1
#&gt;    75   parent     0.05  0.063256  -0.013256   1
#&gt;    75   parent     0.06  0.063256  -0.003256   1
#&gt;   100   parent       NA  0.005439         NA   1
#&gt;   100   parent       NA  0.005439         NA   1
#&gt;   120   parent       NA  0.000764         NA   1
#&gt;   120   parent       NA  0.000764         NA   1
#&gt;     0       m1     0.00  0.000000   0.000000   2
#&gt;     0       m1     0.00  0.000000   0.000000   2
#&gt;     1       m1     4.84  4.787287   0.052713   2
#&gt;     1       m1     5.64  4.787287   0.852713   2
#&gt;     3       m1    12.91 12.987848  -0.077848   2
#&gt;     3       m1    12.96 12.987848  -0.027848   2
#&gt;     7       m1    22.97 24.996945  -2.026945   2
#&gt;     7       m1    24.47 24.996945  -0.526945   2
#&gt;    14       m1    41.69 36.663527   5.026473   2
#&gt;    14       m1    33.21 36.663527  -3.453527   2
#&gt;    21       m1    44.37 41.656812   2.713188   2
#&gt;    21       m1    46.44 41.656812   4.783188   2
#&gt;    35       m1    41.22 43.350311  -2.130311   2
#&gt;    35       m1    37.95 43.350311  -5.400311   2
#&gt;    50       m1    41.19 41.256364  -0.066364   2
#&gt;    50       m1    40.01 41.256364  -1.246364   2
#&gt;    75       m1    40.09 36.460566   3.629434   2
#&gt;    75       m1    33.85 36.460566  -2.610566   2
#&gt;   100       m1    31.04 31.969288  -0.929288   2
#&gt;   100       m1    33.13 31.969288   1.160712   2
#&gt;   120       m1    25.15 28.760615  -3.610615   2
#&gt;   120       m1    33.31 28.760615   4.549385   2</div><div class='input'><span class='no'>f.w.man.irls</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>dw</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"err.man"</span>,
                       <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"obs"</span>)</div><div class='output co'>#&gt; Model cost at call  1 :  3949.676 
#&gt; Model cost at call  2 :  3949.676 
#&gt; Model cost at call  5 :  3949.676 
#&gt; Model cost at call  6 :  2252.859 
#&gt; Model cost at call  8 :  2252.858 
#&gt; Model cost at call  9 :  2252.826 
#&gt; Model cost at call  13 :  1567.343 
#&gt; Model cost at call  14 :  1567.342 
#&gt; Model cost at call  15 :  1567.333 
#&gt; Model cost at call  18 :  1041.524 
#&gt; Model cost at call  19 :  1041.522 
#&gt; Model cost at call  24 :  840.4649 
#&gt; Model cost at call  26 :  840.4646 
#&gt; Model cost at call  29 :  782.303 
#&gt; Model cost at call  31 :  782.3028 
#&gt; Model cost at call  34 :  664.539 
#&gt; Model cost at call  36 :  664.5389 
#&gt; Model cost at call  40 :  615.7908 
#&gt; Model cost at call  42 :  615.7907 
#&gt; Model cost at call  45 :  569.5971 
#&gt; Model cost at call  47 :  569.597 
#&gt; Model cost at call  50 :  517.3175 
#&gt; Model cost at call  52 :  517.3173 
#&gt; Model cost at call  56 :  464.8158 
#&gt; Model cost at call  58 :  464.8157 
#&gt; Model cost at call  62 :  433.0031 
#&gt; Model cost at call  64 :  433.003 
#&gt; Model cost at call  67 :  423.7407 
#&gt; Model cost at call  69 :  423.7406 
#&gt; Model cost at call  70 :  423.7392 
#&gt; Model cost at call  72 :  346.2781 
#&gt; Model cost at call  74 :  346.278 
#&gt; Model cost at call  75 :  346.2779 
#&gt; Model cost at call  78 :  334.5399 
#&gt; Model cost at call  80 :  334.5398 
#&gt; Model cost at call  83 :  324.139 
#&gt; Model cost at call  85 :  324.1389 
#&gt; Model cost at call  88 :  319.7514 
#&gt; Model cost at call  90 :  319.7514 
#&gt; Model cost at call  94 :  300.9426 
#&gt; Model cost at call  96 :  300.9425 
#&gt; Model cost at call  100 :  295.8803 
#&gt; Model cost at call  102 :  295.8803 
#&gt; Model cost at call  105 :  290.3288 
#&gt; Model cost at call  107 :  290.3287 
#&gt; Model cost at call  111 :  284.3257 
#&gt; Model cost at call  113 :  284.3257 
#&gt; Model cost at call  116 :  282.3972 
#&gt; Model cost at call  118 :  282.3972 
#&gt; Model cost at call  122 :  273.7385 
#&gt; Model cost at call  124 :  273.7385 
#&gt; Model cost at call  128 :  271.8379 
#&gt; Model cost at call  130 :  271.8379 
#&gt; Model cost at call  133 :  270.064 
#&gt; Model cost at call  135 :  270.064 
#&gt; Model cost at call  138 :  268.0107 
#&gt; Model cost at call  140 :  268.0107 
#&gt; Model cost at call  144 :  265.6194 
#&gt; Model cost at call  146 :  265.6194 
#&gt; Model cost at call  148 :  265.6194 
#&gt; Model cost at call  149 :  263.4825 
#&gt; Model cost at call  151 :  263.4825 
#&gt; Model cost at call  153 :  263.4824 
#&gt; Model cost at call  154 :  262.0988 
#&gt; Model cost at call  156 :  262.0988 
#&gt; Model cost at call  160 :  260.7078 
#&gt; Model cost at call  162 :  260.7078 
#&gt; Model cost at call  165 :  259.9453 
#&gt; Model cost at call  167 :  259.9453 
#&gt; Model cost at call  170 :  258.9623 
#&gt; Model cost at call  172 :  258.9623 
#&gt; Model cost at call  174 :  258.962 
#&gt; Model cost at call  176 :  258.0119 
#&gt; Model cost at call  178 :  258.0119 
#&gt; Model cost at call  180 :  258.0119 
#&gt; Model cost at call  181 :  257.8698 
#&gt; Model cost at call  183 :  257.8698 
#&gt; Model cost at call  186 :  256.8608 
#&gt; Model cost at call  188 :  256.8608 
#&gt; Model cost at call  190 :  256.8608 
#&gt; Model cost at call  191 :  256.2306 
#&gt; Model cost at call  193 :  256.2306 
#&gt; Model cost at call  195 :  256.2305 
#&gt; Model cost at call  196 :  255.7119 
#&gt; Model cost at call  198 :  255.7118 
#&gt; Model cost at call  201 :  255.3323 
#&gt; Model cost at call  203 :  255.3323 
#&gt; Model cost at call  205 :  255.3323 
#&gt; Model cost at call  206 :  254.6653 
#&gt; Model cost at call  208 :  254.6653 
#&gt; Model cost at call  211 :  254.3984 
#&gt; Model cost at call  213 :  254.3984 
#&gt; Model cost at call  216 :  253.3199 
#&gt; Model cost at call  218 :  253.3199 
#&gt; Model cost at call  220 :  253.3198 
#&gt; Model cost at call  221 :  252.4845 
#&gt; Model cost at call  223 :  252.4845 
#&gt; Model cost at call  225 :  252.4845 
#&gt; Model cost at call  226 :  251.6917 
#&gt; Model cost at call  229 :  251.6917 
#&gt; Model cost at call  230 :  251.6917 
#&gt; Model cost at call  233 :  251.0189 
#&gt; Model cost at call  235 :  251.0189 
#&gt; Model cost at call  238 :  250.6912 
#&gt; Model cost at call  240 :  250.6912 
#&gt; Model cost at call  243 :  250.5546 
#&gt; Model cost at call  245 :  250.5546 
#&gt; Model cost at call  248 :  250.466 
#&gt; Model cost at call  249 :  250.3744 
#&gt; Model cost at call  250 :  249.9681 
#&gt; Model cost at call  251 :  249.2215 
#&gt; Model cost at call  260 :  248.919 
#&gt; Model cost at call  264 :  248.919 
#&gt; Model cost at call  265 :  248.8876 
#&gt; Model cost at call  267 :  248.8876 
#&gt; Model cost at call  270 :  248.8521 
#&gt; Model cost at call  271 :  248.8178 
#&gt; Model cost at call  272 :  248.6837 
#&gt; Model cost at call  273 :  248.5989 
#&gt; Model cost at call  276 :  248.5989 
#&gt; Model cost at call  278 :  248.5935 
#&gt; Model cost at call  280 :  248.5935 
#&gt; Model cost at call  282 :  248.5935 
#&gt; Model cost at call  283 :  248.5902 
#&gt; Model cost at call  284 :  248.5902 
#&gt; Model cost at call  289 :  248.5902 
#&gt; Model cost at call  298 :  248.5902 
#&gt; Model cost at call  309 :  248.5902 
#&gt; Model cost at call  311 :  248.5902 
#&gt; IRLS based on variance estimates for each observed variable
#&gt; Initial variance estimates are:
#&gt;    parent        m1 
#&gt; 11.536305  7.443046 
#&gt; Model cost at call  317 :  40 
#&gt; Model cost at call  319 :  40 
#&gt; Model cost at call  324 :  39.98891 
#&gt; Model cost at call  325 :  39.9889 
#&gt; Model cost at call  327 :  39.98886 
#&gt; Model cost at call  331 :  39.98871 
#&gt; Model cost at call  333 :  39.97254 
#&gt; Model cost at call  336 :  39.97253 
#&gt; Model cost at call  338 :  39.96929 
#&gt; Model cost at call  340 :  39.96929 
#&gt; Model cost at call  344 :  39.96849 
#&gt; Model cost at call  346 :  39.96849 
#&gt; Model cost at call  348 :  39.96849 
#&gt; Model cost at call  349 :  39.96774 
#&gt; Model cost at call  351 :  39.96774 
#&gt; Model cost at call  353 :  39.96774 
#&gt; Model cost at call  354 :  39.96714 
#&gt; Model cost at call  356 :  39.96714 
#&gt; Model cost at call  359 :  39.96617 
#&gt; Model cost at call  361 :  39.96617 
#&gt; Model cost at call  364 :  39.96606 
#&gt; Model cost at call  366 :  39.96606 
#&gt; Model cost at call  369 :  39.96551 
#&gt; Model cost at call  371 :  39.96551 
#&gt; Model cost at call  372 :  39.96551 
#&gt; Model cost at call  375 :  39.96527 
#&gt; Model cost at call  378 :  39.96527 
#&gt; Model cost at call  379 :  39.96527 
#&gt; Model cost at call  380 :  39.96525 
#&gt; Model cost at call  382 :  39.96525 
#&gt; Model cost at call  385 :  39.9651 
#&gt; Model cost at call  387 :  39.9651 
#&gt; Model cost at call  388 :  39.9651 
#&gt; Model cost at call  390 :  39.96502 
#&gt; Model cost at call  393 :  39.96502 
#&gt; Model cost at call  396 :  39.96502 
#&gt; Model cost at call  397 :  39.96467 
#&gt; Model cost at call  398 :  39.96422 
#&gt; Model cost at call  399 :  39.9624 
#&gt; Model cost at call  400 :  39.95909 
#&gt; Model cost at call  402 :  39.95909 
#&gt; Model cost at call  405 :  39.9571 
#&gt; Model cost at call  407 :  39.95709 
#&gt; Model cost at call  413 :  39.95479 
#&gt; Model cost at call  414 :  39.95479 
#&gt; Model cost at call  415 :  39.95479 
#&gt; Model cost at call  417 :  39.95479 
#&gt; Model cost at call  419 :  39.95398 
#&gt; Model cost at call  422 :  39.95398 
#&gt; Model cost at call  424 :  39.95387 
#&gt; Model cost at call  429 :  39.95384 
#&gt; Model cost at call  432 :  39.95384 
#&gt; Model cost at call  435 :  39.95384 
#&gt; Model cost at call  437 :  39.95384 
#&gt; Model cost at call  438 :  39.95384 
#&gt; Model cost at call  446 :  39.95384 
#&gt; Model cost at call  455 :  39.95384 
#&gt; Model cost at call  469 :  39.95384 
#&gt; Model cost at call  473 :  39.95384 
#&gt; Iteration 1 yields variance estimates:
#&gt;    parent        m1 
#&gt; 11.572891  7.408116 
#&gt; Sum of squared differences to last variance estimates: 7e-05 
#&gt; Iteration 2 yields variance estimates:
#&gt;    parent        m1 
#&gt; 11.573402  7.407847 
#&gt; Sum of squared differences to last variance estimates: 8.1e-09 
#&gt; Optimisation by method Port successfully terminated.</div><div class='input'><span class='fu'>summary</span>(<span class='no'>f.w.man.irls</span>)</div><div class='output co'>#&gt; mkin version:    0.9.44.9000 
#&gt; R version:       3.3.2 
#&gt; Date of fit:     Fri Nov 18 15:19:55 2016 
#&gt; Date of summary: Fri Nov 18 15:19:55 2016 
#&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 648 model solutions performed in 2.716 s
#&gt; 
#&gt; Weighting: manual then iterative reweighting method obs
#&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.67000    1.79200 96.04000 103.300
#&gt; log_k_parent   -2.31200    0.04560 -2.40400  -2.220
#&gt; log_k_m1       -5.25100    0.12510 -5.50500  -4.998
#&gt; f_parent_ilr_1  0.03785    0.06318 -0.09027   0.166
#&gt; 
#&gt; Parameter correlation:
#&gt;                parent_0 log_k_parent log_k_m1 f_parent_ilr_1
#&gt; parent_0         1.0000       0.5083  -0.1979        -0.6147
#&gt; log_k_parent     0.5083       1.0000  -0.3894        -0.6062
#&gt; log_k_m1        -0.1979      -0.3894   1.0000         0.7417
#&gt; f_parent_ilr_1  -0.6147      -0.6062   0.7417         1.0000
#&gt; 
#&gt; Residual standard error: 1.054 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.67000  55.630 8.178e-37 96.040000 1.033e+02
#&gt; k_parent        0.09906  21.930 1.015e-22  0.090310 1.087e-01
#&gt; k_m1            0.00524   7.996 8.488e-10  0.004066 6.753e-03
#&gt; f_parent_to_m1  0.51340  23.000 2.038e-23  0.468100 5.584e-01
#&gt; 
#&gt; Chi2 error levels in percent:
#&gt;          err.min n.optim df
#&gt; All data   6.399       4 15
#&gt; parent     6.466       2  7
#&gt; m1         4.679       2  8
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_m1   0.5134
#&gt; parent_sink 0.4866
#&gt; 
#&gt; Estimated disappearance times:
#&gt;           DT50   DT90
#&gt; parent   6.997  23.24
#&gt; m1     132.281 439.43
#&gt; 
#&gt; Data:
#&gt;  time variable observed predicted   residual err.ini   err
#&gt;     0   parent    99.46 9.967e+01 -2.122e-01       1 3.402
#&gt;     0   parent   102.04 9.967e+01  2.368e+00       1 3.402
#&gt;     1   parent    93.50 9.027e+01  3.228e+00       1 3.402
#&gt;     1   parent    92.50 9.027e+01  2.228e+00       1 3.402
#&gt;     3   parent    63.23 7.405e+01 -1.082e+01       1 3.402
#&gt;     3   parent    68.99 7.405e+01 -5.056e+00       1 3.402
#&gt;     7   parent    52.32 4.982e+01  2.499e+00       1 3.402
#&gt;     7   parent    55.13 4.982e+01  5.309e+00       1 3.402
#&gt;    14   parent    27.27 2.490e+01  2.367e+00       1 3.402
#&gt;    14   parent    26.64 2.490e+01  1.737e+00       1 3.402
#&gt;    21   parent    11.50 1.245e+01 -9.477e-01       1 3.402
#&gt;    21   parent    11.64 1.245e+01 -8.077e-01       1 3.402
#&gt;    35   parent     2.85 3.110e+00 -2.600e-01       1 3.402
#&gt;    35   parent     2.91 3.110e+00 -2.000e-01       1 3.402
#&gt;    50   parent     0.69 7.037e-01 -1.375e-02       1 3.402
#&gt;    50   parent     0.63 7.037e-01 -7.375e-02       1 3.402
#&gt;    75   parent     0.05 5.913e-02 -9.134e-03       1 3.402
#&gt;    75   parent     0.06 5.913e-02  8.659e-04       1 3.402
#&gt;   100   parent       NA 4.969e-03         NA       1 3.402
#&gt;   100   parent       NA 4.969e-03         NA       1 3.402
#&gt;   120   parent       NA 6.852e-04         NA       1 3.402
#&gt;   120   parent       NA 6.852e-04         NA       1 3.402
#&gt;     0       m1     0.00 0.000e+00  0.000e+00       2 2.722
#&gt;     0       m1     0.00 0.000e+00  0.000e+00       2 2.722
#&gt;     1       m1     4.84 4.813e+00  2.672e-02       2 2.722
#&gt;     1       m1     5.64 4.813e+00  8.267e-01       2 2.722
#&gt;     3       m1    12.91 1.305e+01 -1.378e-01       2 2.722
#&gt;     3       m1    12.96 1.305e+01 -8.778e-02       2 2.722
#&gt;     7       m1    22.97 2.508e+01 -2.106e+00       2 2.722
#&gt;     7       m1    24.47 2.508e+01 -6.061e-01       2 2.722
#&gt;    14       m1    41.69 3.671e+01  4.983e+00       2 2.722
#&gt;    14       m1    33.21 3.671e+01 -3.497e+00       2 2.722
#&gt;    21       m1    44.37 4.165e+01  2.719e+00       2 2.722
#&gt;    21       m1    46.44 4.165e+01  4.789e+00       2 2.722
#&gt;    35       m1    41.22 4.329e+01 -2.069e+00       2 2.722
#&gt;    35       m1    37.95 4.329e+01 -5.339e+00       2 2.722
#&gt;    50       m1    41.19 4.119e+01 -3.394e-03       2 2.722
#&gt;    50       m1    40.01 4.119e+01 -1.183e+00       2 2.722
#&gt;    75       m1    40.09 3.644e+01  3.652e+00       2 2.722
#&gt;    75       m1    33.85 3.644e+01 -2.588e+00       2 2.722
#&gt;   100       m1    31.04 3.199e+01 -9.497e-01       2 2.722
#&gt;   100       m1    33.13 3.199e+01  1.140e+00       2 2.722
#&gt;   120       m1    25.15 2.881e+01 -3.659e+00       2 2.722
#&gt;   120       m1    33.31 2.881e+01  4.501e+00       2 2.722</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="#see-also">See also</a></li>

      <li><a href="#note">Note</a></li>

      <li><a href="#note">Note</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