COPinv2
function is internally used by level.curvesCOP2
. A common misapplication that will puzzle the user is that the following call and error message are often seen:
COPinv2(.2, .25, cop=PSP)
Error in uniroot(func, interval = c(lo, 1), u = u, LHS = t, cop = cop, :
f() values at end points not of opposite sign
[1] NA
This is a harmless error in the sense that COPinv2
is functioning properly. One can not invert a copula for $v < t$ and for $v = t$ the $u = 1$ because of fundamental copula properties. Also because of fundamental theory involved, the author perceives that it is better to not silently trap the error but let errors cascade up the chain in a user's application.COPinv2(cop=NULL, v, t, para=NULL, ...)
COP
, COPinv
, level.curvesCOP2
# See those for COPinv as they are the same by analogy.
Run the code above in your browser using DataLab