[R] understanding error messages in archmCopulaFit in fCopulae

David Winsemius dwinsemius at comcast.net
Fri May 6 22:33:51 CEST 2011


On May 6, 2011, at 12:14 PM, Lee, Eric wrote:

> Hello,
>
> I'm running version R x64 v2.12.2 on a 64bit windows 7 PC.  I have  
> two data vectors, x and y, and try to run archmCopulaFit.  Most of  
> the copulas produce errors.  Can you tell me what the errors mean  
> and if possible, how I can set archmCopulaFit options to make them  
> run?  I see in the documentation that there are "arguments passed to  
> the optimization function in use,  'nlminb'", however, it's not  
> clear to me how to set them.
>
> Thanks.
>
> Copulas 2, 4,7,8,11,12,14,15,18,19,20,21,22 have the following error:
>
> fit1 = archmCopulaFit(x,y,type="2")
> Error in if (alpha < range[1] | alpha > range[2]) { :
>  missing value where TRUE/FALSE needed

Seems like a fairly explanatory error message. The function is testing  
the assumptions going into it, possibly against default values,  using  
some sort of range calculation, and is finding that your data doesn't  
meet those requirements.

>
> Copulas 3 has the following error:
>
> fit1 = archmCopulaFit(x,y,type="3")
> Error in if (alpha < range[1] | alpha > range[2]) { :
>  missing value where TRUE/FALSE needed
> In addition: Warning messages:
> 1: In log(darchmCopula(u = U, v = V, alpha = x, type = type)) :
>  NaNs produced
> 2: In log(darchmCopula(u = U, v = V, alpha = x, type = type)) :
>  NaNs produced

That message arises when you ask for the log of a number less than to  
equal to 0.

>
> Copula 10:
>
> fit1 = archmCopulaFit(x,y,type="10")
> Error in if (alpha < range[1] | alpha > range[2]) { :
>  missing value where TRUE/FALSE needed
> In addition: Warning message:
> In log(darchmCopula(u = U, v = V, alpha = x, type = type)) : NaNs  
> produced
>

See above.

> Copulas 1,5,9,13,16,17 produce estimates.

Those errors appear to be arising because of specific aspects of your  
data ...  which seems to be "missing in action".

-- 
David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list