test_that("pshBAR throws error for negative value of xi", {
set.seed(10)
ftime <- rexp(50)
fstatus <- sample(0:2, 50, replace = TRUE)
cov <- matrix(runif(250), nrow = 50)
dimnames(cov)[[2]] <- c('x1', 'x2', 'x3', 'x4', 'x5')
expect_that(crrBAR(ftime, fstatus, cov, lambda = 0, xi = -0.1), throws_error())
})
test_that("pshBAR throws error for negative value of lambda", {
set.seed(10)
ftime <- rexp(50)
fstatus <- sample(0:2, 50, replace = TRUE)
cov <- matrix(runif(250), nrow = 50)
dimnames(cov)[[2]] <- c('x1', 'x2', 'x3', 'x4', 'x5')
expect_that(crrBAR(ftime, fstatus, cov, lambda = -0.1, xi = 0), throws_error())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.