Permalink
Browse files

unit test mse fixed (^ operator not working with data.frames in new v…

…ersion of R). Reverting some old comment in confband.
  • Loading branch information...
kkholst committed Aug 21, 2017
1 parent 6644cbe commit 92c62cd5c2bb7e89f945eb1bfc9f09d19f05b6bd
Showing with 2 additions and 2 deletions.
  1. +1 −1 R/confband.R
  2. +1 −1 tests/testthat/test-inference.R
View
@@ -123,7 +123,7 @@ confband <- function(x,lower,upper,center=NULL,line=TRUE,delta=0.07,centermark=0
points(center,x,pch=16,col="white")
points(center,x,pch=pch,...)
} else {
##segments(center,x-centermark,center,x+centermark,...)
segments(center,x-centermark,center,x+centermark,...)
}
}
}
@@ -271,7 +271,7 @@ test_that("Prediction with missing data, random intercept", {
system.time(e <- estimate(m0,d))
mytol <- 1e-6
mse <- function(x,y=0) mean(na.omit(x-y)^2)
mse <- function(x,y=0) mean(na.omit(as.matrix(x)-as.matrix(y))^2)
expect_true(mse(logLik(e),logLik(l))<mytol)
expect_true(mse(nlme::fixef(l),coef(e)[1:2])<mytol)
u1 <- nlme::ranef(l)##[[1]][,1]

0 comments on commit 92c62cd

Please sign in to comment.