Nothing
test_that("hybrid-choice Group 3 files are self-contained", {
example_directory <- rbiogeme_example_path( "hybrid_choice_models")
scripts <- c(
"plot_h07_mode_lv_ordprobit_simult_generated.R",
"plot_h08_mode_lv_parameter_overrides.R"
)
expect_equal(
sort(list.files(example_directory, pattern = "^plot_h0[78].*\\.R$")),
sort(scripts)
)
for (script in scripts) {
expect_silent(parse(file.path(example_directory, script)))
}
})
test_that("h07 reproduces the generated ordered-probit model without Python source output", {
path <- rbiogeme_example_path( "hybrid_choice_models",
"plot_h07_mode_lv_ordprobit_simult_generated.R"
)
source_text <- paste(readLines(path, warn = FALSE), collapse = "\n")
expect_match(source_text, "ordered_probit_log_probability")
expect_match(source_text, "plot_h07_mode_lv_ordprobit_simult_generated")
expect_false(grepl("writeLines|open\\(.*w", source_text))
})
test_that("h08 declares a fixed generated-parameter override and does not estimate", {
path <- rbiogeme_example_path( "hybrid_choice_models",
"plot_h08_mode_lv_parameter_overrides.R"
)
source_text <- paste(readLines(path, warn = FALSE), collapse = "\n")
expect_match(source_text, "parameter_overrides")
expect_match(source_text, "fixed = TRUE")
expect_false(grepl("estimate\\(", source_text, fixed = FALSE))
})
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.