From f6385b071cee2c261da28bf98fd1599da1a30ddb Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 13 Nov 2019 11:05:39 +0100 Subject: Likelihood ratio test for mmkin columns with two fits --- NAMESPACE | 1 + R/lrtest.mkinfit.R | 5 ++--- docs/reference/index.html | 2 +- docs/reference/lrtest.mkinfit.html | 8 ++++++-- man/lrtest.mkinfit.Rd | 6 +++++- 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

-

lrtest(<mkinfit>)

+

lrtest(<mkinfit>) lrtest(<mmkin>)

Likelihood ratio test for mkinfit models

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.

# S3 method for mkinfit
-lrtest(object, object_2 = NULL, ...)
+lrtest(object, object_2 = NULL, ...) + +# S3 method for mmkin +lrtest(object, ...)

Arguments

- + 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.} -- cgit v1.2.1
object

An mkinfit object

An mkinfit object, or an mmkin column +object containing two fits to the same data.

object_2