[Vinecopula-commits] r69 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Di Okt 28 10:49:10 CET 2014


Author: etobi
Date: 2014-10-28 10:49:10 +0100 (Tue, 28 Oct 2014)
New Revision: 69

Modified:
   pkg/R/RVineStructureSelect.r
Log:
* RVineStructureSelect: Bug concerning the dimensions of input data/security queries fixed (Reported by Sarka Cerna, Radek Solnicky and Ludovic Theate. Thanks a lot!)

Modified: pkg/R/RVineStructureSelect.r
===================================================================
--- pkg/R/RVineStructureSelect.r	2014-09-10 12:05:26 UTC (rev 68)
+++ pkg/R/RVineStructureSelect.r	2014-10-28 09:49:10 UTC (rev 69)
@@ -4,11 +4,11 @@
   else if(type == 1) type = "CVine"
   if(type != "RVine" & type != "CVine") stop("Vine model not implemented.")
 
-	n = dim(data)[2]
-	d = dim(data)[1]
+  d = n = dim(data)[2]
+	N = dim(data)[1]
 	
-	if(dim(data)[1]<2) stop("Number of observations has to be at least 2.")
-  if(d<2) stop("Dimension has to be at least 2.")
+	if(N<2) stop("Number of observations has to be at least 2.")
+  if(d<3) stop("Dimension has to be at least 3.")
   if(any(data>1) || any(data<0)) stop("Data has be in the interval [0,1].")
 	
   if(!is.na(familyset[1])) for(i in 1:length(familyset)) if(!(familyset[i] %in% c(0,1:10,13,14,16:20,23,24,26:30,33,34,36:40, 104,114,124,134,204,214,224,234))) stop("Copula family not implemented.")  



Mehr Informationen über die Mailingliste Vinecopula-commits