validUDinput {upndown}R Documentation

Data Validation Utilities for upndown

Description

Validation of input values

Usage

validUDinput(cdf, target)

checkTarget(target, tname = "Target")

checkCDF(cdf)

checkNatural(k, parname, toolarge = 1000)

checkDose(x, maxfrac = 0.5)

checkResponse(y)

Arguments

cdf

vector of values, should be nondecreasing between 0 and 1 (inclusive)

target

numeric value(s), should be between 0 and 1 (exclusive)

k

(checkNatural() only) input number to check whether it's a natural number

parname, tname

string, name of variable to plug in for reporting the error back

toolarge

(checkNatural() only) what number would be considered too large to be realistic?

x

(checkDose() only) input object to be verified as valid dose values

maxfrac

(checkDose() only) maximum number of unique values (as fraction of sample size) considered realistic for up-and-down data. Default one-half.

y

(checkResponse() only) input object to be verified as valid response values ('TRUE/FALSE or 0/1)

Value

If a validation issue is found, these functions stop with a relevant error message. If no issue is found, they run through without returning a value.


[Package upndown version 0.1.0 Index]