mirror of
https://github.com/msberends/AMR.git
synced 2025-07-27 17:07:54 +02:00
Built site for AMR: 2.1.1.9013@f2d245b
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
|
||||
<a class="navbar-brand me-2" href="../index.html">AMR (for R)</a>
|
||||
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9012</small>
|
||||
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.1.1.9013</small>
|
||||
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@ -271,7 +271,7 @@
|
||||
<p>The <em>G</em>-test uses the log of the ratio of two likelihoods as the test statistic, which is why it is also called a likelihood ratio test or log-likelihood ratio test. The formula to calculate a <em>G</em>-statistic is:</p>
|
||||
<p>\(G = 2 * sum(x * log(x / E))\)</p>
|
||||
<p>where <code>E</code> are the expected values. Since this is chi-square distributed, the p value can be calculated in <span style="R">R</span> with:</p>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>p <span class="ot"><-</span> stats<span class="sc">::</span><span class="fu">pchisq</span>(G, df, <span class="at">lower.tail =</span> <span class="cn">FALSE</span>)</span></code></pre><p></p></div>
|
||||
<p></p><div class="sourceCode"><pre><code><span id="cb1-1"><a href="#cb1-1" tabindex="-1"></a>p <span class="ot"><-</span> stats<span class="sc">::</span><span class="fu">pchisq</span>(G, df, <span class="at">lower.tail =</span> <span class="cn">FALSE</span>)</span></code></pre><p></p></div>
|
||||
<p>where <code>df</code> are the degrees of freedom.</p>
|
||||
<p>If there are more than two categories and you want to find out which ones are significantly different from their null expectation, you can use the same method of testing each category vs. the sum of all categories, with the Bonferroni correction. You use <em>G</em>-tests for each category, of course.</p>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user