@@ -552,6 +552,7 @@ test_that(
552552 counts <- c(18 ,17 ,15 ,20 ,10 ,20 ,25 ,13 ,12 )
553553 outcome <- gl(3 ,1 ,9 )
554554 treatment <- gl(3 ,3 )
555+ counts <- counts + as.numeric(treatment ) # this is a cheap trick to avoid rank deficiency
555556 data.frame (treatment , outcome , counts ) # showing data
556557 glm.D93 <- glm(counts ~ outcome + treatment , family = poisson())
557558
@@ -563,15 +564,15 @@ test_that(
563564 expect_identical(
564565 chisq_out $ full_result
565566 , list (
566- outcome = " $\\ chi^2(2) = 5.45 $, $p = .065 $"
567- , treatment = " $\\ chi^2(2) = 0.00 $, $p > .999 $"
567+ outcome = " $\\ chi^2(2) = 4.87 $, $p = .087 $"
568+ , treatment = " $\\ chi^2(2) = 0.32 $, $p = .851 $"
568569 )
569570 )
570571 expect_identical(
571572 cp_out $ full_result
572573 , list (
573- outcome = " $C_p = 11.13 $"
574- , treatment = " $C_p = 15.13 $"
574+ outcome = " $C_p = 10.62 $"
575+ , treatment = " $C_p = 14.30 $"
575576 )
576577 )
577578 expect_identical(
@@ -581,8 +582,8 @@ test_that(
581582 expect_identical(
582583 rao_out $ full_result
583584 , list (
584- outcome = " $\\ mathit{RS}(2) = 5.56 $, $p = .062 $"
585- , treatment = " $\\ mathit{RS}(2) = 0.00 $, $p > .999 $"
585+ outcome = " $\\ mathit{RS}(2) = 4.96 $, $p = .084 $"
586+ , treatment = " $\\ mathit{RS}(2) = 0.32 $, $p = .852 $"
586587 )
587588 )
588589
@@ -593,23 +594,23 @@ test_that(
593594 expect_identical(
594595 car_lr_out $ full_result
595596 , list (
596- outcome = " $\\ chi^2(2) = 5.45 $, $p = .065 $"
597- , treatment = " $\\ chi^2(2) = 0.00 $, $p > .999 $"
597+ outcome = " $\\ chi^2(2) = 4.87 $, $p = .087 $"
598+ , treatment = " $\\ chi^2(2) = 0.32 $, $p = .851 $"
598599 )
599600 )
600601 expect_identical(
601602 car_wald_out $ full_result
602603 , list (
603- Intercept = " $\\ chi^2(1) = 317.37 $, $p < .001$"
604- , outcome = " $\\ chi^2(2) = 5.49 $, $p = .064 $"
605- , treatment = " $\\ chi^2(2) = 0.00 $, $p > .999 $"
604+ Intercept = " $\\ chi^2(1) = 346.21 $, $p < .001$"
605+ , outcome = " $\\ chi^2(2) = 4.91 $, $p = .086 $"
606+ , treatment = " $\\ chi^2(2) = 0.32 $, $p = .852 $"
606607 )
607608 )
608609 expect_identical(
609610 car_f_out $ full_result
610611 , list (
611- outcome = " $F(2, 4) = 2.11 $, $p = .237 $"
612- , treatment = " $F(2, 4) = 0.00 $, $p > .999 $"
612+ outcome = " $F(2, 4) = 2.25 $, $p = .222 $"
613+ , treatment = " $F(2, 4) = 0.15 $, $p = .867 $"
613614 )
614615 )
615616 }
0 commit comments