aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-11-13 11:05:39 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2019-11-13 11:05:39 +0100
commitf6385b071cee2c261da28bf98fd1599da1a30ddb (patch)
treedd466c9c93fc2451f67ebfc8acfdfde25068ac88
parentf3757dfbaabe4e60ecac063437a75ea32999640a (diff)
Likelihood ratio test for mmkin columns with two fits
-rw-r--r--NAMESPACE1
-rw-r--r--R/lrtest.mkinfit.R5
-rw-r--r--docs/reference/index.html2
-rw-r--r--docs/reference/lrtest.mkinfit.html8
-rw-r--r--man/lrtest.mkinfit.Rd6
5 files changed, 15 insertions, 7 deletions
diff --git a/NAMESPACE b/NAMESPACE
index f428a612..e561621b 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -7,6 +7,7 @@ S3method(confint,mkinfit)
S3method(loftest,mkinfit)
S3method(logLik,mkinfit)
S3method(lrtest,mkinfit)
+S3method(lrtest,mmkin)
S3method(mkinpredict,mkinfit)
S3method(mkinpredict,mkinmod)
S3method(nobs,mkinfit)
diff --git a/R/lrtest.mkinfit.R b/R/lrtest.mkinfit.R
index 380cf3a5..0054ea88 100644
--- a/R/lrtest.mkinfit.R
+++ b/R/lrtest.mkinfit.R
@@ -18,10 +18,9 @@ lmtest::lrtest
#' parameters (alternative hypothesis) is listed first, then the model with the
#' lower number of fitted parameters (null hypothesis).
#'
-#' The method for mmkin objects only works for column objects with two members.
-#'
#' @importFrom stats logLik update
-#' @param object An \code{\link{mkinfit}} object
+#' @param object An \code{\link{mkinfit}} object, or an \code{\link{mmkin}} column
+#' object containing two fits to the same data.
#' @param object_2 Optionally, another mkinfit object fitted to the same data.
#' @param \dots Argument to \code{\link{mkinfit}}, passed to
#' \code{\link{update.mkinfit}} for creating the alternative fitted object.
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 0947ff94..4398469b 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -209,7 +209,7 @@ more datasets</p></td>
</tr><tr>
<td>
- <p><code><a href="lrtest.mkinfit.html">lrtest(<i>&lt;mkinfit&gt;</i>)</a></code> </p>
+ <p><code><a href="lrtest.mkinfit.html">lrtest(<i>&lt;mkinfit&gt;</i>)</a></code> <code><a href="lrtest.mkinfit.html">lrtest(<i>&lt;mmkin&gt;</i>)</a></code> </p>
</td>
<td><p>Likelihood ratio test for mkinfit models</p></td>
</tr><tr>
diff --git a/docs/reference/lrtest.mkinfit.html b/docs/reference/lrtest.mkinfit.html
index 1d82eb74..70157db9 100644
--- a/docs/reference/lrtest.mkinfit.html
+++ b/docs/reference/lrtest.mkinfit.html
@@ -145,14 +145,18 @@ and can be expressed by fixing the parameters of the other.</p>
</div>
<pre class="usage"><span class='co'># S3 method for mkinfit</span>
-<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>object</span>, <span class='kw'>object_2</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)</pre>
+<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>object</span>, <span class='kw'>object_2</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mmkin</span>
+<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>object</th>
- <td><p>An <code><a href='mkinfit.html'>mkinfit</a></code> object</p></td>
+ <td><p>An <code><a href='mkinfit.html'>mkinfit</a></code> object, or an <code><a href='mmkin.html'>mmkin</a></code> column
+object containing two fits to the same data.</p></td>
</tr>
<tr>
<th>object_2</th>
diff --git a/man/lrtest.mkinfit.Rd b/man/lrtest.mkinfit.Rd
index bc8ab4dc..84d7bc99 100644
--- a/man/lrtest.mkinfit.Rd
+++ b/man/lrtest.mkinfit.Rd
@@ -2,12 +2,16 @@
% Please edit documentation in R/lrtest.mkinfit.R
\name{lrtest.mkinfit}
\alias{lrtest.mkinfit}
+\alias{lrtest.mmkin}
\title{Likelihood ratio test for mkinfit models}
\usage{
\method{lrtest}{mkinfit}(object, object_2 = NULL, ...)
+
+\method{lrtest}{mmkin}(object, ...)
}
\arguments{
-\item{object}{An \code{\link{mkinfit}} object}
+\item{object}{An \code{\link{mkinfit}} object, or an \code{\link{mmkin}} column
+object containing two fits to the same data.}
\item{object_2}{Optionally, another mkinfit object fitted to the same data.}

Contact - Imprint