diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-04-14 11:45:49 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-04-14 11:58:35 +0200 |
commit | d4a49b4837de347d34b2c198de7342c34b0fab63 (patch) | |
tree | df63250c72d94221a0560a8480cda45e309aa88e /docs/reference | |
parent | 28914451ac0ccc5bade64d9a79b7897cc701360a (diff) |
Keep order of datasets in nlme_data, add a plot
Diffstat (limited to 'docs/reference')
-rw-r--r-- | docs/reference/nlme-1.png | bin | 0 -> 70555 bytes | |||
-rw-r--r-- | docs/reference/nlme.html | 36 |
2 files changed, 34 insertions, 2 deletions
diff --git a/docs/reference/nlme-1.png b/docs/reference/nlme-1.png Binary files differnew file mode 100644 index 00000000..68ccb43f --- /dev/null +++ b/docs/reference/nlme-1.png diff --git a/docs/reference/nlme.html b/docs/reference/nlme.html index 696916a0..1b05f882 100644 --- a/docs/reference/nlme.html +++ b/docs/reference/nlme.html @@ -159,7 +159,7 @@ datasets.</p> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>A function that can be used with <code>link{nlme}</code></p> + <p>A function that can be used with nlme</p> <p>A named vector containing mean values of the fitted degradation model parameters</p> <p>A <code><a href='https://rdrr.io/pkg/nlme/man/groupedData.html'>groupedData</a></code> object</p> @@ -188,13 +188,45 @@ datasets.</p> <span class='no'>mean_dp</span> <span class='kw'><-</span> <span class='fu'>mean_degparms</span>(<span class='no'>f</span>) <span class='no'>grouped_data</span> <span class='kw'><-</span> <span class='fu'>nlme_data</span>(<span class='no'>f</span>) <span class='no'>nlme_f</span> <span class='kw'><-</span> <span class='fu'>nlme_function</span>(<span class='no'>f</span>) +<span class='co'># These assignments are necessary for these objects to be</span> +<span class='co'># visible to nlme and augPred when evaluation is done by</span> +<span class='co'># pkgdown to generated the html docs.</span> +<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='st'>"nlme_f"</span>, <span class='no'>nlme_f</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span>()) +<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='st'>"grouped_data"</span>, <span class='no'>grouped_data</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span>()) <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>) <span class='no'>m_nlme</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>value</span> ~ <span class='fu'>nlme_f</span>(<span class='no'>name</span>, <span class='no'>time</span>, <span class='no'>parent_0</span>, <span class='no'>log_k_parent_sink</span>), <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>grouped_data</span>, <span class='kw'>fixed</span> <span class='kw'>=</span> <span class='no'>parent_0</span> + <span class='no'>log_k_parent_sink</span> ~ <span class='fl'>1</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/pdDiag.html'>pdDiag</a></span>(<span class='no'>parent_0</span> + <span class='no'>log_k_parent_sink</span> ~ <span class='fl'>1</span>), - <span class='kw'>start</span> <span class='kw'>=</span> <span class='no'>mean_dp</span>)</div><div class='output co'>#> <span class='error'>Error in nlme_f(name, time, parent_0, log_k_parent_sink): konnte Funktion "nlme_f" nicht finden</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m_nlme</span>)</div><div class='output co'>#> <span class='error'>Error in summary(m_nlme): Objekt 'm_nlme' nicht gefunden</span></div><div class='input'> + <span class='kw'>start</span> <span class='kw'>=</span> <span class='no'>mean_dp</span>) +<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m_nlme</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood +#> Model: value ~ nlme_f(name, time, parent_0, log_k_parent_sink) +#> Data: grouped_data +#> AIC BIC logLik +#> 298.2781 307.7372 -144.1391 +#> +#> Random effects: +#> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1) +#> Level: ds +#> Structure: Diagonal +#> parent_0 log_k_parent_sink Residual +#> StdDev: 0.9374733 0.7098105 3.83543 +#> +#> Fixed effects: parent_0 + log_k_parent_sink ~ 1 +#> Value Std.Error DF t-value p-value +#> parent_0 101.76838 1.1445444 45 88.91606 0 +#> log_k_parent_sink -3.05444 0.4195622 45 -7.28008 0 +#> Correlation: +#> prnt_0 +#> log_k_parent_sink 0.034 +#> +#> Standardized Within-Group Residuals: +#> Min Q1 Med Q3 Max +#> -2.6169360 -0.2185329 0.0574070 0.5720937 3.0459868 +#> +#> Number of Observations: 49 +#> Number of Groups: 3 </div><div class='input'><span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='fu'><a href='https://rdrr.io/pkg/nlme/man/augPred.html'>augPred</a></span>(<span class='no'>m_nlme</span>, <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0</span>:<span class='fl'>1</span>), <span class='kw'>layout</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>1</span>))</div><div class='img'><img src='nlme-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># Test on some real data</span> <span class='no'>ds_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], |