diff options
-rw-r--r-- | DESCRIPTION | 2 | ||||
-rw-r--r-- | NEWS.md | 4 | ||||
-rw-r--r-- | R/logLik.mkinfit.R | 13 | ||||
-rw-r--r-- | docs/articles/FOCUS_D.html | 2 | ||||
-rw-r--r-- | docs/articles/FOCUS_L.html | 38 | ||||
-rw-r--r-- | docs/articles/mkin.html | 2 | ||||
-rw-r--r-- | docs/articles/twa.html | 2 | ||||
-rw-r--r-- | docs/articles/web_only/FOCUS_Z.html | 2 | ||||
-rw-r--r-- | docs/articles/web_only/compiled_models.html | 12 | ||||
-rw-r--r-- | docs/news/index.html | 7 | ||||
-rw-r--r-- | docs/reference/Extract.mmkin.html | 10 | ||||
-rw-r--r-- | docs/reference/logLik.mkinfit.html | 9 | ||||
-rw-r--r-- | docs/reference/mccall81_245T.html | 12 | ||||
-rw-r--r-- | docs/reference/mkinfit.html | 44 | ||||
-rw-r--r-- | docs/reference/mkinmod.html | 2 | ||||
-rw-r--r-- | docs/reference/mkinpredict.html | 4 | ||||
-rw-r--r-- | docs/reference/mmkin.html | 4 | ||||
-rw-r--r-- | docs/reference/summary.mkinfit.html | 6 | ||||
-rw-r--r-- | docs/reference/transform_odeparms.html | 24 | ||||
-rw-r--r-- | man/logLik.mkinfit.Rd | 6 |
20 files changed, 111 insertions, 94 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index 4b5fd905..f2f1d6ea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: mkin Type: Package Title: Kinetic Evaluation of Chemical Degradation Data Version: 0.9.47.6 -Date: 2018-11-23 +Date: 2018-11-26 Authors@R: c(person("Johannes", "Ranke", role = c("aut", "cre", "cph"), email = "jranke@uni-bremen.de", comment = c(ORCID = "0000-0003-4371-6538")), @@ -1,4 +1,6 @@ -# mkin 0.9.47.6 (2018-09-21) +# mkin 0.9.47.6 (2018-11-26) + +- Add the function 'logLik.mkinfit.R' which makes it possible to calculate an AIC for mkinfit objects - 'add_err': Respect the argument giving the number of replicates in the synthetic dataset diff --git a/R/logLik.mkinfit.R b/R/logLik.mkinfit.R index c30cc099..d3f4232d 100644 --- a/R/logLik.mkinfit.R +++ b/R/logLik.mkinfit.R @@ -19,12 +19,21 @@ logLik.mkinfit <- function(object, ...) { y_ij <- object$data$observed yhat_ij <- object$data$predicted if (is.null(object$data$err)) { + # For unweighted fits we estimate a single value for sigma from the residuals err <- sd(object$data$residual) n_var_comp <- 1 # Number of variance components estimated } else { err <- object$data$err - if (object$reweight.method == "obs") n_var_comp <- length(object$var_ms_unweighted) - else n_var_comp <- 2 + # For weighted fits we check for variance models used in IRLS + # If the variance values (err) were given and were not + # reweighted, the number of variance components estimated is zero + if (is.null(object$reweight.method)) { + n_var_comp <- 0 + } else { + n_var_comp <- switch(object$reweight.method, + obs = length(object$var_ms_unweighted), + tc = 2) + } } prob_dens <- dnorm(y_ij, yhat_ij, err) val <- log(prod(prob_dens)) diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index b03e7612..0d463f63 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -84,7 +84,7 @@ <h1>Example evaluation of FOCUS Example Dataset D</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-11-23</h4> + <h4 class="date">2018-11-26</h4> <div class="hidden name"><code>FOCUS_D.Rmd</code></div> diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html index e83664bc..dc562002 100644 --- a/docs/articles/FOCUS_L.html +++ b/docs/articles/FOCUS_L.html @@ -84,7 +84,7 @@ <h1>Example evaluation of FOCUS Laboratory Data L1 to L3</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-11-23</h4> + <h4 class="date">2018-11-26</h4> <div class="hidden name"><code>FOCUS_L.Rmd</code></div> @@ -110,8 +110,8 @@ <a class="sourceLine" id="cb2-2" data-line-number="2"><span class="kw">summary</span>(m.L1.SFO)</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:25 2018 -## Date of summary: Fri Nov 23 20:47:25 2018 +## Date of fit: Mon Nov 26 09:07:07 2018 +## Date of summary: Mon Nov 26 09:07:07 2018 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent @@ -201,15 +201,15 @@ <div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="kw">summary</span>(m.L1.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:26 2018 -## Date of summary: Fri Nov 23 20:47:26 2018 +## Date of fit: Mon Nov 26 09:07:09 2018 +## Date of summary: Mon Nov 26 09:07:09 2018 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 611 model solutions performed in 1.467 s +## Fitted with method Port using 611 model solutions performed in 1.481 s ## ## Weighting: none ## @@ -296,15 +296,15 @@ <div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="kw">summary</span>(m.L2.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:27 2018 -## Date of summary: Fri Nov 23 20:47:27 2018 +## Date of fit: Mon Nov 26 09:07:10 2018 +## Date of summary: Mon Nov 26 09:07:10 2018 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 81 model solutions performed in 0.192 s +## Fitted with method Port using 81 model solutions performed in 0.191 s ## ## Weighting: none ## @@ -367,8 +367,8 @@ <div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="kw">summary</span>(m.L2.DFOP, <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:28 2018 -## Date of summary: Fri Nov 23 20:47:28 2018 +## Date of fit: Mon Nov 26 09:07:11 2018 +## Date of summary: Mon Nov 26 09:07:11 2018 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * @@ -377,7 +377,7 @@ ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 336 model solutions performed in 0.822 s +## Fitted with method Port using 336 model solutions performed in 0.86 s ## ## Weighting: none ## @@ -459,8 +459,8 @@ <div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="kw">summary</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]])</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:29 2018 -## Date of summary: Fri Nov 23 20:47:29 2018 +## Date of fit: Mon Nov 26 09:07:12 2018 +## Date of summary: Mon Nov 26 09:07:12 2018 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * @@ -469,7 +469,7 @@ ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 137 model solutions performed in 0.336 s +## Fitted with method Port using 137 model solutions performed in 0.339 s ## ## Weighting: none ## @@ -560,8 +560,8 @@ <div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb26-1" data-line-number="1"><span class="kw">summary</span>(mm.L4[[<span class="st">"SFO"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:29 2018 -## Date of summary: Fri Nov 23 20:47:30 2018 +## Date of fit: Mon Nov 26 09:07:12 2018 +## Date of summary: Mon Nov 26 09:07:13 2018 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent @@ -620,8 +620,8 @@ <div class="sourceCode" id="cb28"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb28-1" data-line-number="1"><span class="kw">summary</span>(mm.L4[[<span class="st">"FOMC"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</a></code></pre></div> <pre><code>## mkin version used for fitting: 0.9.47.6 ## R version used for fitting: 3.5.1 -## Date of fit: Fri Nov 23 20:47:30 2018 -## Date of summary: Fri Nov 23 20:47:30 2018 +## Date of fit: Mon Nov 26 09:07:13 2018 +## Date of summary: Mon Nov 26 09:07:13 2018 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index 4ead1062..e73b989a 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -84,7 +84,7 @@ <h1>Introduction to mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-11-23</h4> + <h4 class="date">2018-11-26</h4> <div class="hidden name"><code>mkin.Rmd</code></div> diff --git a/docs/articles/twa.html b/docs/articles/twa.html index 8c053c10..6ba7e1a7 100644 --- a/docs/articles/twa.html +++ b/docs/articles/twa.html @@ -84,7 +84,7 @@ <h1>Calculation of time weighted average concentrations with mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-11-23</h4> + <h4 class="date">2018-11-26</h4> <div class="hidden name"><code>twa.Rmd</code></div> diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html index 5215e039..6ebe3c73 100644 --- a/docs/articles/web_only/FOCUS_Z.html +++ b/docs/articles/web_only/FOCUS_Z.html @@ -84,7 +84,7 @@ <h1>Example evaluation of FOCUS dataset Z</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-11-23</h4> + <h4 class="date">2018-11-26</h4> <div class="hidden name"><code>FOCUS_Z.Rmd</code></div> diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html index c47425fb..25a3a62e 100644 --- a/docs/articles/web_only/compiled_models.html +++ b/docs/articles/web_only/compiled_models.html @@ -84,7 +84,7 @@ <h1>Performance benefit by using compiled model definitions in mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-11-23</h4> + <h4 class="date">2018-11-26</h4> <div class="hidden name"><code>compiled_models.Rmd</code></div> @@ -125,9 +125,9 @@ <a class="sourceLine" id="cb5-16" data-line-number="16">}</a></code></pre></div> <pre><code>## Lade nötiges Paket: rbenchmark</code></pre> <pre><code>## test replications elapsed relative user.self sys.self -## 3 deSolve, compiled 3 2.274 1.000 2.273 0 -## 1 deSolve, not compiled 3 17.686 7.777 17.676 0 -## 2 Eigenvalue based 3 2.800 1.231 2.799 0 +## 3 deSolve, compiled 3 2.296 1.000 2.295 0 +## 1 deSolve, not compiled 3 17.937 7.812 17.928 0 +## 2 Eigenvalue based 3 2.861 1.246 2.859 0 ## user.child sys.child ## 3 0 0 ## 1 0 0 @@ -156,8 +156,8 @@ <a class="sourceLine" id="cb8-16" data-line-number="16">}</a></code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> <pre><code>## test replications elapsed relative user.self sys.self -## 2 deSolve, compiled 3 4.038 1.000 4.035 0 -## 1 deSolve, not compiled 3 37.805 9.362 37.788 0 +## 2 deSolve, compiled 3 4.020 1.000 4.017 0 +## 1 deSolve, not compiled 3 37.721 9.383 37.704 0 ## user.child sys.child ## 2 0 0 ## 1 0 0</code></pre> diff --git a/docs/news/index.html b/docs/news/index.html index f3e57dd0..9f658dad 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -117,11 +117,12 @@ </div> - <div id="mkin-0-9-47-6-2018-09-21" class="section level1"> + <div id="mkin-0-9-47-6-2018-11-26" class="section level1"> <h1 class="page-header"> -<a href="#mkin-0-9-47-6-2018-09-21" class="anchor"></a>mkin 0.9.47.6 (2018-09-21)<small> Unreleased </small> +<a href="#mkin-0-9-47-6-2018-11-26" class="anchor"></a>mkin 0.9.47.6 (2018-11-26)<small> Unreleased </small> </h1> <ul> +<li><p>Add the function ‘logLik.mkinfit.R’ which makes it possible to calculate an AIC for mkinfit objects</p></li> <li><p>‘add_err’: Respect the argument giving the number of replicates in the synthetic dataset</p></li> <li><p>‘max_twa_parent’: Support maximum time weighted average concentration calculations for the hockey stick (HS) model</p></li> <li><p>‘mkinpredict’: Make the function generic and create a method for mkinfit objects</p></li> @@ -670,7 +671,7 @@ <div id="tocnav"> <h2>Contents</h2> <ul class="nav nav-pills nav-stacked"> - <li><a href="#mkin-0-9-47-6-2018-09-21">0.9.47.6</a></li> + <li><a href="#mkin-0-9-47-6-2018-11-26">0.9.47.6</a></li> <li><a href="#mkin-0-9-47-5-2018-09-14">0.9.47.5</a></li> <li><a href="#mkin-0-9-47-3">0.9.47.3</a></li> <li><a href="#mkin-0-9-47-2-2018-07-19">0.9.47.2</a></li> diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index a595dd0d..ec2c7eb7 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -467,8 +467,8 @@ #> } #> return(mC) #> } -#> <bytecode: 0x55555be3c890> -#> <environment: 0x55555bc2f5a0> +#> <bytecode: 0x55555be327a0> +#> <environment: 0x55555bc27c20> #> #> $cost_notrans #> function (P) @@ -490,8 +490,8 @@ #> scaleVar = scaleVar) #> return(mC) #> } -#> <bytecode: 0x55555cd74468> -#> <environment: 0x55555bc2f5a0> +#> <bytecode: 0x55555cd76230> +#> <environment: 0x55555bc27c20> #> #> $hessian_notrans #> parent_0 k_parent_sink @@ -558,7 +558,7 @@ #> 99.17407 #> #> $date -#> [1] "Fri Nov 23 20:45:37 2018" +#> [1] "Mon Nov 26 09:05:19 2018" #> #> $version #> [1] "0.9.47.6" diff --git a/docs/reference/logLik.mkinfit.html b/docs/reference/logLik.mkinfit.html index 1dda313f..250bc1d8 100644 --- a/docs/reference/logLik.mkinfit.html +++ b/docs/reference/logLik.mkinfit.html @@ -158,13 +158,16 @@ <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='no'>d_t</span> <span class='kw'><-</span> <span class='no'>FOCUS_2006_D</span> <span class='no'>d_t</span>[<span class='fl'>23</span>:<span class='fl'>24</span>, <span class='st'>"value"</span>] <span class='kw'><-</span> <span class='fu'>c</span>(<span class='fl'>NA</span>, <span class='fl'>NA</span>) <span class='co'># can't cope with zero values at the moment</span> - <span class='no'>f_nw</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) + <span class='no'>f_nw</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># no weighting (weights are unity)</span> <span class='no'>f_obs</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</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='no'>f_tc</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'>AIC</span>(<span class='no'>f_nw</span>, <span class='no'>f_obs</span>, <span class='no'>f_tc</span>)</div><div class='output co'>#> df AIC + <span class='no'>d_t</span>$<span class='no'>err</span> <span class='kw'><-</span> <span class='no'>d_t</span>$<span class='no'>value</span> <span class='co'># Manual weighting assuming sigma ~ y</span> + <span class='no'>f_man</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"err"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) + <span class='fu'>AIC</span>(<span class='no'>f_nw</span>, <span class='no'>f_obs</span>, <span class='no'>f_tc</span>, <span class='no'>f_man</span>)</div><div class='output co'>#> df AIC #> f_nw 5 204.4619 #> f_obs 6 205.8727 -#> f_tc 6 143.8773</div></pre> +#> f_tc 6 143.8773 +#> f_man 4 291.8000</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 90a538b6..505da201 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -158,8 +158,8 @@ <span class='kw'>anisole</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'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> </div><div class='input'> <span class='no'>fit.1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'>subset</span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'>summary</span>(<span class='no'>fit.1</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:45:55 2018 -#> Date of summary: Fri Nov 23 20:45:55 2018 +#> Date of fit: Mon Nov 26 09:05:38 2018 +#> Date of summary: Mon Nov 26 09:05:38 2018 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -169,7 +169,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 574 model solutions performed in 3.63 s +#> Fitted with method Port using 574 model solutions performed in 3.64 s #> #> Weighting: none #> @@ -247,8 +247,8 @@ <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='st'>"k_phenol_sink"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:45:57 2018 -#> Date of summary: Fri Nov 23 20:45:57 2018 +#> Date of fit: Mon Nov 26 09:05:40 2018 +#> Date of summary: Mon Nov 26 09:05:40 2018 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -258,7 +258,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 246 model solutions performed in 1.547 s +#> Fitted with method Port using 246 model solutions performed in 1.626 s #> #> Weighting: none #> diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index b2e7363d..2017a35c 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -436,8 +436,8 @@ <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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:00 2018 -#> Date of summary: Fri Nov 23 20:46:00 2018 +#> Date of fit: Mon Nov 26 09:05:43 2018 +#> Date of summary: Mon Nov 26 09:05:43 2018 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -513,7 +513,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 verstrichen -#> 0.978 0.000 0.978 </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 +#> 0.974 0.000 0.975 </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 @@ -588,7 +588,7 @@ #> Model cost at call 146 : 371.2134 #> Optimisation by method Port successfully terminated. #> User System verstrichen -#> 0.794 0.000 0.795 </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.796 0.000 0.796 </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 @@ -626,8 +626,8 @@ <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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:12 2018 -#> Date of summary: Fri Nov 23 20:46:12 2018 +#> Date of fit: Mon Nov 26 09:05:54 2018 +#> Date of summary: Mon Nov 26 09:05:54 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -635,7 +635,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 186 model solutions performed in 0.816 s +#> Fitted with method Port using 186 model solutions performed in 0.885 s #> #> Weighting: none #> @@ -743,8 +743,8 @@ #> 120 m1 33.31 28.78984 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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:14 2018 -#> Date of summary: Fri Nov 23 20:46:14 2018 +#> Date of fit: Mon Nov 26 09:05:57 2018 +#> Date of summary: Mon Nov 26 09:05:57 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -752,7 +752,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 551 model solutions performed in 2.509 s +#> Fitted with method Port using 551 model solutions performed in 2.451 s #> #> Weighting: none #> @@ -865,8 +865,8 @@ #> 120 m1 33.31 28.80898 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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:15 2018 -#> Date of summary: Fri Nov 23 20:46:15 2018 +#> Date of fit: Mon Nov 26 09:05:58 2018 +#> Date of summary: Mon Nov 26 09:05:58 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -874,7 +874,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 155 model solutions performed in 0.687 s +#> Fitted with method Port using 155 model solutions performed in 0.69 s #> #> Weighting: mean #> @@ -983,8 +983,8 @@ <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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:16 2018 -#> Date of summary: Fri Nov 23 20:46:16 2018 +#> Date of fit: Mon Nov 26 09:05:59 2018 +#> Date of summary: Mon Nov 26 09:05:59 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -992,7 +992,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 174 model solutions performed in 0.789 s +#> Fitted with method Port using 174 model solutions performed in 0.772 s #> #> Weighting: manual #> @@ -1103,8 +1103,8 @@ <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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:17 2018 -#> Date of summary: Fri Nov 23 20:46:17 2018 +#> Date of fit: Mon Nov 26 09:06:00 2018 +#> Date of summary: Mon Nov 26 09:06:00 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1112,7 +1112,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 270 model solutions performed in 1.212 s +#> Fitted with method Port using 270 model solutions performed in 1.201 s #> #> Weighting: manual #> @@ -1221,8 +1221,8 @@ <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 used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:46:21 2018 -#> Date of summary: Fri Nov 23 20:46:21 2018 +#> Date of fit: Mon Nov 26 09:06:03 2018 +#> Date of summary: Mon Nov 26 09:06:03 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -1230,7 +1230,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 692 model solutions performed in 3.081 s +#> Fitted with method Port using 692 model solutions performed in 3.087 s #> #> Weighting: manual #> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index e16a4147..a7f26322 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -229,7 +229,7 @@ For the definition of model types and their parameters, the equations given <span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</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'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file32ab4b1aa093.c 2> file32ab4b1aa093.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file672328842b40.c 2> file672328842b40.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 9b8be306..f26422a4 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -323,7 +323,7 @@ <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#> time parent m1 #> 201 20 4.978707 27.46227</div><div class='output co'>#> User System verstrichen -#> 0.004 0.000 0.003 </div><div class='input'> <span class='fu'>system.time</span>( +#> 0.003 0.000 0.003 </div><div class='input'> <span class='fu'>system.time</span>( <span class='fu'>print</span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#> time parent m1 @@ -333,7 +333,7 @@ <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'>seq</span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,]))</div><div class='output co'>#> time parent m1 #> 201 20 4.978707 27.46227</div><div class='output co'>#> User System verstrichen -#> 0.047 0.000 0.047 </div><div class='input'> +#> 0.041 0.000 0.040 </div><div class='input'> </div><div class='input'> <span class='co'># Predict from a fitted model</span> <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>)</div><div class='output co'>#> Model cost at call 1 : 552.5739 #> Model cost at call 3 : 552.5739 diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index fda9ba60..eb2e5bcf 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -189,8 +189,8 @@ <span class='no'>time_1</span> <span class='kw'><-</span> <span class='fu'>system.time</span>(<span class='no'>fits.4</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) <span class='no'>time_default</span></div><div class='output co'>#> User System verstrichen -#> 0.033 0.040 6.952 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> User System verstrichen -#> 21.739 0.000 21.752 </div><div class='input'> +#> 0.043 0.032 6.850 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> User System verstrichen +#> 21.779 0.000 21.791 </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#> $ff #> parent_M1 parent_sink M1_M2 M1_sink #> 0.7340480 0.2659520 0.7505686 0.2494314 diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index a0ef5efe..9cb43d42 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -206,15 +206,15 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='fu'>summary</span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></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='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:47:10 2018 -#> Date of summary: Fri Nov 23 20:47:10 2018 +#> Date of fit: Mon Nov 26 09:06:53 2018 +#> Date of summary: Mon Nov 26 09:06:53 2018 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 35 model solutions performed in 0.081 s +#> Fitted with method Port using 35 model solutions performed in 0.083 s #> #> Weighting: none #> diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index f98580cb..6178527b 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -200,8 +200,8 @@ The transformation of sets of formation fractions is fragile, as it supposes <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'>summary</span>(<span class='no'>fit</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>) <span class='co'># See transformed and backtransformed parameters</span></div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:47:18 2018 -#> Date of summary: Fri Nov 23 20:47:18 2018 +#> Date of fit: Mon Nov 26 09:07:01 2018 +#> Date of summary: Mon Nov 26 09:07:01 2018 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -209,7 +209,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 153 model solutions performed in 0.666 s +#> Fitted with method Port using 153 model solutions performed in 0.687 s #> #> Weighting: none #> @@ -276,8 +276,8 @@ The transformation of sets of formation fractions is fragile, as it supposes </div><div class='input'><span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:47:20 2018 -#> Date of summary: Fri Nov 23 20:47:20 2018 +#> Date of fit: Mon Nov 26 09:07:03 2018 +#> Date of summary: Mon Nov 26 09:07:03 2018 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -285,7 +285,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 350 model solutions performed in 1.539 s +#> Fitted with method Port using 350 model solutions performed in 1.537 s #> #> Weighting: none #> @@ -364,8 +364,8 @@ The transformation of sets of formation fractions is fragile, as it supposes <span class='no'>fit.ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'>summary</span>(<span class='no'>fit.ff</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:47:21 2018 -#> Date of summary: Fri Nov 23 20:47:21 2018 +#> Date of fit: Mon Nov 26 09:07:04 2018 +#> Date of summary: Mon Nov 26 09:07:04 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -373,7 +373,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 186 model solutions performed in 0.824 s +#> Fitted with method Port using 186 model solutions performed in 0.827 s #> #> Weighting: none #> @@ -448,8 +448,8 @@ The transformation of sets of formation fractions is fragile, as it supposes <span class='no'>fit.ff.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff.2</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'>summary</span>(<span class='no'>fit.ff.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.6 #> R version used for fitting: 3.5.1 -#> Date of fit: Fri Nov 23 20:47:22 2018 -#> Date of summary: Fri Nov 23 20:47:22 2018 +#> Date of fit: Mon Nov 26 09:07:04 2018 +#> Date of summary: Mon Nov 26 09:07:04 2018 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -457,7 +457,7 @@ The transformation of sets of formation fractions is fragile, as it supposes #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 104 model solutions performed in 0.458 s +#> Fitted with method Port using 104 model solutions performed in 0.454 s #> #> Weighting: none #> diff --git a/man/logLik.mkinfit.Rd b/man/logLik.mkinfit.Rd index 2f3e58a1..2f911d5b 100644 --- a/man/logLik.mkinfit.Rd +++ b/man/logLik.mkinfit.Rd @@ -30,10 +30,12 @@ ) d_t <- FOCUS_2006_D d_t[23:24, "value"] <- c(NA, NA) # can't cope with zero values at the moment - f_nw <- mkinfit(sfo_sfo, d_t, quiet = TRUE) + f_nw <- mkinfit(sfo_sfo, d_t, quiet = TRUE) # no weighting (weights are unity) f_obs <- mkinfit(sfo_sfo, d_t, reweight.method = "obs", quiet = TRUE) f_tc <- mkinfit(sfo_sfo, d_t, reweight.method = "tc", quiet = TRUE) - AIC(f_nw, f_obs, f_tc) + d_t$err <- d_t$value # Manual weighting assuming sigma ~ y + f_man <- mkinfit(sfo_sfo, d_t, err = "err", quiet = TRUE) + AIC(f_nw, f_obs, f_tc, f_man) } \author{ Johannes Ranke |