Nothing
test_that("drcfit works as expected on the model results", {
skip_on_cran()
skip_on_os(c("mac", "linux"))
withr::local_seed(123)
datafilename <- system.file("extdata", "transcripto_sample.txt", package="DRomics")
o <- microarraydata(datafilename, check = TRUE, norm.method = "cyclicloess")
s_quad <- itemselect(o, select.method = "quadratic", FDR = 0.001)
# Select model with AIC
f.AIC <- drcfit(s_quad, progressbar = FALSE, information.criterion = "AIC")
tmodel.AIC <- table(f.AIC$fitres$model)
expect_equal(as.numeric(tmodel.AIC["Hill"]), 2)
expect_equal(as.numeric(tmodel.AIC["linear"]), 8)
expect_equal(as.numeric(tmodel.AIC["exponential"]), 26)
expect_equal(as.numeric(tmodel.AIC["Gauss-probit"]), 28)
expect_equal(as.numeric(tmodel.AIC["log-Gauss-probit"]), 4)
expect_equal(round(mean(f.AIC$fitres$b, na.rm = TRUE), 4), 1.5101)
expect_equal(round(mean(f.AIC$fitres$c, na.rm = TRUE), 4), 5.3753)
expect_equal(round(mean(f.AIC$fitres$d, na.rm = TRUE), 4), 9.2524)
expect_equal(round(mean(f.AIC$fitres$e, na.rm = TRUE), 4), 1.5637)
expect_equal(round(mean(f.AIC$fitres$f, na.rm = TRUE), 4), 2.6163)
# Select model with BIC
f.BIC <- drcfit(s_quad, progressbar = FALSE, information.criterion = "BIC")
tmodel.BIC <- table(f.BIC$fitres$model)
expect_equal(as.numeric(tmodel.BIC["Hill"]), 0)
expect_equal(as.numeric(tmodel.BIC["linear"]), 12)
expect_equal(as.numeric(tmodel.BIC["exponential"]), 27)
expect_equal(as.numeric(tmodel.BIC["Gauss-probit"]), 25)
expect_equal(as.numeric(tmodel.BIC["log-Gauss-probit"]), 4)
# Select model with AICc
f.AICc <- drcfit(s_quad, progressbar = FALSE, information.criterion = "AICc")
tmodel.AICc <- table(f.AICc$fitres$model)
expect_equal(as.numeric(tmodel.AICc["Hill"]), 1)
expect_equal(as.numeric(tmodel.AICc["linear"]), 9)
expect_equal(as.numeric(tmodel.AICc["exponential"]), 28)
expect_equal(as.numeric(tmodel.AICc["Gauss-probit"]), 26)
expect_equal(as.numeric(tmodel.AICc["log-Gauss-probit"]), 4)
expect_equal(round(mean(f.AICc$fitres$b, na.rm = TRUE), 4), 1.4137)
expect_equal(round(mean(f.AICc$fitres$c, na.rm = TRUE), 4), 4.9388)
expect_equal(round(mean(f.AICc$fitres$d, na.rm = TRUE), 4), 9.2119)
expect_equal(round(mean(f.AICc$fitres$e, na.rm = TRUE), 4), 1.5299)
expect_equal(round(mean(f.AICc$fitres$f, na.rm = TRUE), 4), 2.8982)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.