From noreply at r-forge.r-project.org Tue Oct 28 10:49:10 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 28 Oct 2014 10:49:10 +0100 (CET) Subject: [Vinecopula-commits] r69 - pkg/R Message-ID: <20141028094910.B143C1875A1@r-forge.r-project.org> 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.")