Running ‘test-glmSeries.R’ [0s/1s]
  Running ‘test-publish-gls.R’ [0s/1s]
  Running ‘test-publish-mi.R’ [0s/1s]
  Running ‘test-publish.R’ [0s/1s]
  Running ‘test-regressionTable.R’ [0s/1s]
  Running ‘test-univariateTable.R’ [0s/1s]
Running the tests in ‘tests/test-glmSeries.R’ failed.
Complete output:
  > ### test-glmSeries.R --- 
  > #----------------------------------------------------------------------
  > ## Author: Thomas Alexander Gerds
  > ## Created: Feb 10 2018 (12:44) 
  > ## Version: 
  > ## Last-Updated: Feb 10 2018 (18:37) 
  > ##           By: Thomas Alexander Gerds
  > ##     Update #: 2
  > #----------------------------------------------------------------------
  > ## 
  > ### Commentary: 
  > ## 
  > ### Change Log:
  > #----------------------------------------------------------------------
  > ## 
  > ### Code:
  > library(testthat)
  Error in library(testthat) : there is no package called 'testthat'
  Execution halted
Running the tests in ‘tests/test-publish-gls.R’ failed.
Complete output:
  > ### test-publish-gls.R --- 
  > #----------------------------------------------------------------------
  > ## Author: Thomas Alexander Gerds
  > ## Created: Aug 14 2017 (18:56) 
  > ## Version: 
  > ## Last-Updated: Dec  1 2020 (17:12) 
  > ##           By: Thomas Alexander Gerds
  > ##     Update #: 6
  > #----------------------------------------------------------------------
  > ## 
  > ### Commentary: 
  > ## 
  > ### Change Log:
  > #----------------------------------------------------------------------
  > ## 
  > ### Code:
  > if (requireNamespace("nlme",quietly=TRUE)){ 
  +     library(testthat)
  +     context("publish: gls regression")
  + 
  +     ## simulation
  +     library(nlme)
  +     library(Publish)
  +     library(lava)
  +     m <- lvm(Y ~ X1 + gender + group + Interaction)
  +     distribution(m, ~gender) <- binomial.lvm()
  +     distribution(m, ~group) <- binomial.lvm(size = 2)
  +     constrain(m, Interaction ~ gender + group) <- function(x){x[,1]*x[,2]}
  +     d <- sim(m, 1e2)
  +     d$gender <- factor(d$gender, labels = letters[1:2])
  +     d$group <- factor(d$group)
  + 
  + ## model
  + test_that("publish matches gls", {
  +     e.gls <- gls(Y ~ X1 + gender+group, data = d,
  +                  weights = varIdent(form = ~1|group))
  +     res <- summary(regressionTable(e.gls))
  +     Sgls <- summary(e.gls)$tTable
  +     expect_equal(res$rawTable[c(1,3,5,6),"Coefficient"],
  +                  unname(Sgls[c("X1","genderb","group1","group2"),"Value"]))
  +     expect_equal(res$rawTable[c(1,3,5,6),"Pvalue"],
  +                  unname(Sgls[c("X1","genderb","group1","group2"),"p-value"]))
  + })
  + 
  + context("publish: lme regression")
  + 
  + data("Orthodont")
  + test_that("publish matches lme", {
  +     fm1 <- lme(distance ~ age+Sex, 
  +                random = ~1|Subject,
  +                data = Orthodont) 
  +     res <- publish(fm1)
  +     # main effects
  +     expect_equal(as.double(res$rawTable[c(1:2,4),"Coefficient"]),
  +                  as.double(fixef(fm1)[1:3]))
  +     expect_equal(as.double(res$rawTable[c(1:2,4),"Pvalue"]),
  +                  as.double(summary(fm1)$tTable[1:3,5]))
  + })
  + 
  + }
  Error in library(testthat) : there is no package called 'testthat'
  Execution halted
Running the tests in ‘tests/test-publish-mi.R’ failed.
Complete output:
  > library(testthat)
  Error in library(testthat) : there is no package called 'testthat'
  Execution halted
Running the tests in ‘tests/test-publish.R’ failed.
Complete output:
  > ### test-publish.R --- 
  > #----------------------------------------------------------------------
  > ## author: Brice Ozenne
  > ## created: apr  6 2017 (10:04) 
  > ## Version: 
  > ## last-updated: Aug 14 2017 (19:29) 
  > ##           By: Thomas Alexander Gerds
  > ##     Update #: 10
  > #----------------------------------------------------------------------
  > ## 
  > ### Commentary: 
  > ## 
  > ### Change Log:
  > #----------------------------------------------------------------------
  > ## 
  > ### Code:
  > library(testthat)
  Error in library(testthat) : there is no package called 'testthat'
  Execution halted
Running the tests in ‘tests/test-regressionTable.R’ failed.
Complete output:
  > ### test-regressionTable.R --- 
  > #----------------------------------------------------------------------
  > ## Author: Thomas Alexander Gerds
  > ## Created: Aug 13 2017 (07:39) 
  > ## Version: 
  > ## Last-Updated: Nov  3 2019 (19:32) 
  > ##           By: Thomas Alexander Gerds
  > ##     Update #: 6
  > #----------------------------------------------------------------------
  > ## 
  > ### Commentary: 
  > ## 
  > ### Change Log:
  > #----------------------------------------------------------------------
  > ## 
  > ### Code:
  > library(testthat)
  Error in library(testthat) : there is no package called 'testthat'
  Execution halted
Running the tests in ‘tests/test-univariateTable.R’ failed.
Complete output:
  > ### test-univariateTable.R --- 
  > #----------------------------------------------------------------------
  > ## author: Thomas Alexander Gerds
  > ## created: May  9 2015 (07:55) 
  > ## Version: 
  > ## last-updated: Apr  3 2022 (11:57) 
  > ##           By: Thomas Alexander Gerds
  > ##     Update #: 10
  > #----------------------------------------------------------------------
  > ## 
  > ### Commentary: 
  > ## 
  > ### Change Log:
  > #----------------------------------------------------------------------
  > ## 
  > ### Code:
  > 
  > library(testthat)
  Error in library(testthat) : there is no package called 'testthat'
  Execution halted