From 24673bd27d9d304f1476c5b1e430a724fc74dbc5 Mon Sep 17 00:00:00 2001 From: stemangiola Date: Thu, 14 Sep 2023 20:34:40 +1000 Subject: [PATCH] add internal function --- R/glmmSeq.R | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/R/glmmSeq.R b/R/glmmSeq.R index 664fc045..8d142ed4 100644 --- a/R/glmmSeq.R +++ b/R/glmmSeq.R @@ -1,3 +1,16 @@ +## Source car:::relatives +car_relatives <- function (term, names, factors) +{ + is.relative <- function(term1, term2) { + all(!(factors[, term1] & (!factors[, term2]))) + } + if (length(names) == 1) + return(NULL) + which.term <- which(term == names) + (1:length(names))[-which.term][sapply(names[-which.term], + function(term2) is.relative(term, term2))] +} + #' @importFrom stats pchisq organiseStats = function (resultList, test.stat) {