aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/ilr.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/ilr.html')
-rw-r--r--docs/reference/ilr.html39
1 files changed, 15 insertions, 24 deletions
diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html
index 82accca4..d2551059 100644
--- a/docs/reference/ilr.html
+++ b/docs/reference/ilr.html
@@ -61,7 +61,12 @@
</ul>
<ul class="nav navbar-nav navbar-right">
-
+ <li>
+ <a href="http://github.com/jranke/mkin">
+ <span class="fa fa-github fa-lg"></span>
+
+ </a>
+</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
@@ -107,31 +112,17 @@
<p>Another implementation can be found in R package <code>robCompositions</code>.</p>
- <h2 class="hasAnchor" id="examples">
- <a class="anchor" href="#examples"></a>
- Examples
- </h2>
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'># Order matters</span>
-<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#&gt; [1] -1.628174 -2.820079
-#&gt; </div><div class='input'><span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#&gt; [1] 1.628174 2.820079
-#&gt; </div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span>
-<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#&gt; [1] 0 0
-#&gt; </div><div class='input'><span class='co'># Almost equal entries give small numbers</span>
-<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#&gt; [1] -0.2034219 0.1174457
-#&gt; </div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span>
-<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#&gt; [1] 0.70 0.29 0.01
-#&gt; </div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'>c</span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#&gt; [1] 0.70 0.29 0.01
-#&gt; </div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span>
-<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#&gt; [1] 7.213536e-07 9.999993e-01
-#&gt; </div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>c</span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#&gt; [1] 7.207415e-07 9.991507e-01 8.486044e-04
-#&gt; </div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span>
-<span class='fu'>sum</span>(<span class='fu'>invilr</span>(<span class='fu'>c</span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#&gt; [1] 1
-#&gt; </div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span>
+<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#&gt; [1] -1.628174 -2.820079</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#&gt; [1] 1.628174 2.820079</div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span>
+<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#&gt; [1] 0 0</div><div class='input'><span class='co'># Almost equal entries give small numbers</span>
+<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#&gt; [1] -0.2034219 0.1174457</div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span>
+<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#&gt; [1] 0.70 0.29 0.01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'>c</span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#&gt; [1] 0.70 0.29 0.01</div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span>
+<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#&gt; [1] 7.213536e-07 9.999993e-01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>c</span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#&gt; [1] 7.207415e-07 9.991507e-01 8.486044e-04</div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span>
+<span class='fu'>sum</span>(<span class='fu'>invilr</span>(<span class='fu'>c</span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#&gt; [1] 1</div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span>
<span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='fu'>c</span>(<span class='fl'>0.1</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>)
<span class='no'>b</span> <span class='kw'>&lt;-</span> <span class='fu'>invilr</span>(<span class='no'>a</span>)
-<span class='fu'>length</span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#&gt; [1] 4
-#&gt; </div><div class='input'><span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'>sum</span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#&gt; [1] 0.1 0.3 0.5
-#&gt; </div></pre>
+<span class='fu'>length</span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#&gt; [1] 4</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'>c</span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'>sum</span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#&gt; [1] 0.1 0.3 0.5</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
@@ -156,7 +147,7 @@
<footer>
<div class="copyright">
- <p>Developed by Johannes Ranke, Eurofins Regulatory AG.</p>
+ <p>Developed by Johannes Ranke.</p>
</div>
<div class="pkgdown">

Contact - Imprint