Learn R Programming

DstarM (version 0.1.0)

testFun: Test fun.density with lower and upper bounds

Description

Test fun.density with lower and upper bounds

Usage

testFun(fun.density, lower, upper, args = list())

Arguments

fun.density
A density function to be evaluated.
lower
Lower bounds of the parameter space with which fun.density can be evaluated.
upper
Upper bounds of the parameter space with which fun.density can be evaluated.
args
Additional arguments for fun.density.

Value

Returns TRUE if no errors occured, otherwise returns an error message

Details

A function that is called whenever a nondefault density function is passed to DstarM. It does some rough error checking.

Examples

Run this code
lower = c(.5, -6, .1, 0, 0)
upper = c(2, 6, .99, .99, 10)
args = list(t = seq(0, 5, .01), pars = lower, boundary = 'lower',
DstarM = TRUE)
testFun(fun.density = Voss.density, lower = lower, upper = upper,
args = args)
# TRUE

Run the code above in your browser using DataLab