Skip to content

Commit

Permalink
SH: SH
Browse files Browse the repository at this point in the history
  • Loading branch information
hojsgaard committed Jun 18, 2024
1 parent 3d22c5d commit b95c2f7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: pbkrtest
Version: 0.5.2
Version: 0.5.2.9002
Title: Parametric Bootstrap, Kenward-Roger and Satterthwaite Based Methods for Test in Mixed Models
Authors@R: c(
person(given = "Ulrich", family = "Halekoh",
Expand Down Expand Up @@ -27,7 +27,7 @@ Imports:
Matrix (>= 1.2.3),
methods,
numDeriv,
parallel
doBy
Suggests:
knitr
Encoding: UTF-8
Expand Down
3 changes: 3 additions & 0 deletions R/KR-modcomp.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ KRmodcomp <- function(largeModel, smallModel, betaH=0, details=0){
#' @rdname kr-modcomp
KRmodcomp.lmerMod <- function(largeModel, smallModel, betaH=0, details=0) {

if (is.character(smallModel))
smallModel <- doBy::formula_add_str(formula(largeModel), terms=smallModel, op="-")

if (inherits(smallModel, "formula"))
smallModel <- update(largeModel, smallModel)

Expand Down
6 changes: 6 additions & 0 deletions R/PB-modcomp.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ PBmodcomp <- function(largeModel, smallModel, nsim=1000, ref=NULL, seed=NULL, cl
PBmodcomp.merMod <- function(largeModel, smallModel, nsim=1000, ref=NULL, seed=NULL, cl=NULL, details=0){


if (is.character(smallModel))
smallModel <- doBy::formula_add_str(formula(largeModel), terms=smallModel, op="-")

if (inherits(smallModel, "formula"))
smallModel <- update(largeModel, smallModel)

Expand Down Expand Up @@ -310,6 +313,9 @@ PBmodcomp.lm <- function(largeModel, smallModel, nsim=1000, ref=NULL, seed=NULL,

ok.fam <- c("binomial", "gaussian", "Gamma", "inverse.gaussian", "poisson")

if (is.character(smallModel))
smallModel <- doBy::formula_add_str(formula(largeModel), terms=smallModel, op="-")

if (inherits(smallModel, "formula"))
smallModel <- update(largeModel, smallModel)

Expand Down
4 changes: 4 additions & 0 deletions R/SAT-modcomp.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ SATmodcomp.lmerMod <- function(largeModel, smallModel, details=0, eps=sqrt(.Mach

SATmodcomp_internal <- function(largeModel, smallModel, eps=sqrt(.Machine$double.eps)){

if (is.character(smallModel))
smallModel <- doBy::formula_add_str(formula(largeModel), terms=smallModel, op="-")


if (inherits(smallModel, "formula"))
smallModel <- update(largeModel, smallModel)

Expand Down

0 comments on commit b95c2f7

Please sign in to comment.