testfunctionParameterChecks function

testfunctionParameterChecks

testfunctionParameterChecks

This is a helper function that ensures parameter values used for performing special statistical tests are valid.

testfunctionParameterChecks(alternative, alpha, stderr)

Arguments

  • alternative: The type of statistical test. Valid values are one of c('two.sided', 'greater', 'less')
  • alpha: The test level. Valid values are between 0.0001 and 0.2
  • stderr: The standard error of a parameter whose confidence intervals is to be calculated

Returns

'Success' or an error message.

Examples

#reproducer:::testfunctionParameterChecks(alternative='larger',alpha=0.1,stderr=0.002) #Error in testfunctionParameterChecks(alternative = 'larger', alpha = 0.1) : # Invalid alternative parameter, choose one of two.sided, greater or less reproducer:::testfunctionParameterChecks(alternative='greater',alpha=0.1,stderr=0.002) #[1] 'Success' #reproducer:::testfunctionParameterChecks(alternative='greater',alpha=0.1,stderr=0.000) #Error in testfunctionParameterChecks(alternative = 'greater', alpha = 0.1, : # Improbably small variance, data are essentially constant

Author(s)

Barbara Kitchenham and Lech Madeyski