context("Log score funtion")
test_that("Log Score function should be consistent", {
prob <- c(0,0.25,0.5,0.75,1)
status <- c(0,1,0,1,1)
expected_result <- mean(ifelse((1-status),log(1-prob),log(prob)))
expect_equal(MeanLogScore(prob, status), expected_result)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.