test.H0: Helper function for custom test blocks. Check whether a...

View source: R/stats_tests.r

test.H0R Documentation

Helper function for custom test blocks. Check whether a certain null hypothesis is not significantly rejected

Description

Helper function for custom test blocks. Check whether a certain null hypothesis is not significantly rejected

Usage

test.H0(
  test.expr,
  p.value,
  test.name = "",
  alpha.warning = 0.05,
  alpha.failure = 0.001,
  short.message,
  warning.message,
  failure.message,
 
    success.message = "Great, I could not significantly reject the null hypothesis from the test '{{test_name}}', p.value = {{p_value}}!",
  check.warning = TRUE,
  part = NULL,
  ps = get.ps(),
  stud.env = ps$stud.env,
  ...
)

Arguments

test.expr

an expression that calls a test which will be evaluated in stud.env. The test must return a list that contains a field "p.value"

p.value

Instead of providing test.expr, one can directly provide a p.value from a previously run test

test.name

an optional test.name that can be used to fill the test_name whiskers in warning or failure messages.

alpha.warning

default=0.05 a p.value below a warning is printed that the code may be wrong

alpha.failure

default=0.001 the critical p.value below which the stud code is considered wrong

short.message, failure.messages,

warning.messages Messages in case of a failure and warning and short message for the log.file

check.warning

if FALSE don't check for a warning

Value

TRUE if H0 cannot be rejected, FALSE if not and "warning" if it can be weakly rejected


skranz/RTutor documentation built on Feb. 7, 2024, 12:53 a.m.