diff options
Diffstat (limited to 'docs/dev/reference/saem.html')
-rw-r--r-- | docs/dev/reference/saem.html | 72 |
1 files changed, 49 insertions, 23 deletions
diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html index bdb1226e..23102df3 100644 --- a/docs/dev/reference/saem.html +++ b/docs/dev/reference/saem.html @@ -74,7 +74,7 @@ Expectation Maximisation algorithm (SAEM)." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.0.3.9000</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.0.4.9000</span> </span> </div> @@ -158,9 +158,12 @@ Expectation Maximisation algorithm (SAEM).</p> <span class='va'>object</span>, transformations <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"mkin"</span>, <span class='st'>"saemix"</span><span class='op'>)</span>, degparms_start <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/numeric.html'>numeric</a></span><span class='op'>(</span><span class='op'>)</span>, + test_log_parms <span class='op'>=</span> <span class='cn'>FALSE</span>, + conf.level <span class='op'>=</span> <span class='fl'>0.6</span>, solution_type <span class='op'>=</span> <span class='st'>"auto"</span>, control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>displayProgress <span class='op'>=</span> <span class='cn'>FALSE</span>, print <span class='op'>=</span> <span class='cn'>FALSE</span>, save <span class='op'>=</span> <span class='cn'>FALSE</span>, save.graphs <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>, + fail_with_errors <span class='op'>=</span> <span class='cn'>TRUE</span>, verbose <span class='op'>=</span> <span class='cn'>FALSE</span>, quiet <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span> @@ -174,6 +177,7 @@ Expectation Maximisation algorithm (SAEM).</p> solution_type <span class='op'>=</span> <span class='st'>"auto"</span>, transformations <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"mkin"</span>, <span class='st'>"saemix"</span><span class='op'>)</span>, degparms_start <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/numeric.html'>numeric</a></span><span class='op'>(</span><span class='op'>)</span>, + test_log_parms <span class='op'>=</span> <span class='cn'>FALSE</span>, verbose <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span> <span class='op'>)</span> @@ -206,6 +210,18 @@ SFO or DFOP is used for the parent and there is either no metabolite or one.</p> be used to override the starting values obtained from the 'mmkin' object.</p></td> </tr> <tr> + <th>test_log_parms</th> + <td><p>If TRUE, an attempt is made to use more robust starting +values for population parameters fitted as log parameters in mkin (like +rate constants) by only considering rate constants that pass the t-test +when calculating mean degradation parameters using <a href='nlme_function.html'>mean_degparms</a>.</p></td> + </tr> + <tr> + <th>conf.level</th> + <td><p>Possibility to adjust the required confidence level +for parameter that are tested if requested by 'test_log_parms'.</p></td> + </tr> + <tr> <th>solution_type</th> <td><p>Possibility to specify the solution type in case the automatic choice is not desired</p></td> @@ -215,6 +231,11 @@ automatic choice is not desired</p></td> <td><p>Passed to <a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix::saemix</a></p></td> </tr> <tr> + <th>fail_with_errors</th> + <td><p>Should a failure to compute standard errors +from the inverse of the Fisher Information Matrix be a failure?</p></td> + </tr> + <tr> <th>verbose</th> <td><p>Should we print information about created objects of type <a href='https://rdrr.io/pkg/saemix/man/SaemixModel-class.html'>saemix::SaemixModel</a> and <a href='https://rdrr.io/pkg/saemix/man/SaemixData-class.html'>saemix::SaemixData</a>?</p></td> @@ -261,33 +282,36 @@ using <a href='mmkin.html'>mmkin</a>.</p> state.ini <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, fixed_initials <span class='op'>=</span> <span class='st'>"parent"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> <span class='va'>f_saem_p0_fixed</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent_p0_fixed</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:32 2021" +#> [1] "Tue Mar 9 17:34:44 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:12:34 2021"</div><div class='input'> +#> [1] "Tue Mar 9 17:34:45 2021"</div><div class='input'> <span class='va'>f_mmkin_parent</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> <span class='va'>f_saem_sfo</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"SFO"</span>, <span class='op'>]</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:35 2021" +#> [1] "Tue Mar 9 17:34:46 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:12:36 2021"</div><div class='input'><span class='va'>f_saem_fomc</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span> +#> [1] "Tue Mar 9 17:34:48 2021"</div><div class='input'><span class='va'>f_saem_fomc</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:36 2021" +#> [1] "Tue Mar 9 17:34:48 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:12:38 2021"</div><div class='input'><span class='va'>f_saem_dfop</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"DFOP"</span>, <span class='op'>]</span><span class='op'>)</span> +#> [1] "Tue Mar 9 17:34:50 2021"</div><div class='input'><span class='va'>f_saem_dfop</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"DFOP"</span>, <span class='op'>]</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:39 2021" +#> [1] "Tue Mar 9 17:34:51 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:12:42 2021"</div><div class='input'> +#> [1] "Tue Mar 9 17:34:53 2021"</div><div class='input'> <span class='co'># The returned saem.mmkin object contains an SaemixObject, therefore we can use</span> <span class='co'># functions from saemix</span> <span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'>saemix</span><span class='op'>)</span> </div><div class='output co'>#> <span class='message'>Package saemix, version 3.1.9000</span> -#> <span class='message'> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saem_sfo</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_dfop</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span> -</div><div class='output co'>#> <span class='error'>Error in compare.saemix(list(f_saem_sfo$so, f_saem_fomc$so, f_saem_dfop$so)): 'compare.saemix' requires at least two models.</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, plot.type <span class='op'>=</span> <span class='st'>"convergence"</span><span class='op'>)</span> +#> <span class='message'> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='va'>f_saem_sfo</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_dfop</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Likelihoods calculated by importance sampling</span></div><div class='output co'>#> AIC BIC +#> 1 624.2484 622.2956 +#> 2 467.7096 464.9757 +#> 3 495.4373 491.9222</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, plot.type <span class='op'>=</span> <span class='st'>"convergence"</span><span class='op'>)</span> </div><div class='output co'>#> Plotting convergence plots</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, plot.type <span class='op'>=</span> <span class='st'>"individual.fit"</span><span class='op'>)</span> </div><div class='img'><img src='saem-1.png' alt='' width='700' height='433' /></div><div class='output co'>#> Plotting individual fits</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, plot.type <span class='op'>=</span> <span class='st'>"npde"</span><span class='op'>)</span> </div><div class='img'><img src='saem-2.png' alt='' width='700' height='433' /></div><div class='output co'>#> Simulating data using nsim = 1000 simulated datasets @@ -324,11 +348,13 @@ using <a href='mmkin.html'>mmkin</a>.</p> <span class='va'>f_mmkin_parent_tc</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>f_mmkin_parent</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> <span class='va'>f_saem_fomc_tc</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent_tc</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:44 2021" +#> [1] "Tue Mar 9 17:34:55 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:12:49 2021"</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc_tc</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span> -</div><div class='output co'>#> <span class='error'>Error in compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)): 'compare.saemix' requires at least two models.</span></div><div class='input'> +#> [1] "Tue Mar 9 17:35:00 2021"</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc_tc</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Likelihoods calculated by importance sampling</span></div><div class='output co'>#> AIC BIC +#> 1 467.7096 464.9757 +#> 2 469.6831 466.5586</div><div class='input'> <span class='va'>sfo_sfo</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"A1"</span><span class='op'>)</span>, A1 <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> </div><div class='output co'>#> <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'><span class='va'>fomc_sfo</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='st'>"A1"</span><span class='op'>)</span>, @@ -346,15 +372,15 @@ using <a href='mmkin.html'>mmkin</a>.</p> <span class='co'># four minutes</span> <span class='va'>f_saem_sfo_sfo</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>[</span><span class='st'>"SFO-SFO"</span>, <span class='op'>]</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:51 2021" +#> [1] "Tue Mar 9 17:35:02 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:12:56 2021"</div><div class='input'><span class='va'>f_saem_dfop_sfo</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='op'>]</span><span class='op'>)</span> +#> [1] "Tue Mar 9 17:35:07 2021"</div><div class='input'><span class='va'>f_saem_dfop_sfo</span> <span class='op'><-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='op'>]</span><span class='op'>)</span> </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Mon Feb 15 17:12:56 2021" +#> [1] "Tue Mar 9 17:35:07 2021" #> .... #> Minimisation finished -#> [1] "Mon Feb 15 17:13:05 2021"</div><div class='input'><span class='co'># We can use print, plot and summary methods to check the results</span> +#> [1] "Tue Mar 9 17:35:15 2021"</div><div class='input'><span class='co'># We can use print, plot and summary methods to check the results</span> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>f_saem_dfop_sfo</span><span class='op'>)</span> </div><div class='output co'>#> Kinetic nonlinear mixed-effects model fit by SAEM #> Structural model: @@ -395,10 +421,10 @@ using <a href='mmkin.html'>mmkin</a>.</p> #> SD.g_qlogis 0.44771 -0.86417 1.7596</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='op'>(</span><span class='va'>f_saem_dfop_sfo</span><span class='op'>)</span> </div><div class='img'><img src='saem-5.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/summary-methods.html'>summary</a></span><span class='op'>(</span><span class='va'>f_saem_dfop_sfo</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> </div><div class='output co'>#> saemix version used for fitting: 3.1.9000 -#> mkin version used for pre-fitting: 1.0.3.9000 -#> R version used for fitting: 4.0.3 -#> Date of fit: Mon Feb 15 17:13:05 2021 -#> Date of summary: Mon Feb 15 17:13:06 2021 +#> mkin version used for pre-fitting: 1.0.4.9000 +#> R version used for fitting: 4.0.4 +#> Date of fit: Tue Mar 9 17:35:16 2021 +#> Date of summary: Tue Mar 9 17:35:16 2021 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -413,7 +439,7 @@ using <a href='mmkin.html'>mmkin</a>.</p> #> #> Model predictions using solution type analytical #> -#> Fitted in 8.985 s using 300, 100 iterations +#> Fitted in 8.668 s using 300, 100 iterations #> #> Variance model: Constant variance #> |