Re: [R] understanding error messages in archmCopulaFit in fCopulae

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Fri, 06 May 2011 16:33:51 -0400

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

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 06 May 2011 - 20:36:37 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 May 2011 - 22:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive