aboutsummaryrefslogtreecommitdiff
path: root/R/lrtest.mkinfit.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/lrtest.mkinfit.R')
-rw-r--r--R/lrtest.mkinfit.R18
1 files changed, 14 insertions, 4 deletions
diff --git a/R/lrtest.mkinfit.R b/R/lrtest.mkinfit.R
index 60b6c46a..a5689830 100644
--- a/R/lrtest.mkinfit.R
+++ b/R/lrtest.mkinfit.R
@@ -30,17 +30,27 @@ lmtest::lrtest
#' dfop_fit <- mkinfit("DFOP", test_data, quiet = TRUE)
#' lrtest(dfop_fit, sfo_fit)
#' lrtest(sfo_fit, dfop_fit)
-#'
+#'
#' # The following two examples are commented out as they fail during
#' # generation of the static help pages by pkgdown
-#' # lrtest(dfop_fit, error_model = "tc")
-#' # lrtest(dfop_fit, fixed_parms = c(k2 = 0))
+#' #lrtest(dfop_fit, error_model = "tc")
+#' #lrtest(dfop_fit, fixed_parms = c(k2 = 0))
+#'
+#' # However, this equivalent syntax works for static help pages
+#' lrtest(dfop_fit, update(dfop_fit, error_model = "tc"))
+#' lrtest(dfop_fit, update(dfop_fit, fixed_parms = c(k2 = 0)))
#' }
#' @export
lrtest.mkinfit <- function(object, object_2 = NULL, ...) {
name_function <- function(x) {
- paste(x$mkinmod$name, "with error model", x$err_mod)
+ object_name <- paste(x$mkinmod$name, "with error model", x$err_mod)
+ if (length(x$bparms.fixed) > 0) {
+ object_name <- paste(object_name,
+ "and fixed parameter(s)",
+ paste(names(x$bparms.fixed), collapse = ", "))
+ }
+ return(object_name)
}
if (is.null(object_2)) {

Contact - Imprint