diff options
Diffstat (limited to 'docs/reference/mkinfit.html')
-rw-r--r-- | docs/reference/mkinfit.html | 83 |
1 files changed, 44 insertions, 39 deletions
diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 3dd701d3..01c930e2 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -6,7 +6,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> +<title> + — mkinfit • mkin</title> <!-- jquery --> <script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> @@ -72,6 +73,9 @@ </li> </ul> </li> +<li> + <a href="../news/index.html">News</a> +</li> </ul> <ul class="nav navbar-nav navbar-right"> @@ -92,7 +96,8 @@ <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> + <h1> +</h1> </div> @@ -372,17 +377,17 @@ <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'><-</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'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:56:46 2016 -#> Date of summary: Thu Dec 8 07:56:46 2016 +<span class='fu'>summary</span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:44:56 2017 +#> Date of summary: Wed Mar 15 09:44:56 2017 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 64 model solutions performed in 0.145 s +#> Fitted with method Port using 64 model solutions performed in 0.146 s #> #> Weighting: none #> @@ -451,7 +456,7 @@ <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'>#> <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'><-</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'>#> user system elapsed -#> 1.172 1.232 0.904 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 1.216 1.268 0.942 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 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'>#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -528,7 +533,7 @@ #> Model cost at call 152 : 371.2134 #> Optimisation by method Port successfully terminated. #> user system elapsed -#> 0.712 0.044 0.709 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 0.712 0.040 0.703 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 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'>#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -569,10 +574,10 @@ <span class='co'># Weighted fits, including IRLS</span> <span class='no'>SFO_SFO.ff</span> <span class='kw'><-</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'>#> <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'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:56:57 2016 -#> Date of summary: Thu Dec 8 07:56:57 2016 +<span class='fu'>summary</span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:45:07 2017 +#> Date of summary: Wed Mar 15 09:45:07 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -580,7 +585,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 185 model solutions performed in 0.77 s +#> Fitted with method Port using 185 model solutions performed in 0.753 s #> #> Weighting: none #> @@ -690,10 +695,10 @@ #> 100 m1 33.13 3.198e+01 1.148e+00 #> 120 m1 25.15 2.879e+01 -3.640e+00 #> 120 m1 33.31 2.879e+01 4.520e+00</div><div class='input'><span class='no'>f.irls</span> <span class='kw'><-</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>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.irls</span>)</div><div class='output co'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:56:59 2016 -#> Date of summary: Thu Dec 8 07:56:59 2016 +<span class='fu'>summary</span>(<span class='no'>f.irls</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:45:09 2017 +#> Date of summary: Wed Mar 15 09:45:09 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -701,7 +706,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 486 model solutions performed in 2.019 s +#> Fitted with method Port using 486 model solutions performed in 2.091 s #> #> Weighting: none then iterative reweighting method obs #> @@ -811,10 +816,10 @@ #> 100 m1 33.13 3.199e+01 1.140e+00 2.722 #> 120 m1 25.15 2.881e+01 -3.659e+00 2.722 #> 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'><-</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>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.mean</span>)</div><div class='output co'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:00 2016 -#> Date of summary: Thu Dec 8 07:57:00 2016 +<span class='fu'>summary</span>(<span class='no'>f.w.mean</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:45:10 2017 +#> Date of summary: Wed Mar 15 09:45:10 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -822,7 +827,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 155 model solutions performed in 0.65 s +#> Fitted with method Port using 155 model solutions performed in 0.661 s #> #> Weighting: mean #> @@ -933,10 +938,10 @@ #> 120 m1 25.15 28.824128 -3.674128 #> 120 m1 33.31 28.824128 4.485872</div><div class='input'><span class='no'>f.w.value</span> <span class='kw'><-</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>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.value</span>)</div><div class='output co'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:01 2016 -#> Date of summary: Thu Dec 8 07:57:01 2016 +<span class='fu'>summary</span>(<span class='no'>f.w.value</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:45:11 2017 +#> Date of summary: Wed Mar 15 09:45:11 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -944,7 +949,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 174 model solutions performed in 0.713 s +#> Fitted with method Port using 174 model solutions performed in 0.724 s #> #> Weighting: manual #> @@ -1055,10 +1060,10 @@ <span class='no'>errors</span> <span class='kw'><-</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'><-</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'><-</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'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.man</span>)</div><div class='output co'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:02 2016 -#> Date of summary: Thu Dec 8 07:57:02 2016 +<span class='fu'>summary</span>(<span class='no'>f.w.man</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:45:12 2017 +#> Date of summary: Wed Mar 15 09:45:12 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1066,7 +1071,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 316 model solutions performed in 1.322 s +#> Fitted with method Port using 316 model solutions performed in 1.31 s #> #> Weighting: manual #> @@ -1177,10 +1182,10 @@ #> 120 m1 25.15 28.760615 -3.610615 2 #> 120 m1 33.31 28.760615 4.549385 2</div><div class='input'><span class='no'>f.w.man.irls</span> <span class='kw'><-</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'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"obs"</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.man.irls</span>)</div><div class='output co'>#> mkin version: 0.9.44.9000 -#> R version: 3.3.2 -#> Date of fit: Thu Dec 8 07:57:05 2016 -#> Date of summary: Thu Dec 8 07:57:05 2016 +<span class='fu'>summary</span>(<span class='no'>f.w.man.irls</span>)</div><div class='output co'>#> mkin version: 0.9.45.1 +#> R version: 3.3.3 +#> Date of fit: Wed Mar 15 09:45:15 2017 +#> Date of summary: Wed Mar 15 09:45:15 2017 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1188,7 +1193,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 648 model solutions performed in 2.818 s +#> Fitted with method Port using 648 model solutions performed in 2.766 s #> #> Weighting: manual then iterative reweighting method obs #> |