tests/testthat/test_clean_params.R

context(desc = "Testing clean_params")

testthat::test_that(
	desc = "negative alphas",
	code = {
		model <- make_model('X -> Y')
		model$parameters_df$priors <- rep(-1, 6)
		expect_error(clean_params(model$parameters_df))
	}
)

testthat::test_that(
	desc = "normalized params warning",
	code = {
		model <- make_model('X -> Y')
		model$parameters_df$param_value <- c(.70, .80, .25, .25, .25, .25)
		expect_message(clean_params(model$parameters_df))
	}
)

Try the CausalQueries package in your browser

Any scripts or data that you put into this service are public.

CausalQueries documentation built on Oct. 20, 2023, 1:06 a.m.