diff options
| -rw-r--r-- | R/saemix.R | 3 | ||||
| -rw-r--r-- | docs/dev/pkgdown.yml | 2 | ||||
| -rw-r--r-- | docs/dev/reference/Rplot001.png | bin | 0 -> 19062 bytes | |||
| -rw-r--r-- | docs/dev/reference/Rplot002.png | bin | 0 -> 24396 bytes | |||
| -rw-r--r-- | docs/dev/reference/Rplot003.png | bin | 0 -> 6583 bytes | |||
| -rw-r--r-- | docs/dev/reference/Rplot004.png | bin | 0 -> 28700 bytes | |||
| -rw-r--r-- | docs/dev/reference/Rplot005.png | bin | 0 -> 28700 bytes | |||
| -rw-r--r-- | docs/dev/reference/saemix-3.png | bin | 16942 -> 18094 bytes | |||
| -rw-r--r-- | docs/dev/reference/saemix-4.png | bin | 65995 -> 82011 bytes | |||
| -rw-r--r-- | docs/dev/reference/saemix.html | 88 | ||||
| -rw-r--r-- | man/saemix.Rd | 3 | 
11 files changed, 47 insertions, 49 deletions
| @@ -35,7 +35,7 @@  #' }  #' # Synthetic data with two-component error  #' sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) -#' dt50_sfo_in <- c(800, 900, 1000, 1111.11, 1250) +#' dt50_sfo_in <- c(80, 90, 100, 111.111, 125)  #' k_in <- log(2) / dt50_sfo_in  #'  #' SFO <- mkinmod(parent = mkinsub("SFO")) @@ -53,6 +53,7 @@  #'  })  #' \dontrun{  #' f_mmkin_syn <- mmkin("SFO", ds_sfo_syn, error_model = "tc", quiet = TRUE) +#' # plot(f_mmkin_syn)  #' m_saemix_tc <- saemix_model(f_mmkin_syn, cores = 1)  #' d_saemix_tc <- saemix_data(f_mmkin_syn)  #' f_saemix_tc <- saemix(m_saemix_tc, d_saemix_tc, saemix_options) diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index 58255596..b0bf033b 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -10,7 +10,7 @@ articles:    web_only/NAFTA_examples: NAFTA_examples.html    web_only/benchmarks: benchmarks.html    web_only/compiled_models: compiled_models.html -last_built: 2020-10-15T09:55Z +last_built: 2020-10-15T12:51Z  urls:    reference: https://pkgdown.jrwb.de/mkin/reference    article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/Rplot001.png b/docs/dev/reference/Rplot001.pngBinary files differ new file mode 100644 index 00000000..36b20f09 --- /dev/null +++ b/docs/dev/reference/Rplot001.png diff --git a/docs/dev/reference/Rplot002.png b/docs/dev/reference/Rplot002.pngBinary files differ new file mode 100644 index 00000000..b568eb1c --- /dev/null +++ b/docs/dev/reference/Rplot002.png diff --git a/docs/dev/reference/Rplot003.png b/docs/dev/reference/Rplot003.pngBinary files differ new file mode 100644 index 00000000..53415e5d --- /dev/null +++ b/docs/dev/reference/Rplot003.png diff --git a/docs/dev/reference/Rplot004.png b/docs/dev/reference/Rplot004.pngBinary files differ new file mode 100644 index 00000000..ea685493 --- /dev/null +++ b/docs/dev/reference/Rplot004.png diff --git a/docs/dev/reference/Rplot005.png b/docs/dev/reference/Rplot005.pngBinary files differ new file mode 100644 index 00000000..ea685493 --- /dev/null +++ b/docs/dev/reference/Rplot005.png diff --git a/docs/dev/reference/saemix-3.png b/docs/dev/reference/saemix-3.pngBinary files differ index 13157f91..86ae1f19 100644 --- a/docs/dev/reference/saemix-3.png +++ b/docs/dev/reference/saemix-3.png diff --git a/docs/dev/reference/saemix-4.png b/docs/dev/reference/saemix-4.pngBinary files differ index 1e717cb2..e0c5ce4a 100644 --- a/docs/dev/reference/saemix-4.png +++ b/docs/dev/reference/saemix-4.png diff --git a/docs/dev/reference/saemix.html b/docs/dev/reference/saemix.html index 5b160959..2c4fd2d7 100644 --- a/docs/dev/reference/saemix.html +++ b/docs/dev/reference/saemix.html @@ -237,8 +237,8 @@ variances of the deviations of the parameters from these mean values.</p>  #>     res <- unlist(res_list)  #>     return(res)  #> } -#> <bytecode: 0x55555c1e7720> -#> <environment: 0x55555c1eff38> +#> <bytecode: 0x555555c89340> +#> <environment: 0x555555c82680>  #>   Nb of parameters: 4   #>       parameter names:  parent_0 log_k_parent log_k_A1 f_parent_ilr_1   #>       distribution: @@ -271,10 +271,10 @@ variances of the deviations of the parameters from these mean values.</p>    nbiter.saemix <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='fl'>200</span>, <span class='fl'>80</span><span class='op'>)</span><span class='op'>)</span>  <span class='va'>f_saemix</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix</a></span><span class='op'>(</span><span class='va'>m_saemix</span>, <span class='va'>d_saemix</span>, <span class='va'>saemix_options</span><span class='op'>)</span>  </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Thu Oct 15 11:55:14 2020" +#> [1] "Thu Oct 15 14:51:26 2020"  #> ..  #>     Minimisation finished -#> [1] "Thu Oct 15 11:57:07 2020"</div><div class='img'><img src='saemix-1.png' alt='' width='700' height='433' /></div><div class='output co'>#> Nonlinear mixed-effects model fit by the SAEM algorithm +#> [1] "Thu Oct 15 14:53:18 2020"</div><div class='img'><img src='saemix-1.png' alt='' width='700' height='433' /></div><div class='output co'>#> Nonlinear mixed-effects model fit by the SAEM algorithm  #> -----------------------------------  #> ----          Data             ----  #> ----------------------------------- @@ -338,8 +338,8 @@ variances of the deviations of the parameters from these mean values.</p>  #>     res <- unlist(res_list)  #>     return(res)  #> } -#> <bytecode: 0x55555c1e7720> -#> <environment: 0x55555c1eff38> +#> <bytecode: 0x555555c89340> +#> <environment: 0x555555c82680>  #>   Nb of parameters: 4   #>       parameter names:  parent_0 log_k_parent log_k_A1 f_parent_ilr_1   #>       distribution: @@ -423,7 +423,7 @@ variances of the deviations of the parameters from these mean values.</p>  </div><div class='output co'>#> Plotting convergence plots</div><div class='img'><img src='saemix-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span>  <span class='co'># Synthetic data with two-component error</span>  <span class='va'>sampling_times</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='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span><span class='op'>)</span> -<span class='va'>dt50_sfo_in</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='fl'>800</span>, <span class='fl'>900</span>, <span class='fl'>1000</span>, <span class='fl'>1111.11</span>, <span class='fl'>1250</span><span class='op'>)</span> +<span class='va'>dt50_sfo_in</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='fl'>80</span>, <span class='fl'>90</span>, <span class='fl'>100</span>, <span class='fl'>111.111</span>, <span class='fl'>125</span><span class='op'>)</span>  <span class='va'>k_in</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/Log.html'>log</a></span><span class='op'>(</span><span class='fl'>2</span><span class='op'>)</span> <span class='op'>/</span> <span class='va'>dt50_sfo_in</span>  <span class='va'>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='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> @@ -439,7 +439,9 @@ variances of the deviations of the parameters from these mean values.</p>    <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>ds</span>, sdfunc <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>sqrt</a></span><span class='op'>(</span><span class='fl'>1</span><span class='op'>^</span><span class='fl'>2</span> <span class='op'>+</span> <span class='va'>value</span><span class='op'>^</span><span class='fl'>2</span> <span class='op'>*</span> <span class='fl'>0.07</span><span class='op'>^</span><span class='fl'>2</span><span class='op'>)</span>,       n <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span>   <span class='op'>}</span><span class='op'>)</span> +<span class='co'># \dontrun{</span>  <span class='va'>f_mmkin_syn</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>ds_sfo_syn</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='co'># plot(f_mmkin_syn)</span>  <span class='va'>m_saemix_tc</span> <span class='op'><-</span> <span class='fu'>saemix_model</span><span class='op'>(</span><span class='va'>f_mmkin_syn</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span>  </div><div class='output co'>#>   #>  @@ -481,8 +483,8 @@ variances of the deviations of the parameters from these mean values.</p>  #>     res <- unlist(res_list)  #>     return(res)  #> } -#> <bytecode: 0x55555c1e7720> -#> <environment: 0x55555be5b848> +#> <bytecode: 0x555555c89340> +#> <environment: 0x55555df58cf8>  #>   Nb of parameters: 2   #>       parameter names:  parent_0 log_k_parent   #>       distribution: @@ -493,11 +495,11 @@ variances of the deviations of the parameters from these mean values.</p>  #>              parent_0 log_k_parent  #> parent_0            1            0  #> log_k_parent        0            1 -#>   Error model: combined , initial values: a.1=2.4206146215511 b.1=0.03831266409084  +#>   Error model: combined , initial values: a.1=1.05209877924905 b.1=0.0586479225303944   #>     No covariate in the model.  #>     Initial values  #>              parent_0 log_k_parent -#> Pop.CondInit 100.2498     -9.33922</div><div class='input'><span class='va'>d_saemix_tc</span> <span class='op'><-</span> <span class='fu'>saemix_data</span><span class='op'>(</span><span class='va'>f_mmkin_syn</span><span class='op'>)</span> +#> Pop.CondInit  100.315    -4.962075</div><div class='input'><span class='va'>d_saemix_tc</span> <span class='op'><-</span> <span class='fu'>saemix_data</span><span class='op'>(</span><span class='va'>f_mmkin_syn</span><span class='op'>)</span>  </div><div class='output co'>#>   #>   #> The following SaemixData object was successfully created: @@ -508,16 +510,10 @@ variances of the deviations of the parameters from these mean values.</p>  #>     Structured data: value ~ time + name | ds   #>     X variable for graphs: time () </div><div class='input'><span class='va'>f_saemix_tc</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix</a></span><span class='op'>(</span><span class='va'>m_saemix_tc</span>, <span class='va'>d_saemix_tc</span>, <span class='va'>saemix_options</span><span class='op'>)</span>  </div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Thu Oct 15 11:57:25 2020" +#> [1] "Thu Oct 15 14:53:35 2020"  #> ..  #>     Minimisation finished -#> [1] "Thu Oct 15 11:58:16 2020" -#> Error in solve.default(Fth) :  -#>   Lapack routine dgesv: system is exactly singular: U[2,2] = 0 -#> Error computing the Fisher Information Matrix: singular system. -#> Error in solve.default(FO) :  -#>   Lapack routine dgesv: system is exactly singular: U[2,2] = 0 -#> Error computing the Fisher Information Matrix: singular system.</div><div class='output co'>#> Nonlinear mixed-effects model fit by the SAEM algorithm +#> [1] "Thu Oct 15 14:54:25 2020"</div><div class='output co'>#> Nonlinear mixed-effects model fit by the SAEM algorithm  #> -----------------------------------  #> ----          Data             ----  #> ----------------------------------- @@ -534,14 +530,14 @@ variances of the deviations of the parameters from these mean values.</p>  #>    ds time   name value mdv cens occ ytype  #> 1   1    0 parent 105.9   0    0   1     1  #> 2   1    0 parent  98.0   0    0   1     1 -#> 3   1    1 parent  97.4   0    0   1     1 -#> 4   1    1 parent 100.5   0    0   1     1 -#> 5   1    3 parent 115.6   0    0   1     1 -#> 6   1    3 parent 105.6   0    0   1     1 -#> 7   1    7 parent 108.6   0    0   1     1 -#> 8   1    7 parent 117.0   0    0   1     1 -#> 9   1   14 parent 107.0   0    0   1     1 -#> 10  1   14 parent  95.8   0    0   1     1 +#> 3   1    1 parent  96.6   0    0   1     1 +#> 4   1    1 parent  99.8   0    0   1     1 +#> 5   1    3 parent 113.0   0    0   1     1 +#> 6   1    3 parent 103.2   0    0   1     1 +#> 7   1    7 parent 102.9   0    0   1     1 +#> 8   1    7 parent 110.8   0    0   1     1 +#> 9   1   14 parent  95.9   0    0   1     1 +#> 10  1   14 parent  85.9   0    0   1     1  #> -----------------------------------  #> ----          Model            ----  #> ----------------------------------- @@ -581,8 +577,8 @@ variances of the deviations of the parameters from these mean values.</p>  #>     res <- unlist(res_list)  #>     return(res)  #> } -#> <bytecode: 0x55555c1e7720> -#> <environment: 0x55555be5b848> +#> <bytecode: 0x555555c89340> +#> <environment: 0x55555df58cf8>  #>   Nb of parameters: 2   #>       parameter names:  parent_0 log_k_parent   #>       distribution: @@ -593,11 +589,11 @@ variances of the deviations of the parameters from these mean values.</p>  #>              parent_0 log_k_parent  #> parent_0            1            0  #> log_k_parent        0            1 -#>   Error model: combined , initial values: a.1=2.4206146215511 b.1=0.03831266409084  +#>   Error model: combined , initial values: a.1=1.05209877924905 b.1=0.0586479225303944   #>     No covariate in the model.  #>     Initial values  #>              parent_0 log_k_parent -#> Pop.CondInit 100.2498     -9.33922 +#> Pop.CondInit  100.315    -4.962075  #> -----------------------------------  #> ----    Key algorithm options  ----  #> ----------------------------------- @@ -619,17 +615,17 @@ variances of the deviations of the parameters from these mean values.</p>  #> ----------------------------------------------------  #> -----------------  Fixed effects  ------------------  #> ---------------------------------------------------- -#>   Parameter    Estimate SE   CV(%) -#>   parent_0      97.44   <NA> <NA>  -#>   log_k_parent -56.97   <NA> <NA>  -#> a a.1           -7.12   <NA> <NA>  -#> b b.1            0.15   <NA> <NA>  +#>   Parameter    Estimate SE    CV(%)  +#>   parent_0     100.232  1.266    1.3 +#>   log_k_parent  -4.961  0.089    1.8 +#> a a.1           -0.106  1.211 1142.0 +#> b b.1            0.071  0.017   24.2  #> ----------------------------------------------------  #> -----------  Variance of random effects  -----------  #> ---------------------------------------------------- -#>              Parameter           Estimate SE CV(%) -#> parent_0     omega2.parent_0       2.8    NA NA    -#> log_k_parent omega2.log_k_parent 750.3    NA NA    +#>              Parameter           Estimate SE    CV(%) +#> parent_0     omega2.parent_0     3.334    5.024 151   +#> log_k_parent omega2.log_k_parent 0.036    0.024  68    #> ----------------------------------------------------  #> ------  Correlation matrix of random effects  ------  #> ---------------------------------------------------- @@ -640,16 +636,16 @@ variances of the deviations of the parameters from these mean values.</p>  #> ---------------  Statistical criteria  -------------  #> ----------------------------------------------------  #> Likelihood computed by linearisation -#>       -2LL= 623.7744  -#>       AIC = 635.7744  -#>       BIC = 633.431  +#>       -2LL= 575.5586  +#>       AIC = 587.5586  +#>       BIC = 585.2153   #>   #> Likelihood computed by importance sampling -#>       -2LL= 621.1909  -#>       AIC = 633.1909  -#>       BIC = 630.8475  +#>       -2LL= 575.7797  +#>       AIC = 587.7797  +#>       BIC = 585.4364   #> ----------------------------------------------------</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_saemix_tc</span>, plot.type <span class='op'>=</span> <span class='st'>"convergence"</span><span class='op'>)</span> -</div><div class='img'><img src='saemix-3.png' alt='' width='700' height='433' /></div><div class='output co'>#> Plotting convergence plots</div><div class='img'><img src='saemix-4.png' alt='' width='700' height='433' /></div><div class='input'> +</div><div class='img'><img src='saemix-3.png' alt='' width='700' height='433' /></div><div class='output co'>#> Plotting convergence plots</div><div class='img'><img src='saemix-4.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span>  </div></pre>    </div>    <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> diff --git a/man/saemix.Rd b/man/saemix.Rd index e18610c9..34ce8be1 100644 --- a/man/saemix.Rd +++ b/man/saemix.Rd @@ -53,7 +53,7 @@ plot(f_saemix, plot.type = "convergence")  }  # Synthetic data with two-component error  sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) -dt50_sfo_in <- c(800, 900, 1000, 1111.11, 1250) +dt50_sfo_in <- c(80, 90, 100, 111.111, 125)  k_in <- log(2) / dt50_sfo_in  SFO <- mkinmod(parent = mkinsub("SFO")) @@ -71,6 +71,7 @@ ds_sfo_syn <- lapply(ds_sfo_mean, function(ds) {   })  \dontrun{  f_mmkin_syn <- mmkin("SFO", ds_sfo_syn, error_model = "tc", quiet = TRUE) +# plot(f_mmkin_syn)  m_saemix_tc <- saemix_model(f_mmkin_syn, cores = 1)  d_saemix_tc <- saemix_data(f_mmkin_syn)  f_saemix_tc <- saemix(m_saemix_tc, d_saemix_tc, saemix_options) | 
