From noreply at r-forge.r-project.org Mon Aug 5 09:08:56 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 5 Aug 2013 09:08:56 +0200 (CEST) Subject: [Vinecopula-commits] r16 - in pkg: R man Message-ID: <20130805070856.8F032184F53@r-forge.r-project.org> Author: ulf Date: 2013-08-05 09:08:55 +0200 (Mon, 05 Aug 2013) New Revision: 16 Modified: pkg/R/RVineMatrix.R pkg/man/RVineMatrix.Rd Log: Ich habe RVM.print()n ein wenig erweitert. Wenn man nun print(RVM, detail=TRUE) eingibt, bekommt man eine detailierte ?\195?\156bersicht ?\195?\188ber die Copulas, deren Familie und Parameter. Dies kann hilfreich sein f?\195?\188r Leute, die die Matrizen nicht so gut lesen k?\195?\182nnen. Modified: pkg/R/RVineMatrix.R =================================================================== --- pkg/R/RVineMatrix.R 2013-07-11 13:00:22 UTC (rev 15) +++ pkg/R/RVineMatrix.R 2013-08-05 07:08:55 UTC (rev 16) @@ -100,7 +100,7 @@ NextMethod("dim") } -print.RVineMatrix = function(x, ...){ +print.RVineMatrix = function(x, detail=FALSE, ...){ RVine=x message("R-vine matrix:") print(RVine$Matrix, ...) @@ -114,8 +114,61 @@ } } #NextMethod("print") + + d=dim(RVine) + if(detail==TRUE || detail==T) + { + message("") + message("Tree 1:") + for(i in 1:(d-1)) + { + a=paste(RVine$names[[RVine$Matrix[i,i]]],",",RVine$names[[RVine$Matrix[d,i]]],sep="") + a=paste(a,": ", BiCopName(RVine$family[d,i], short=FALSE),sep="") + if(RVine$family[d,i]!=0) + { + a=paste(a," with par=", round(RVine$par[d,i],2), sep="") + if(RVine$family[d,i]%in%c(2,7,8,9,10,17,18,19,20,27,28,29,30,37,38,39,40)) + { + a=paste(a," and par2=", round(RVine$par2[d,i],2), sep="") + } + a=paste(a, " (tau=", round(BiCopPar2Tau(RVine$family[d,i],RVine$par[d,i],RVine$par2[d,i]),2), ")", sep="") + } + message(a) + } + for(j in 2:(d-1)) + { + message("") + a=paste("Tree ",j,":",sep="") + message(a) + for(i in 1:(d-j)) + { + a=paste(RVine$names[[RVine$Matrix[i,i]]],",",RVine$names[[RVine$Matrix[d-j+1,i]]],sep="") + a=paste(a,"|",sep="") + conditioningSet=(d-j+2):d + for(k in 1:length(conditioningSet)) + { + if(k>1){ a=paste(a,",",sep="")} + a=paste(a,RVine$names[[RVine$Matrix[conditioningSet[k],i]]],sep="") + } + a=paste(a,": ", BiCopName(RVine$family[d-j+1,i], short=FALSE),sep="") + if(RVine$family[d-j+1,i]!=0) + { + a=paste(a," with par=", round(RVine$par[d-j+1,i],2), sep="") + if(RVine$family[d-j+1,i]%in%c(2,7,8,9,10,17,18,19,20,27,28,29,30,37,38,39,40)) + { + a=paste(a," and par2=", round(RVine$par2[d-j+1,i],2), sep="") + } + a=paste(a, " (tau=", round(BiCopPar2Tau(RVine$family[d-j+1,i],RVine$par[d-j+1,i],RVine$par2[d-j+1,i]),2), ")", sep="") + } + message(a) + } + } + + } } + + createMaxMat = function(Matrix){ if(dim(Matrix)[1]!=dim(Matrix)[2]) stop("Structure matrix has to be quadratic.") Modified: pkg/man/RVineMatrix.Rd =================================================================== --- pkg/man/RVineMatrix.Rd 2013-07-11 13:00:22 UTC (rev 15) +++ pkg/man/RVineMatrix.Rd 2013-08-05 07:08:55 UTC (rev 16) @@ -69,6 +69,12 @@ \item{par2}{Second pair-copula parameter matrix with parameters necessary for pair-copula families with two parameters.} } +\note{ +The \code{print} function writes the R-vine matrix defined by \code{Matrix}. A detailed output is given by \code{print(RVM, detail=TRUE)}, +where \code{RVM} is the \code{\link{RVineMatrix}} object. \cr +The \code{\link{RVineMatrix}} function automatically checks if the given matrix is a valid R-vine matrix (see \code{\link{RVineMatrixCheck}}). +} + \references{ Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013). Selecting and estimating regular vine copulae and application to financial returns. @@ -77,7 +83,7 @@ \author{Jeffrey Dissmann} -\seealso{\code{\link{RVineMLE}}, \code{\link{RVineSim}}, \code{\link{C2RVine}}, \code{\link{D2RVine}}} +\seealso{\code{\link{RVineMatrixCheck}}, \code{\link{RVineMLE}}, \code{\link{RVineSim}}, \code{\link{C2RVine}}, \code{\link{D2RVine}}} \examples{ # define 5-dimensional R-vine tree structure matrix @@ -99,4 +105,7 @@ # define RVineMatrix object RVM = RVineMatrix(Matrix=Matrix,family=family,par=par,par2=par2, names=c("V1","V2","V3","V4","V5")) + +# Print detailed information +print(RVM, detail=TRUE) } From noreply at r-forge.r-project.org Mon Aug 12 11:29:15 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 12 Aug 2013 11:29:15 +0200 (CEST) Subject: [Vinecopula-commits] r17 - pkg/man Message-ID: <20130812092916.07D5B18513A@r-forge.r-project.org> Author: ulf Date: 2013-08-12 11:29:15 +0200 (Mon, 12 Aug 2013) New Revision: 17 Modified: pkg/man/BiCopKPlot.Rd pkg/man/BiCopSelect.Rd pkg/man/RVineMLE.Rd Log: Einige donotrun in den Rd-Files. Bei diesen war die Laufzeit zu lang (laut R-forge) Modified: pkg/man/BiCopKPlot.Rd =================================================================== --- pkg/man/BiCopKPlot.Rd 2013-08-05 07:08:55 UTC (rev 16) +++ pkg/man/BiCopKPlot.Rd 2013-08-12 09:29:15 UTC (rev 17) @@ -60,6 +60,7 @@ \seealso{\code{\link{BiCopMetaContour}}, \code{\link{BiCopChiPlot}}, \code{\link{BiCopLambda}}, \code{\link{BiCopGofTest}}} \examples{ +\donotrun{ # Gaussian and Clayton copulas n = 500 tau = 0.5 @@ -80,3 +81,4 @@ BiCopKPlot(dat1[,1],dat1[,2],main="Gaussian copula") BiCopKPlot(dat2[,1],dat2[,2],main="Clayton copula") } +} Modified: pkg/man/BiCopSelect.Rd =================================================================== --- pkg/man/BiCopSelect.Rd 2013-08-05 07:08:55 UTC (rev 16) +++ pkg/man/BiCopSelect.Rd 2013-08-12 09:29:15 UTC (rev 17) @@ -149,7 +149,7 @@ cop2$par cop2$par2 - +\donotrun{ ## Example 3: empirical data data(daxreturns) cop3 = BiCopSelect(daxreturns[,1],daxreturns[,4], @@ -158,3 +158,4 @@ cop3$par cop3$par2 } +} Modified: pkg/man/RVineMLE.Rd =================================================================== --- pkg/man/RVineMLE.Rd 2013-08-05 07:08:55 UTC (rev 16) +++ pkg/man/RVineMLE.Rd 2013-08-12 09:29:15 UTC (rev 17) @@ -71,6 +71,7 @@ \code{\link{RVineHessian}}} \examples{ +\donotrun{ # define 5-dimensional R-vine tree structure matrix Matrix = c(5,2,3,1,4,0,2,3,4,1,0,0,3,4,1,0,0,0,4,1,0,0,0,0,1) Matrix = matrix(Matrix,5,5) @@ -98,3 +99,4 @@ mle = RVineMLE(simdata,RVM,grad=TRUE) mle$RVM } +} From noreply at r-forge.r-project.org Fri Aug 16 09:49:30 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 16 Aug 2013 09:49:30 +0200 (CEST) Subject: [Vinecopula-commits] r18 - / pkg pkg/inst pkg/man Message-ID: <20130816074930.A06851813EE@r-forge.r-project.org> Author: ulf Date: 2013-08-16 09:49:30 +0200 (Fri, 16 Aug 2013) New Revision: 18 Modified: VineCopula_1.1-2.tar.gz pkg/DESCRIPTION pkg/NAMESPACE pkg/VineCopula.pdf pkg/inst/ChangeLog pkg/man/BiCopChiPlot.Rd pkg/man/BiCopKPlot.Rd pkg/man/BiCopLambda.Rd pkg/man/BiCopSelect.Rd pkg/man/RVineMLE.Rd pkg/man/VineCopula-package.Rd Log: Umstellung des Paketes auf igraph. Da CRAn in letzter Zeit sehr streng geworden ist, habe ich auch bei einigen Beispielen ein dontrun benutzt, bei denen die ev. zu lange laufen. Entsprechend habe ich auch CDVine angepasst. Ich habe CDVine wie auch VineCopula auf meinen Windows System mit R.3.0.1 getestet sowie auf einem Ubuntu mit R.3.0.1. Alle test liefen bei mir einwandfrei durch. Bitte testet beide Pakete auch auf euren Systemen. VineCopula wird ja auch noch von R-forge getestet. Das sollte dann ja reichen. Modified: VineCopula_1.1-2.tar.gz =================================================================== (Binary files differ) Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2013-08-12 09:29:15 UTC (rev 17) +++ pkg/DESCRIPTION 2013-08-16 07:49:30 UTC (rev 18) @@ -2,10 +2,10 @@ Type: Package Title: Statistical inference of vine copulas Version: 1.1-2 -Date: 2013-07-10 +Date: 2013-08-16 Author: Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler Maintainer: Ulf Schepsmeier -Depends: R (>= 2.11.0), MASS, mvtnorm, igraph0 +Depends: R (>= 2.11.0), MASS, mvtnorm, igraph Suggests: CDVine, TSP Description: This package provides functions for statistical inference of vine copulas. It contains tools for bivariate exploratory data analysis, bivariate copula selection and (vine) tree construction. Models can be estimated either sequentially or by joint maximum likelihood estimation. Sampling algorithms and plotting methods are also included. Data is assumed to lie in the unit hypercube (so-called copula data). For C- and D-vines links to the package CDVine are provided. License: GPL (>= 2) Modified: pkg/NAMESPACE =================================================================== --- pkg/NAMESPACE 2013-08-12 09:29:15 UTC (rev 17) +++ pkg/NAMESPACE 2013-08-16 07:49:30 UTC (rev 18) @@ -1,6 +1,6 @@ import(MASS) import(mvtnorm) -import(igraph0) +import(igraph) export(BiCopEst) export(BiCopMetaContour) Modified: pkg/VineCopula.pdf =================================================================== --- pkg/VineCopula.pdf 2013-08-12 09:29:15 UTC (rev 17) +++ pkg/VineCopula.pdf 2013-08-16 07:49:30 UTC (rev 18) @@ -1,252 +1,253 @@ %PDF-1.5 % -1497 0 obj -<> +1544 0 obj +<> endobj -1509 0 obj -<>/Filter/FlateDecode/ID[<5DEF61CE29E4AE189F5134CD12229590><1AC35D00EB3CE74ABB0E67A64C6A4401>]/Index[1497 174]/Info 1496 0 R/Length 86/Prev 404978/Root 1498 0 R/Size 1671/Type/XRef/W[1 2 1]>>stream -hbbd``b`W } BH0Ɂ4>0 $ V ebng`bdic`dQf=0| +1556 0 obj +<>/Filter/FlateDecode/ID[<22C9603F814ABDECF45E41DF188A3A6A><9CE10D6BD980FD498EB3776F7D2051B0>]/Index[1544 180]/Info 1543 0 R/Length 87/Prev 411537/Root 1545 0 R/Size 1724/Type/XRef/W[1 2 1]>>stream +hbbd``b` }@QDȁĴV0]$ V i$غAf Ll3 at zx0j%8wڻ endstream endobj startxref 0 %%EOF - -1670 0 obj -<>stream -hS[kAݙlBki*Z-&Z/FVl|5xC4MZ6TlA_P^A|P - -**gw(p3;wp!"%*FD#HS-ratFY~)J&IV #Er:״xax.t;&$lI p)בCxO'\c1`?~@J oFv{r5% -/_>;M=t3.}d -K"#OԞnu6wmI2&YiÆPNO,_/2jǃmV?)pluNg–knD> o6Ou0V&&,O⭎ PXQj`l䥪Y+Q9O)rU6m\Ã^Mƺ@ysŬ2^Kpt-jᶮ RZUЁpAیoavT(XCMR9?*XNﰼYdX1+̎hP$]VgOx ZU\T%xs,~loƌ@phNAʊۍug=6B=jN ,[9 - g:TyNniѧ/`,G.t54`Ƙ.'jDQS V5!B&R4 b\UMPb.˭GsE+T:4kܐ*$&YŏGeO^xdbh7TUzwt9];? ywCAop -DSgLa/|' + +1723 0 obj +<>stream +hSkSI?qoC͝Tm$7VPl5TWR +ů5/U٥+o.+`[R)*(<(Xs4e眙3@h!% +| +H`ifA}nie/ZIY~4*! gZ7 E%a@Z 7S;i^4H.|֢;HBrW8ұij]DSAUqjIuw6On[!V#^q'| +%][}iD3et[B^j1%%[ntsja  5" [%_[A^ +{_9 endstream endobj -1498 0 obj -<> +1545 0 obj +<> endobj -1499 0 obj -<> +1546 0 obj +<> endobj -1500 0 obj -<> +1547 0 obj +<> endobj -1501 0 obj -<>stream -hXRF~\&zTLlpl' ;*ޕ֒yt% ,Jw?Pϱçq&L$L(Mb͔҄$Ieƅ1EDɎ9M%w1MؔN4w$ajDq3)xX0iE.yQ $i$S@n \LBpRARLҌ:D%;x髺b&3]`!~Jg>%P-(yD#p'6hfi1pdl"'5\o/+gYޒtE}_|VEu1:42<[g2FGܨu1:I8xRQf8Rnt -<)\G"y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 'iX: 㸜 {!ש*?wn +}wJIPPystĢ)/8`h4a 5)6iyߘ5#aObBڃ=);z +2^igҫ_LT $ϳPb^hv1]nrm$㧳0uٵi;"?H(ZJTv5:f_?G!аrDX b7t:Ff.dټ]} +N%!zbs +ē" a[u1[C4%==  +QYEn07&>=pp(8# +x$J'<'d/\IN_,ᮒi&4j#joV̂od맀\UΦ(9 +-|3yer^qdA(YS:Mw1[Pչ*5qep/ vq|J+'xt{x@m/+ ;Lm gMsT5~"։yNp.02\BGvڌ9ùJ:4Z_M(vt]QM9 +2k$biS +rfeZ'{Ҏ}>h/}0CCx:BfBy=R!)cjKk- ^QΈ9 9ΉBP!$:8f2ΚI:mLp20V0kj&Y,l|h{$`uRo7#uu!LkD,fGm)сn Lwȃ؟򒖫lֹPx)~/PgdX#JpѪ`ڮ,Ρj]pnlyc~պ'KJ7].-e/7| ^LHؽ\S=㊼=ɊuS4*q +2ہq;Jy:a|L=b*$ wh1Pzj +YSdu mBHh+OKў(տ +l3D](A-Iv{ER^*nq epA֐NbȖmd2stjݏ_vm<+8SzˁÜy@Nean..~EcG>)U% +𺸦܉4=rf7B"dDfXI=|l~61Jz(?;~E,k_.#gޛEY+52ld?ߏ2 $B!`^/ӛps +\к5&0o=}HKW 䩘%ndb=F2v @ Oz*!3'w%ž}N *˴:ܜj_"fj BC_}) xP0zh^dT;?(s[.(RC- (eܪG~/Xƫ]hs>stream -xڭweT\.N@c -4%[pN@}gΜY3w~[T=ڛJCMl ;qs -@N-X*xɸ-A`gY w0@h -Z\BBB(t/_&Kj.oU -#- -|`rݽ7 at BMʿqjwdoa䜭ۤ/_y{@o2J}Fv{=aY~.0&j0'. Ҁd4LE[],!虧1.ms~2-{F qCg -, [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/vinecopula -r 18 From noreply at r-forge.r-project.org Tue Aug 27 09:29:02 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 27 Aug 2013 09:29:02 +0200 (CEST) Subject: [Vinecopula-commits] r19 - pkg/R Message-ID: <20130827072902.D89B8183C82@r-forge.r-project.org> Author: ulf Date: 2013-08-27 09:29:02 +0200 (Tue, 27 Aug 2013) New Revision: 19 Modified: pkg/R/RVineStructureSelect.r pkg/R/RVineTreePlot.r Log: Mist, mist. Ich f?\195?\188rchte ich habe vergessen die beiden Files von Eike in das endgueltige Paket zu packen. Das waere echt sau dumm. Modified: pkg/R/RVineStructureSelect.r =================================================================== --- pkg/R/RVineStructureSelect.r 2013-08-16 07:49:30 UTC (rev 18) +++ pkg/R/RVineStructureSelect.r 2013-08-27 07:29:02 UTC (rev 19) @@ -2,38 +2,26 @@ if(type == 0) type = "RVine" else if(type == 1) type = "CVine" - else if(type == 2 || type == "DVine") stop("Code to determine the order of the nodes in a D-vine using the package TSP is provided as an example in the documentation of this function." ) if(type != "RVine" & type != "CVine") stop("Vine model not implemented.") n = dim(data)[2] d = 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(any(data>1) || any(data<0)) - stop("Data has to be in the interval [0,1].") - if(any(is.na(familyset))) { - familyset <- c(1:10,13,14,16:20,23,24,26:30,33,34,36:40) - } - if(any(!(familyset %in% c(0,1:10,13,14,16:20,23,24,26:30,33,34,36:40)))) - stop("Copula family not implemented.") - if(selectioncrit != "AIC" && selectioncrit != "BIC") - stop("Selection criterion not implemented.") - if(level < 0 || level > 1) - stop("Significance level has to be between 0 and 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(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))) stop("Copula family not implemented.") + if(selectioncrit != "AIC" && selectioncrit != "BIC") stop("Selection criterion not implemented.") + if(level < 0 & level > 1) stop("Significance level has to be between 0 and 1.") - if(is.null(colnames(data))) - colnames(data) = paste("V",1:n,sep="") + if(is.null(colnames(data))) colnames(data) = paste("V",1:n,sep="") - if(is.na(trunclevel)) - trunclevel = d + if(is.na(trunclevel)) trunclevel = d RVine = list(Tree = NULL, Graph=NULL) - if(trunclevel == 0) - familyset = 0 + if(trunclevel == 0) familyset = 0 g = initializeFirstGraph(data,weights) mst = findMaximumTauTree(g,mode=type) Modified: pkg/R/RVineTreePlot.r =================================================================== --- pkg/R/RVineTreePlot.r 2013-08-16 07:49:30 UTC (rev 18) +++ pkg/R/RVineTreePlot.r 2013-08-27 07:29:02 UTC (rev 19) @@ -1,6 +1,6 @@ RVineTreePlot = function(data=NULL, RVM, method="mle", max.df=30, max.BB=list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1)), tree="ALL", edge.labels=c("family"), P=NULL){ - if(!is(RVM, "RVineMatrix")) stop("'RVM' has to be an RVineMatrix object.") + if(is(RVM) != "RVineMatrix") stop("'RVM' has to be an RVineMatrix object.") if(edge.labels[1] != FALSE & !all(edge.labels %in% c("family","par","par2","theotau","emptau","pair"))) stop("Edge label not implemented.") if(is.null(data) & any(edge.labels == "emptau")) stop("Empirical Kendall's tau values cannot be obtained if no data is provided.") From noreply at r-forge.r-project.org Tue Aug 27 09:52:04 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 27 Aug 2013 09:52:04 +0200 (CEST) Subject: [Vinecopula-commits] r20 - pkg/R Message-ID: <20130827075204.3E7F8184F90@r-forge.r-project.org> Author: ulf Date: 2013-08-27 09:52:03 +0200 (Tue, 27 Aug 2013) New Revision: 20 Modified: pkg/R/RVineStructureSelect.r Log: Modified: pkg/R/RVineStructureSelect.r =================================================================== --- pkg/R/RVineStructureSelect.r 2013-08-27 07:29:02 UTC (rev 19) +++ pkg/R/RVineStructureSelect.r 2013-08-27 07:52:03 UTC (rev 20) @@ -8,20 +8,20 @@ d = 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(any(data>1) || any(data<0)) stop("Data has be in the interval [0,1].") + if(d<2) stop("Dimension has to be at least 2.") + 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))) stop("Copula family not implemented.") - if(selectioncrit != "AIC" && selectioncrit != "BIC") stop("Selection criterion not implemented.") - if(level < 0 & level > 1) stop("Significance level has to be between 0 and 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))) stop("Copula family not implemented.") + if(selectioncrit != "AIC" && selectioncrit != "BIC") stop("Selection criterion not implemented.") + if(level < 0 & level > 1) stop("Significance level has to be between 0 and 1.") if(is.null(colnames(data))) colnames(data) = paste("V",1:n,sep="") - if(is.na(trunclevel)) trunclevel = d + if(is.na(trunclevel)) trunclevel = d RVine = list(Tree = NULL, Graph=NULL) - if(trunclevel == 0) familyset = 0 + if(trunclevel == 0) familyset = 0 g = initializeFirstGraph(data,weights) mst = findMaximumTauTree(g,mode=type) From noreply at r-forge.r-project.org Tue Aug 27 11:43:50 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 27 Aug 2013 11:43:50 +0200 (CEST) Subject: [Vinecopula-commits] r21 - / pkg/R Message-ID: <20130827094350.78D3C1859B8@r-forge.r-project.org> Author: ulf Date: 2013-08-27 11:43:49 +0200 (Tue, 27 Aug 2013) New Revision: 21 Modified: VineCopula_1.1-2.tar.gz pkg/R/RVineStructureSelect.r Log: Diesmal mit der richtigen RVineStructureSelect.r von Eike. Das pdf soll nicht mehr ins Paket. Modified: VineCopula_1.1-2.tar.gz =================================================================== (Binary files differ) Modified: pkg/R/RVineStructureSelect.r =================================================================== --- pkg/R/RVineStructureSelect.r 2013-08-27 07:52:03 UTC (rev 20) +++ pkg/R/RVineStructureSelect.r 2013-08-27 09:43:49 UTC (rev 21) @@ -8,20 +8,20 @@ d = 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(any(data>1) || any(data<0)) stop("Data has be in the interval [0,1].") + if(d<2) stop("Dimension has to be at least 2.") + 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))) stop("Copula family not implemented.") - if(selectioncrit != "AIC" && selectioncrit != "BIC") stop("Selection criterion not implemented.") - if(level < 0 & level > 1) stop("Significance level has to be between 0 and 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))) stop("Copula family not implemented.") + if(selectioncrit != "AIC" && selectioncrit != "BIC") stop("Selection criterion not implemented.") + if(level < 0 & level > 1) stop("Significance level has to be between 0 and 1.") if(is.null(colnames(data))) colnames(data) = paste("V",1:n,sep="") - if(is.na(trunclevel)) trunclevel = d + if(is.na(trunclevel)) trunclevel = d RVine = list(Tree = NULL, Graph=NULL) - if(trunclevel == 0) familyset = 0 + if(trunclevel == 0) familyset = 0 g = initializeFirstGraph(data,weights) mst = findMaximumTauTree(g,mode=type) @@ -74,7 +74,7 @@ E(g)$name = paste(get.edgelist(g)[,1],get.edgelist(g)[,2],sep=",") for(i in 1:ecount(g)){ - E(g)$conditionedSet[[i]] = get.edges(g,i-1) + E(g)$conditionedSet[[i]] = get.edges(g,i) } return(g) } @@ -90,9 +90,9 @@ { M = abs(get.adjacency(g,attr="weight")) sumtaus = rowSums(M) - root = which.max(sumtaus) -1 + root = which.max(sumtaus) - Ecken = get.edges(g,0:(ecount(g)-1)) + Ecken = get.edges(g,1:ecount(g)) pos = Ecken[,2]== root | Ecken[,1]== root mst = delete.edges(g, E(g)[!pos]) @@ -112,40 +112,40 @@ { parameterForACopula[[i]] = list() - a = get.edges(mst,i-1)+1 + a = get.edges(mst,i) parameterForACopula[[i]]$zr1 = data.univ[,a[1]] parameterForACopula[[i]]$zr2 = data.univ[,a[2]] - E(mst)[i-1]$Copula.Data.1 = list(data.univ[,a[1]]) - E(mst)[i-1]$Copula.Data.2 = list(data.univ[,a[2]]) + E(mst)[i]$Copula.Data.1 = list(data.univ[,a[1]]) + E(mst)[i]$Copula.Data.2 = list(data.univ[,a[2]]) - if(is.null(V(mst)[a[1]-1]$name)) - E(mst)[i-1]$Copula.CondName.1 = a[1]-1 + if(is.null(V(mst)[a[1]]$name)) + E(mst)[i]$Copula.CondName.1 = a[1] else - E(mst)[i-1]$Copula.CondName.1 = V(mst)[a[1]-1]$name + E(mst)[i]$Copula.CondName.1 = V(mst)[a[1]]$name - if(is.null(V(mst)[a[2]-1]$name)) - E(mst)[i-1]$Copula.CondName.2 = a[2]-1 + if(is.null(V(mst)[a[2]]$name)) + E(mst)[i]$Copula.CondName.2 = a[2] else - E(mst)[i-1]$Copula.CondName.2 = V(mst)[a[2]-1]$name + E(mst)[i]$Copula.CondName.2 = V(mst)[a[2]]$name - if(is.null(V(mst)[a[1]-1]$name) || is.null(V(mst)[a[2]-1]$name)) - E(mst)[i-1]$Copula.Name = paste(a[1]-1,a[2]-1,sep=" , ") + if(is.null(V(mst)[a[1]]$name) || is.null(V(mst)[a[2]]$name)) + E(mst)[i]$Copula.Name = paste(a[1],a[2],sep=" , ") else - E(mst)[i-1]$Copula.Name = paste(V(mst)[a[1]-1]$name,V(mst)[a[2]-1]$name,sep=" , ") + E(mst)[i]$Copula.Name = paste(V(mst)[a[1]]$name,V(mst)[a[2]]$name,sep=" , ") } outForACopula = lapply(X = parameterForACopula, FUN=wrapper_fit.ACopula, type,copulaSelectionBy,testForIndependence,testForIndependence.level,weights) - for(i in 0:(d-1)) + for(i in 1:d) { - E(mst)$Copula.param[[i+1]] = c(outForACopula[[i+1]]$par,outForACopula[[i+1]]$par2) - E(mst)[i]$Copula.type = outForACopula[[i+1]]$family - E(mst)[i]$Copula.out = list(outForACopula[[i+1]]) + E(mst)$Copula.param[[i]] = c(outForACopula[[i]]$par,outForACopula[[i]]$par2) + E(mst)[i]$Copula.type = outForACopula[[i]]$family + E(mst)[i]$Copula.out = list(outForACopula[[i]]) - E(mst)[i]$Copula.CondData.1 <- list(outForACopula[[i+1]]$CondOn.1) - E(mst)[i]$Copula.CondData.2 <- list(outForACopula[[i+1]]$CondOn.2) + E(mst)[i]$Copula.CondData.1 <- list(outForACopula[[i]]$CondOn.1) + E(mst)[i]$Copula.CondData.2 <- list(outForACopula[[i]]$CondOn.2) } return(mst) @@ -157,9 +157,9 @@ parameterForACopula = list() - for(i in 0:(d-1)) + for(i in 1:d) { - parameterForACopula[[i+1]] = list() + parameterForACopula[[i]] = list() con = get.edge(mst,i) @@ -198,8 +198,8 @@ if(progress == TRUE) message(n1," + ",n2," --> ", E(mst)[i]$name) - parameterForACopula[[i+1]]$zr1 = zr1 - parameterForACopula[[i+1]]$zr2 = zr2 + parameterForACopula[[i]]$zr1 = zr1 + parameterForACopula[[i]]$zr2 = zr2 E(mst)[i]$Copula.Data.1 = list(zr1) E(mst)[i]$Copula.Data.2 = list(zr2) @@ -210,14 +210,14 @@ outForACopula = lapply(X = parameterForACopula, FUN=wrapper_fit.ACopula, type,copulaSelectionBy,testForIndependence,testForIndependence.level,weights) - for(i in 0:(d-1)) + for(i in 1:d) { - E(mst)$Copula.param[[i+1]] = c(outForACopula[[i+1]]$par,outForACopula[[i+1]]$par2) - E(mst)[i]$Copula.type = outForACopula[[i+1]]$family - E(mst)[i]$Copula.out = list(outForACopula[[i+1]]) + E(mst)$Copula.param[[i]] = c(outForACopula[[i]]$par,outForACopula[[i]]$par2) + E(mst)[i]$Copula.type = outForACopula[[i]]$family + E(mst)[i]$Copula.out = list(outForACopula[[i]]) - E(mst)[i]$Copula.CondData.2 <- list(outForACopula[[i+1]]$CondOn.1) - E(mst)[i]$Copula.CondData.1 <- list(outForACopula[[i+1]]$CondOn.2) + E(mst)[i]$Copula.CondData.2 <- list(outForACopula[[i]]$CondOn.1) + E(mst)[i]$Copula.CondData.1 <- list(outForACopula[[i]]$CondOn.2) } return(mst) @@ -238,7 +238,7 @@ V(g)$conditioningSet = E(oldVineGraph)$conditioningSet } - for(i in 0:(ecount(g)-1)){ + for(i in 1:ecount(g)){ con = get.edge(g,i) @@ -315,8 +315,8 @@ out = intern_SchnittDifferenz(l1,l2) - suppressWarnings({E(g)$conditionedSet[i+1] = list(out$differenz)}) - suppressWarnings({E(g)$conditioningSet[i+1] = list(out$schnitt)}) + suppressWarnings({E(g)$conditionedSet[i] = list(out$differenz)}) + suppressWarnings({E(g)$conditioningSet[i] = list(out$schnitt)}) } E(g)[i]$todel = !ok @@ -452,7 +452,7 @@ } - M = M+1 + M = M#+1 M[is.na(M)]=0 Type[is.na(Type)]=0 From noreply at r-forge.r-project.org Wed Aug 28 09:39:20 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 28 Aug 2013 09:39:20 +0200 (CEST) Subject: [Vinecopula-commits] r22 - pkg/R Message-ID: <20130828073920.79A78180941@r-forge.r-project.org> Author: ulf Date: 2013-08-28 09:39:19 +0200 (Wed, 28 Aug 2013) New Revision: 22 Modified: pkg/R/RVineStructureSelect.r Log: Ich hab noch einen Fehler im C-vine gefunden. Hier hat er mit Sparse-Matrizen gearbeite, was einerseits dazu gefuehrt hat, dass er das "Matrix" und "lattice" Paket nachgeladen hat und zum anderen hat er eine Fehler geliefert, weil er auf einer Sparse-matrix die Funktion "colSum" nicht anwenden konnte. Modified: pkg/R/RVineStructureSelect.r =================================================================== --- pkg/R/RVineStructureSelect.r 2013-08-27 09:43:49 UTC (rev 21) +++ pkg/R/RVineStructureSelect.r 2013-08-28 07:39:19 UTC (rev 22) @@ -88,7 +88,7 @@ } else if(mode == "CVine") { - M = abs(get.adjacency(g,attr="weight")) + M = abs(get.adjacency(g,attr="weight",sparse=0)) sumtaus = rowSums(M) root = which.max(sumtaus)