context('test-fitting-functions.R')
test_that('fitting trexmodels works', {
set.seed(1)
Y <- rnorm(100)
X <- rnorm(100)
fit_nt <- ter(Y ~ X, truncation_interval = c(0.0, 1.0), early_stopping = 1)
fit_lt <- ter(Y ~ X, truncation_interval = c(0.1, 1.0), early_stopping = 1)
fit_ut <- ter(Y ~ X, truncation_interval = c(0.0, 0.9), early_stopping = 1)
fit_dt <- ter(Y ~ X, truncation_interval = c(0.1, 0.9), early_stopping = 1)
expect_s3_class(fit_nt, c('ter', 'nter'))
expect_s3_class(fit_lt, c('ter', 'lter'))
expect_s3_class(fit_ut, c('ter', 'uter'))
expect_s3_class(fit_dt, c('ter', 'dter'))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.