diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-31 11:23:39 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-31 11:23:39 +0100 |
commit | c8559daaecc48626f27dd1d80d25bde346cb9776 (patch) | |
tree | f4fe9362663a9bf91eefbbb4bfa762c674d4d781 /R/mhmkin.R | |
parent | 6e8acb81c6053455033be920e9824fb095f1209a (diff) |
Add anova.mhmkin method
Diffstat (limited to 'R/mhmkin.R')
-rw-r--r-- | R/mhmkin.R | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -35,6 +35,12 @@ mhmkin <- function(objects, backend = "saemix", algorithm = "saem", ...) { #' @export #' @rdname mhmkin +mhmkin.mmkin <- function(object, ...) { + mhmkin(list(object), ...) +} + +#' @export +#' @rdname mhmkin mhmkin.list <- function(objects, backend = "saemix", ..., cores = if (Sys.info()["sysname"] == "Windows") 1 else parallel::detectCores(), cluster = NULL) @@ -190,3 +196,13 @@ update.mhmkin <- function(object, ..., evaluate = TRUE) { if(evaluate) eval(call, parent.frame()) else call } + +#' export +anova.mhmkin <- function(object, ..., + method = c("is", "lin", "gq"), test = FALSE, model.names = "auto") { + if (identical(model.names, "auto")) { + model.names <- paste(rownames(object), "-", colnames(object)) + } + rlang::inject(anova(!!!(object), method = method, test = test, model.names = model.names)) +} + |