From noreply at r-forge.r-project.org Tue Mar 4 14:26:01 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 4 Mar 2014 14:26:01 +0100 (CET) Subject: [Vinecopula-commits] r60 - / pkg pkg/R pkg/inst pkg/man Message-ID: <20140304132602.5D15E186E6C@r-forge.r-project.org> Author: ben_graeler Date: 2014-03-04 14:25:34 +0100 (Tue, 04 Mar 2014) New Revision: 60 Removed: VineCopula_1.2.tar.gz Modified: pkg/DESCRIPTION pkg/R/RVineLogLik.r pkg/inst/ChangeLog pkg/man/RVineLogLik.Rd Log: - now with additions to the changelog - added parameter "verbose" to RVineLogLik to allow to suppres some debug output Deleted: VineCopula_1.2.tar.gz =================================================================== (Binary files differ) Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2014-02-17 20:35:24 UTC (rev 59) +++ pkg/DESCRIPTION 2014-03-04 13:25:34 UTC (rev 60) @@ -2,7 +2,7 @@ Type: Package Title: Statistical inference of vine copulas Version: 1.2-1 -Date: 2014-02-13 +Date: 2014-03-04 Author: Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler Maintainer: Ulf Schepsmeier Depends: R (>= 2.11.0), copula Modified: pkg/R/RVineLogLik.r =================================================================== --- pkg/R/RVineLogLik.r 2014-02-17 20:35:24 UTC (rev 59) +++ pkg/R/RVineLogLik.r 2014-03-04 13:25:34 UTC (rev 60) @@ -1,4 +1,4 @@ -RVineLogLik <-function(data,RVM,par=RVM$par,par2=RVM$par2,separate=FALSE){ +RVineLogLik <-function(data,RVM,par=RVM$par,par2=RVM$par2,separate=FALSE,verbose=TRUE){ if(is.vector(data)){ data = t(as.matrix(data)) @@ -104,10 +104,10 @@ { V$value=matrix(ll,n,n) } - if(any(V$value %in% c(NA,NaN,-Inf,Inf))) { - print(V$value[V$value %in% c(NA,NaN,-Inf,Inf)]) - print(th) - print(th2) + if(any(V$value %in% c(NA,NaN,-Inf,Inf)) & verbose) { + print(V$value[V$value %in% c(NA,NaN,-Inf,Inf)]) + print(th) + print(th2) } V$value[V$value %in% c(NA,NaN,-Inf,Inf)] <- -1e10 #if(any(V$value %in% c(NA,NaN,-Inf,Inf))) print("Fehler in V$value") Modified: pkg/inst/ChangeLog =================================================================== --- pkg/inst/ChangeLog 2014-02-17 20:35:24 UTC (rev 59) +++ pkg/inst/ChangeLog 2014-03-04 13:25:34 UTC (rev 60) @@ -3,11 +3,13 @@ Current authors: Ulf Schepsmeier, Tobias Erhardt and Benedikt Graeler Former authors: Eike Brechmann and Jakob Stoeber -Version 1.2-1 (January 25, 2014) +Version 1.2-1 (March 4, 2014) - New functionality: * RVineSim allows to commit a (N,d)-matrix of U[0,1] random variates to be transformed to the copula sample. For example if you want to use quasi random variables instead of the pseudo random variables implemented in R (Thanks to Marius Hofert) + * The package now contains class wrappers that are compatible with the copula class from the copula R-package. These include all bivariate families currently implemented: The class representation for different rotated families of e.g the BB6 family are represented as BB6Copula, r90B6Copula, surBB6Copula and r270BB6Copula. These bivariate classes are fully compatible with the standard copula methods such as dCopula, pCopula, rCopula or fitCopula including persp and contour. A vine copula can as well be coerced into a class representation of vineCopula. However, the support of the standard methods is limited. See the corresponding help pages for details. Earlier introduced R-wrapper of C-functions have been removed, as they are no longer needed by the spcopula R-package + * added parameter "verbose" to RVineLogLik to allow to suppres some debug output - Bug fix: * RVineMLE: the optim argument "parscale" was not correctly defined for all cases. @@ -27,7 +29,7 @@ * RVinePar2Beta Blomqvist's beta values of an R-vine copula model * RVineCor2pcor correlations to partial correlations for R-vines * RVinePcor2cor partial correlations to correlations for R-vines - * New copula familes for most of the BiCop as well as for the RVine-functions: As an asymmetric extension of the Gumbel copula, the Tawn copula with three parameters is now also included in the package. + * New copula families for most of the BiCop as well as for the RVine-functions: As an asymmetric extension of the Gumbel copula, the Tawn copula with three parameters is now also included in the package. Both the Gumbel and the Tawn copula are extreme-value copulas, which can be defined in terms of their corresponding Pickands dependence functions. For simplicity, we implemented two versions of the Tawn copula with two parameters each. Each type has one of the asymmetry parameters fixed to 1, so that the corresponding Pickands dependence is either left- or right-skewed. In the manual we will call these two new copulas "Tawn type 1" and "Tawn type 2". @@ -39,7 +41,7 @@ * RVineStructureSelect: Corrected code for the igraph package * RVineTreePlot: Now a 3-dimensional R-vine can be plotted too. * Corrected upper tail dependence coefficient for the survival BB1 copula (BiCopPar2TailDep) - * Minor improvment in BiCopSelect regarding the starting values for parameter estimation + * Minor improvement in BiCopSelect regarding the starting values for parameter estimation - Documentation update @@ -48,7 +50,7 @@ - Changed dependency from "igraph0" to "igraph" since the support for "igraph0" will be quit soon. -- Additional validy check of the R-vine matrix in RVineMatrix (Code provided by Harry Joe) +- Additional validity check of the R-vine matrix in RVineMatrix (Code provided by Harry Joe) Also available as separate function "RVineMatrixCheck" - New bivariate copula: Reflection asymmetric Archimedean copula Modified: pkg/man/RVineLogLik.Rd =================================================================== --- pkg/man/RVineLogLik.Rd 2014-02-17 20:35:24 UTC (rev 59) +++ pkg/man/RVineLogLik.Rd 2014-03-04 13:25:34 UTC (rev 60) @@ -8,7 +8,8 @@ } \usage{ -RVineLogLik(data, RVM, par=RVM$par, par2=RVM$par2, separate=FALSE) +RVineLogLik(data, RVM, par=RVM$par, par2=RVM$par2, separate=FALSE, + verbose=TRUE) } \arguments{ @@ -16,7 +17,8 @@ \item{RVM}{An \code{\link{RVineMatrix}} object including the structure and the pair-copula families and parameters.} \item{par}{A d x d matrix with the pair-copula parameters (optional; default: \code{par = RVM$par}).} \item{par2}{A d x d matrix with the second parameters of pair-copula families with two parameters (optional; default: \code{par2 = RVM$par2}).} - \item{separate}{Logical; whether log-likelihoods are returned pointwisely (default: \code{separate = FALSE}).} + \item{separate}{Logical; whether log-likelihoods are returned point wisely (default: \code{separate = FALSE}).} + \item{verbose}{In case something goes wrong, additional output will be plotted.} } \value{ From noreply at r-forge.r-project.org Fri Mar 21 09:57:04 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 21 Mar 2014 09:57:04 +0100 (CET) Subject: [Vinecopula-commits] r61 - / pkg pkg/R pkg/inst pkg/man pkg/tests pkg/tests/Examples Message-ID: <20140321085704.5D104186E76@r-forge.r-project.org> Author: ben_graeler Date: 2014-03-21 09:57:02 +0100 (Fri, 21 Mar 2014) New Revision: 61 Added: pkg/tests/ pkg/tests/Examples/ pkg/tests/Examples/VineCopula-Ex.Rout.save pkg/tests/additonalExampleRuns.R pkg/tests/additonalExampleRuns.Rout.save Modified: pkg.pdf pkg/DESCRIPTION pkg/R/BiCopVuongClarke.r pkg/R/RVineTreePlot.r pkg/R/gof_ECP.r pkg/R/gof_PIT.r pkg/R/gof_White.r pkg/inst/ChangeLog pkg/man/RVineTreePlot.Rd pkg/man/vineCopula.Rd Log: - New tests based on Examples - sum fixes of minor bugs discovered by tests Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/DESCRIPTION 2014-03-21 08:57:02 UTC (rev 61) @@ -2,11 +2,11 @@ Type: Package Title: Statistical inference of vine copulas Version: 1.2-1 -Date: 2014-03-04 +Date: 2014-03-21 Author: Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler Maintainer: Ulf Schepsmeier -Depends: R (>= 2.11.0), copula -Imports: MASS, mvtnorm, igraph, methods +Depends: R (>= 2.11.0) +Imports: MASS, mvtnorm, igraph, methods, copula Suggests: CDVine, TSP, ADGofTest 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/R/BiCopVuongClarke.r =================================================================== --- pkg/R/BiCopVuongClarke.r 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/R/BiCopVuongClarke.r 2014-03-21 08:57:02 UTC (rev 61) @@ -92,7 +92,7 @@ loglik.temp=rep(0,T) for(i in 1:T) { - out <- .C("LL_mod", + out <- .C("LL_mod2", as.integer(fam), as.integer(1), as.double(data[i,1]), Modified: pkg/R/RVineTreePlot.r =================================================================== --- pkg/R/RVineTreePlot.r 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/R/RVineTreePlot.r 2014-03-21 08:57:02 UTC (rev 61) @@ -219,7 +219,7 @@ N = nrow(data) if(dim(data)[2] != dim(RVM)) stop("Dimensions of 'data' and 'RVM' do not match.") if(N < 2) stop("Number of observations has to be at least 2.") - if(is(RVM) != "RVineMatrix") stop("'RVM' has to be an RVineMatrix object.") + if(!("RVineMatrix" %in% is(RVM))) stop("'RVM' has to be an RVineMatrix object.") if(method!="mle" && method!="itau") stop("Estimation method has to be either 'mle' or 'itau'.") Modified: pkg/R/gof_ECP.r =================================================================== --- pkg/R/gof_ECP.r 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/R/gof_ECP.r 2014-03-21 08:57:02 UTC (rev 61) @@ -13,7 +13,7 @@ d=dim(data)[2] if(d != dim(RVM)) stop("Dimensions of 'data' and 'RVM' do not match.") - if(is(RVM) != "RVineMatrix") stop("'RVM' has to be an RVineMatrix object.") + if(!("RVineMatrix" %in% is(RVM))) stop("'RVM' has to be an RVineMatrix object.") if(statisticName=="Cramer-von Mises" || statisticName=="CvM") statisticName=3 else if(statisticName=="Kolmogorov-Smirnov" || statisticName=="KS") statisticName=2 Modified: pkg/R/gof_PIT.r =================================================================== --- pkg/R/gof_PIT.r 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/R/gof_PIT.r 2014-03-21 08:57:02 UTC (rev 61) @@ -13,7 +13,7 @@ d=dim(data)[2] if(d != dim(RVM)) stop("Dimensions of 'data' and 'RVM' do not match.") - if(is(RVM) != "RVineMatrix") stop("'RVM' has to be an RVineMatrix object.") + if(!("RVineMatrix" %in% is(RVM))) stop("'RVM' has to be an RVineMatrix object.") if(weight=="Breymann") method=1 else if(weight=="Berg") method=2 Modified: pkg/R/gof_White.r =================================================================== --- pkg/R/gof_White.r 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/R/gof_White.r 2014-03-21 08:57:02 UTC (rev 61) @@ -13,7 +13,7 @@ d=dim(data)[2] if(d != dim(RVM)) stop("Dimensions of 'data' and 'RVM' do not match.") - if(is(RVM) != "RVineMatrix") stop("'RVM' has to be an RVineMatrix object.") + if(!("RVineMatrix" %in% is(RVM))) stop("'RVM' has to be an RVineMatrix object.") dd=sum(RVM$family!=0) tt=sum(RVM$family==2) @@ -112,7 +112,7 @@ d=dim(data)[2] if(d != dim(RVM)) stop("Dimensions of 'data' and 'RVM' do not match.") - if(is(RVM) != "RVineMatrix") stop("'RVM' has to be an RVineMatrix object.") + if(!("RVineMatrix" %in% is(RVM))) stop("'RVM' has to be an RVineMatrix object.") dd=sum(RVM$family!=0) tt=sum(RVM$family==2) Modified: pkg/inst/ChangeLog =================================================================== --- pkg/inst/ChangeLog 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/inst/ChangeLog 2014-03-21 08:57:02 UTC (rev 61) @@ -3,6 +3,11 @@ Current authors: Ulf Schepsmeier, Tobias Erhardt and Benedikt Graeler Former authors: Eike Brechmann and Jakob Stoeber +Version 1.2-1 (March 21, 2014) + +- Moved copula from depends to the more appropriate import field +- Added tests generated from example code + Version 1.2-1 (March 4, 2014) - New functionality: Modified: pkg/man/RVineTreePlot.Rd =================================================================== --- pkg/man/RVineTreePlot.Rd 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/man/RVineTreePlot.Rd 2014-03-21 08:57:02 UTC (rev 61) @@ -54,6 +54,7 @@ \seealso{\code{\link{BiCopName}}} \examples{ +set.seed(666) # 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) @@ -74,6 +75,9 @@ RVM = RVineMatrix(Matrix=Matrix,family=family,par=par,par2=par2, names=c("V1","V2","V3","V4","V5")) +# set random seed for testing +set.seed(666) + # plot all trees with pair-copula families and # theoretical Kendall's tau values as edge labels P = RVineTreePlot(data=NULL,RVM=RVM,tree="ALL", @@ -82,6 +86,8 @@ # manipulate the first matrix of x-y-coordinates P[[1]][1,] = P[[1]][1,]*2 +# re-set random seed for testing +set.seed(666) # plot only the first tree with new coordinates RVineTreePlot(data=NULL,RVM=RVM,tree=1,edge.labels=FALSE,P=P) } Modified: pkg/man/vineCopula.Rd =================================================================== --- pkg/man/vineCopula.Rd 2014-03-04 13:25:34 UTC (rev 60) +++ pkg/man/vineCopula.Rd 2014-03-21 08:57:02 UTC (rev 61) @@ -24,7 +24,7 @@ \dontrun{ library(copula) -library(latice) +library(lattice) cloud(V1~V2+V3, as.data.frame(rCopula(500,vine)))} } Added: pkg/tests/Examples/VineCopula-Ex.Rout.save =================================================================== --- pkg/tests/Examples/VineCopula-Ex.Rout.save (rev 0) +++ pkg/tests/Examples/VineCopula-Ex.Rout.save 2014-03-21 08:57:02 UTC (rev 61) @@ -0,0 +1,3376 @@ + +R version 3.1.0 alpha (2014-03-13 r65184) -- "Unsuffered Consequences" +Copyright (C) 2014 The R Foundation for Statistical Computing +Platform: x86_64-w64-mingw32/x64 (64-bit) + +R is free software and comes with ABSOLUTELY NO WARRANTY. +You are welcome to redistribute it under certain conditions. +Type 'license()' or 'licence()' for distribution details. + + Natural language support but running in an English locale + +R is a collaborative project with many contributors. +Type 'contributors()' for more information and +'citation()' on how to cite R or R packages in publications. + +Type 'demo()' for some demos, 'help()' for on-line help, or +'help.start()' for an HTML browser interface to help. +Type 'q()' to quit R. + +> pkgname <- "VineCopula" +> source(file.path(R.home("share"), "R", "examples-header.R")) +> options(warn = 1) +> options(pager = "console") +> library('VineCopula') +> +> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') +> cleanEx() +> nameEx("BB1Copula-class") +> ### * BB1Copula-class +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB1Copula-class +> ### Title: Classes '"BB1Copula"', '"surBB1Copula"', '"r90BB1Copula"' and +> ### '"r270BB1Copula"' +> ### Aliases: BB1Copula-class dduCopula,numeric,BB1Copula-method +> ### ddvCopula,numeric,BB1Copula-method dduCopula,matrix,BB1Copula-method +> ### ddvCopula,matrix,BB1Copula-method getKendallDistr,BB1Copula-method +> ### kendallDistribution,BB1Copula-method surBB1Copula-class +> ### dduCopula,numeric,surBB1Copula-method +> ### ddvCopula,numeric,surBB1Copula-method +> ### dduCopula,matrix,surBB1Copula-method +> ### ddvCopula,matrix,surBB1Copula-method r90BB1Copula-class +> ### dduCopula,numeric,r90BB1Copula-method +> ### ddvCopula,numeric,r90BB1Copula-method +> ### dduCopula,matrix,r90BB1Copula-method +> ### ddvCopula,matrix,r90BB1Copula-method r270BB1Copula-class +> ### dduCopula,numeric,r270BB1Copula-method +> ### ddvCopula,numeric,r270BB1Copula-method +> ### dduCopula,matrix,r270BB1Copula-method +> ### ddvCopula,matrix,r270BB1Copula-method +> ### Keywords: classes +> +> ### ** Examples +> +> showClass("BB1Copula") +Class "BB1Copula" [package "VineCopula"] + +Slots: + +Name: family dimension parameters param.names param.lowbnd +Class: numeric integer numeric character numeric + +Name: param.upbnd fullname +Class: numeric character + +Extends: +Class "copula", directly +Class "twoParamBiCop", directly +Class "Copula", by class "copula", distance 2 +> +> +> +> cleanEx() +> nameEx("BB1Copula") +> ### * BB1Copula +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB1Copula +> ### Title: Constructor of the BB1 family and rotated versions thereof +> ### Aliases: BB1Copula surBB1Copula r90BB1Copula r270BB1Copula +> ### Keywords: distribution copula +> +> ### ** Examples +> +> library(copula) + +Attaching package: 'copula' + +The following object is masked from 'package:VineCopula': + + fitCopula + +> +> persp(BB1Copula(c(1,1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(surBB1Copula(c(1,1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(r90BB1Copula(c(-1,-1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(r270BB1Copula(c(-1,-1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> +> +> +> cleanEx() + +detaching 'package:copula' + +> nameEx("BB6Copula-class") +> ### * BB6Copula-class +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB6Copula-class +> ### Title: Classes '"BB6Copula"', '"surBB6Copula"', '"r90BB6Copula"' and +> ### '"r270BB6Copula"' +> ### Aliases: BB6Copula-class dduCopula,numeric,BB6Copula-method +> ### ddvCopula,numeric,BB6Copula-method dduCopula,matrix,BB6Copula-method +> ### ddvCopula,matrix,BB6Copula-method getKendallDistr,BB6Copula-method +> ### kendallDistribution,BB6Copula-method surBB6Copula-class +> ### dduCopula,numeric,surBB6Copula-method +> ### ddvCopula,numeric,surBB6Copula-method +> ### dduCopula,matrix,surBB6Copula-method +> ### ddvCopula,matrix,surBB6Copula-method r90BB6Copula-class +> ### dduCopula,numeric,r90BB6Copula-method +> ### ddvCopula,numeric,r90BB6Copula-method +> ### dduCopula,matrix,r90BB6Copula-method +> ### ddvCopula,matrix,r90BB6Copula-method r270BB6Copula-class +> ### dduCopula,numeric,r270BB6Copula-method +> ### ddvCopula,numeric,r270BB6Copula-method +> ### dduCopula,matrix,r270BB6Copula-method +> ### ddvCopula,matrix,r270BB6Copula-method +> ### Keywords: classes +> +> ### ** Examples +> +> showClass("BB6Copula") +Class "BB6Copula" [package "VineCopula"] + +Slots: + +Name: family dimension parameters param.names param.lowbnd +Class: numeric integer numeric character numeric + +Name: param.upbnd fullname +Class: numeric character + +Extends: +Class "copula", directly +Class "twoParamBiCop", directly +Class "Copula", by class "copula", distance 2 +> +> +> +> cleanEx() +> nameEx("BB6Copula") +> ### * BB6Copula +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB6Copula +> ### Title: Constructor of the BB6 family and its derivatives +> ### Aliases: BB6Copula surBB6Copula r90BB6Copula r270BB6Copula +> +> ### ** Examples +> +> library(copula) + +Attaching package: 'copula' + +The following object is masked from 'package:VineCopula': + + fitCopula + +> +> persp(BB6Copula(c(1,1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(surBB6Copula(c(1,1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(r90BB6Copula(c(-1,-1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(r270BB6Copula(c(-1,-1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> +> +> +> cleanEx() + +detaching 'package:copula' + +> nameEx("BB7Copula-class") +> ### * BB7Copula-class +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB7Copula-class +> ### Title: Classes '"BB7Copula"', '"surBB7Copula"', '"r90BB7Copula"' and +> ### '"r270BB7Copula"' +> ### Aliases: BB7Copula-class dduCopula,numeric,BB7Copula-method +> ### ddvCopula,numeric,BB7Copula-method dduCopula,matrix,BB7Copula-method +> ### ddvCopula,matrix,BB7Copula-method getKendallDistr,BB7Copula-method +> ### kendallDistribution,BB7Copula-method surBB7Copula-class +> ### dduCopula,numeric,surBB7Copula-method +> ### ddvCopula,numeric,surBB7Copula-method +> ### dduCopula,matrix,surBB7Copula-method +> ### ddvCopula,matrix,surBB7Copula-method r90BB7Copula-class +> ### dduCopula,numeric,r90BB7Copula-method +> ### ddvCopula,numeric,r90BB7Copula-method +> ### dduCopula,matrix,r90BB7Copula-method +> ### ddvCopula,matrix,r90BB7Copula-method r270BB7Copula-class +> ### dduCopula,numeric,r270BB7Copula-method +> ### ddvCopula,numeric,r270BB7Copula-method +> ### dduCopula,matrix,r270BB7Copula-method +> ### ddvCopula,matrix,r270BB7Copula-method +> ### Keywords: classes +> +> ### ** Examples +> +> showClass("BB7Copula") +Class "BB7Copula" [package "VineCopula"] + +Slots: + +Name: family dimension parameters param.names param.lowbnd +Class: numeric integer numeric character numeric + +Name: param.upbnd fullname +Class: numeric character + +Extends: +Class "copula", directly +Class "twoParamBiCop", directly +Class "Copula", by class "copula", distance 2 +> +> +> +> cleanEx() +> nameEx("BB7Copula") +> ### * BB7Copula +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB7Copula +> ### Title: Constructor of the BB7 family and its derivatives +> ### Aliases: BB7Copula surBB7Copula r90BB7Copula r270BB7Copula +> +> ### ** Examples +> +> library(copula) + +Attaching package: 'copula' + +The following object is masked from 'package:VineCopula': + + fitCopula + +> +> persp(BB7Copula(c(1,1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(surBB7Copula(c(1,1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(r90BB7Copula(c(-1,-1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> persp(r270BB7Copula(c(-1,-1.5)),dCopula, zlim=c(0,10)) +Warning in persp.default(xis, yis, zmat, theta = theta, phi = phi, expand = expand, : + surface extends beyond the box +> +> +> +> cleanEx() + +detaching 'package:copula' + +> nameEx("BB8Copula-class") +> ### * BB8Copula-class +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB8Copula-class +> ### Title: Classes '"BB8Copula"', '"surBB8Copula"', '"r90BB8Copula"' and +> ### '"r270BB8Copula"' +> ### Aliases: BB8Copula-class dduCopula,numeric,BB8Copula-method +> ### ddvCopula,numeric,BB8Copula-method dduCopula,matrix,BB8Copula-method +> ### ddvCopula,matrix,BB8Copula-method getKendallDistr,BB8Copula-method +> ### kendallDistribution,BB8Copula-method surBB8Copula-class +> ### dduCopula,numeric,surBB8Copula-method +> ### ddvCopula,numeric,surBB8Copula-method +> ### dduCopula,matrix,surBB8Copula-method +> ### ddvCopula,matrix,surBB8Copula-method r90BB8Copula-class +> ### dduCopula,numeric,r90BB8Copula-method +> ### ddvCopula,numeric,r90BB8Copula-method +> ### dduCopula,matrix,r90BB8Copula-method +> ### ddvCopula,matrix,r90BB8Copula-method r270BB8Copula-class +> ### dduCopula,numeric,r270BB8Copula-method +> ### ddvCopula,numeric,r270BB8Copula-method +> ### dduCopula,matrix,r270BB8Copula-method +> ### ddvCopula,matrix,r270BB8Copula-method fitCopula,twoParamBiCop-method +> ### Keywords: classes +> +> ### ** Examples +> +> showClass("BB8Copula") +Class "BB8Copula" [package "VineCopula"] + +Slots: + +Name: family dimension parameters param.names param.lowbnd +Class: numeric integer numeric character numeric + +Name: param.upbnd fullname +Class: numeric character + +Extends: +Class "copula", directly +Class "twoParamBiCop", directly +Class "Copula", by class "copula", distance 2 +> +> +> +> cleanEx() +> nameEx("BB8Copula") +> ### * BB8Copula +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BB8Copula +> ### Title: Constructor of the BB8 family and its derivatives +> ### Aliases: BB8Copula surBB8Copula r90BB8Copula r270BB8Copula +> +> ### ** Examples +> +> library(copula) + +Attaching package: 'copula' + +The following object is masked from 'package:VineCopula': + + fitCopula + +> +> persp(BB8Copula(c(1,0.5)),dCopula, zlim=c(0,10)) +> persp(surBB8Copula(c(1,0.5)),dCopula, zlim=c(0,10)) +> persp(r90BB8Copula(c(-1,-0.5)),dCopula, zlim=c(0,10)) +> persp(r270BB8Copula(c(-1,-0.5)),dCopula, zlim=c(0,10)) +> +> +> +> cleanEx() + +detaching 'package:copula' + +> nameEx("BetaMatrix") +> ### * BetaMatrix +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BetaMatrix +> ### Title: Matrix of empirical Blomqvist's beta values +> ### Aliases: BetaMatrix +> +> ### ** Examples +> +> data(daxreturns) +> Data = as.matrix(daxreturns) +> +> # compute the empirical Blomqvist's betas +> beta = BetaMatrix(Data) +> +> +> +> cleanEx() +> nameEx("BiCopCDF") +> ### * BiCopCDF +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BiCopCDF +> ### Title: Distribution function of a bivariate copula +> ### Aliases: BiCopCDF +> +> ### ** Examples +> +> # simulate from a bivariate Clayton +> simdata = BiCopSim(300,3,3.4) +> +> # evaluate the distribution function of the bivariate t-copula +> u1 = simdata[,1] +> u2 = simdata[,2] +> BiCopCDF(u1,u2,3,3.4) + [1] 0.212083894 0.560454175 0.196829776 0.859783373 0.334142797 0.138883599 + [7] 0.552748610 0.656946696 0.716294284 0.358902123 0.657106132 0.406649144 + [13] 0.215249319 0.010762322 0.680744432 0.429168263 0.336836485 0.754999947 + [19] 0.478876720 0.591381592 0.743614123 0.684320242 0.501994536 0.019720627 + [25] 0.673692866 0.461672664 0.318172610 0.041830170 0.272430716 0.539624409 + [31] 0.690952756 0.357404390 0.478385703 0.450454976 0.081735412 0.325850276 + [37] 0.270163818 0.464160879 0.697817469 0.770254930 0.402432651 0.309902564 + [43] 0.526755239 0.440604149 0.157859951 0.125915290 0.623294168 0.739830600 + [49] 0.371783278 0.723334913 0.516814728 0.269809505 0.445858863 0.109397786 + [55] 0.822399359 0.909295094 0.294693765 0.055312093 0.427042357 0.403252652 + [61] 0.845573559 0.325266686 0.630782109 0.357571974 0.203263111 0.321058009 + [67] 0.032144353 0.826230667 0.484706552 0.844421805 0.608301620 0.175590037 + [73] 0.609058333 0.163878464 0.101571465 0.538136460 0.274644551 0.339289595 + [79] 0.294216757 0.195381304 0.277706814 0.421733480 0.720333595 0.049782599 + [85] 0.565454106 0.606022665 0.691741950 0.371062856 0.601897391 0.591440556 + [91] 0.201688601 0.758395667 0.600742911 0.704561061 0.823026172 0.574257107 + [97] 0.099157544 0.251281107 0.106087540 0.300755602 0.189355553 0.383442247 +[103] 0.156051138 0.353445260 0.237769014 0.569868697 0.754009708 0.626534957 +[109] 0.642565610 0.746343146 0.174386590 0.276468326 0.793197597 0.128246949 +[115] 0.403133907 0.218942785 0.337329582 0.358487519 0.603040975 0.358813218 +[121] 0.270584669 0.584756888 0.291400991 0.270925282 0.453995540 0.750041775 +[127] 0.419655276 0.292947806 0.211477158 0.367187001 0.403616732 0.263279705 +[133] 0.466439291 0.060463864 0.414509798 0.037596575 0.254942295 0.205299452 +[139] 0.174436459 0.449884240 0.024025747 0.703587274 0.030608188 0.210400866 +[145] 0.093855295 0.142735752 0.761364232 0.464621321 0.061121298 0.049605515 +[151] 0.394449212 0.413216316 0.374454880 0.168265886 0.055593257 0.097151257 +[157] 0.780802798 0.227744822 0.065636001 0.870926086 0.510225526 0.405327388 +[163] 0.845888486 0.768194100 0.251842178 0.746537224 0.380903910 0.061307470 +[169] 0.290451789 0.578210814 0.667105491 0.436226140 0.501831663 0.314446545 +[175] 0.343212498 0.260100773 0.643573510 0.736279214 0.480576518 0.747377388 +[181] 0.084991510 0.625430254 0.563728676 0.065672797 0.586906305 0.383323904 +[187] 0.665138618 0.182143650 0.322690699 0.150906032 0.377309335 0.652937289 +[193] 0.167981587 0.764145834 0.112547545 0.094783549 0.792890037 0.121846529 +[199] 0.506278225 0.227685925 0.449045336 0.931289729 0.876824814 0.350126804 +[205] 0.010994635 0.786543245 0.709228011 0.596225473 0.378512582 0.664875538 +[211] 0.373815801 0.426252115 0.280636713 0.083968169 0.814257670 0.515317294 +[217] 0.328967379 0.099903254 0.377995332 0.473178827 0.031442176 0.447588371 +[223] 0.217327056 0.361663573 0.067611532 0.801212727 0.247607998 0.049270220 +[229] 0.576458572 0.324353916 0.136902467 0.001605048 0.257187329 0.474040408 +[235] 0.437713533 0.456113202 0.577646467 0.085121494 0.715134572 0.457893436 +[241] 0.498003300 0.838971972 0.503169431 0.045336633 0.555881808 0.022418980 +[247] 0.194331580 0.334462487 0.373599846 0.438035879 0.509068595 0.599445606 +[253] 0.468924572 0.387566042 0.655708457 0.735283578 0.007562104 0.489784093 +[259] 0.562107349 0.302752252 0.766853423 0.218580395 0.381560134 0.755457200 +[265] 0.955922687 0.272025101 0.251443038 0.057390884 0.289182961 0.155876041 +[271] 0.393765386 0.507388247 0.120671623 0.799010545 0.523637750 0.767031675 +[277] 0.010792082 0.619446682 0.047529687 0.786968380 0.413820169 0.318351521 +[283] 0.835610923 0.218595381 0.278001748 0.129935495 0.147382642 0.715055153 +[289] 0.544744934 0.786205589 0.344101052 0.302395620 0.488473797 0.066509090 +[295] 0.889908357 0.401278597 0.705956499 0.752430964 0.408975709 0.316904963 +> +> +> +> cleanEx() +> nameEx("BiCopChiPlot") +> ### * BiCopChiPlot +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BiCopChiPlot +> ### Title: Chi-plot for bivariate copula data +> ### Aliases: BiCopChiPlot +> +> ### ** Examples +> +> ## Not run: +> ##D # chi-plots for bivariate Gaussian copula data +> ##D n = 500 +> ##D tau = 0.5 +> ##D +> ##D # simulate copula data +> ##D fam = 1 +> ##D theta = BiCopTau2Par(fam,tau) +> ##D dat = BiCopSim(n,fam,theta) +> ##D +> ##D # create chi-plots +> ##D dev.new(width=16,height=5) +> ##D par(mfrow=c(1,3)) +> ##D BiCopChiPlot(dat[,1],dat[,2],xlim=c(-1,1),ylim=c(-1,1), +> ##D main="General chi-plot") +> ##D BiCopChiPlot(dat[,1],dat[,2],mode="lower",xlim=c(-1,1), +> ##D ylim=c(-1,1),main="Lower chi-plot") +> ##D BiCopChiPlot(dat[,1],dat[,2],mode="upper",xlim=c(-1,1), +> ##D ylim=c(-1,1),main="Upper chi-plot") +> ## End(Not run) +> +> +> +> cleanEx() +> nameEx("BiCopDeriv") +> ### * BiCopDeriv +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BiCopDeriv +> ### Title: Derivatives of a bivariate copula density +> ### Aliases: BiCopDeriv +> +> ### ** Examples +> +> # simulate from a bivariate t-copula +> simdata = BiCopSim(300,2,-0.7,par2=4) +> +> # derivative of the bivariate t-copula with respect to the first parameter +> u1 = simdata[,1] +> u2 = simdata[,2] +> BiCopDeriv(u1,u2,2,-0.7,par2=4, deriv="par") + [1] -1.118981963 1.240853696 -1.001064211 0.126342186 1.175103086 + [6] 1.125284074 -2.660900650 -2.472195467 1.023015475 -1.226835099 + [11] -10.758312703 -0.060805698 -1.275771122 -0.874257992 -5.229438212 + [16] -1.996785307 -0.024314703 -0.340297829 -1.124279340 -2.830928257 + [21] -0.644128690 -1.902583339 -0.198026426 -5.534636646 -0.399781564 + [26] 0.435400718 -0.424885018 1.472901008 -2.384264853 -2.524411180 + [31] -7.785438426 -1.363561693 -1.835639592 -0.722528253 -6.472291697 + [36] -0.716665042 -0.964105867 0.829886233 -4.540361690 1.351436336 + [41] -1.503828622 -1.074008721 -2.420782826 -0.457655215 1.239990732 + [46] 1.451559193 1.125103668 0.869236569 -1.879796413 -1.231228404 + [51] -2.424107089 1.829094173 -1.221019510 -2.559081446 -1.233727812 + [56] 1.872628051 -1.838289517 0.971594798 -0.096706898 -1.937842204 + [61] -15.237257119 0.172804942 -2.778179365 -0.368238987 -3.191034202 + [66] 1.081925107 -13.105195405 -1.253692526 -2.123195334 -8.688276102 + [71] -1.503515318 0.256531438 -2.674138975 -4.198369584 -5.259632795 + [76] -1.944954160 -1.969911957 0.006893071 1.207272916 0.571959168 + [81] -0.132434126 -0.754275953 -4.565334109 0.127084068 -2.903169549 + [86] 0.771316852 -4.357864429 0.489405734 -0.218840978 1.257765042 + [91] 0.720810321 -3.023537238 -5.465362366 0.055533560 -2.703654480 + [96] -2.809374993 -2.368171453 -2.796443300 -5.602431270 -1.693541846 +[101] 0.551536277 -1.064635971 -2.851261121 0.383686061 -2.937039105 +[106] -13.728663798 1.428865348 -4.156683579 1.475522589 -11.428897046 +[111] 1.042581628 -2.329817184 -3.371593709 1.422863380 0.041637025 +[116] 1.087794501 -2.304816570 -1.944080252 -1.899435223 -2.039960766 +[121] -2.645050409 -6.650555229 0.050104775 0.851039002 1.383789144 +[126] 1.465850488 -2.014890698 0.938868515 -2.392303876 1.122254766 +[131] -1.525108901 -2.071212850 -1.173020644 -10.741866594 -0.542828355 +[136] 1.515200988 0.630401901 0.694797858 0.931185696 -0.680191222 +[141] -7.933722404 -5.163276704 1.664827305 0.960737875 1.063045879 +[146] 1.342918851 -25.249465414 -1.393407553 1.532198588 -6.911077681 +[151] 0.376116964 -2.132593253 1.552339321 -3.505820153 -1.224401790 +[156] 1.227776973 0.353972461 -2.323316239 -0.313598837 -0.566267188 +[161] -2.330830899 1.274204534 1.293889346 0.860444774 -2.469578460 +[166] -37.208160647 -0.658022946 -0.468399340 0.542603267 1.471761927 +[171] -62.570186831 -2.007473905 -2.147550775 0.259715654 -1.822814641 +[176] 1.381625780 -3.213788742 -28.991603753 -1.229075644 -3.627148879 +[181] -0.101623278 -4.587179691 0.581309497 -9.140049046 -2.507966161 +[186] -2.212019166 -9.855455970 -1.589138378 -0.337898112 -2.553649116 +[191] -2.226506883 1.333901700 0.465082093 1.189110937 0.796068401 +[196] 1.443132908 -3.501076181 -0.501800492 -2.291129850 0.935368493 +[201] -1.064749466 1.467016724 1.082767823 -1.259347011 -35.328425259 +[206] -54.951284051 0.718174055 -2.464860924 -1.312713214 0.813159659 +[211] -2.210898561 -0.448716041 -1.620526551 -2.795506995 1.473304529 +[216] -5.057278714 -2.325488643 -6.612891371 1.047891665 1.184335554 +[221] 1.067936715 -1.893917726 -1.660850454 1.235448817 1.395848509 +[226] -8.352631627 0.661067847 -10.045949778 1.301830099 1.184362514 +[231] -2.365111887 -19.375622882 0.787353636 -1.284525224 -1.465763628 +[236] 1.487875678 -2.800629638 0.974747012 -3.893986259 -1.347791384 +[241] -1.715161311 1.344923130 -2.191660590 0.729214728 -4.251170941 +[246] -15.846996489 0.963319101 -2.045913223 -2.214253517 0.123732841 +[251] -1.130187683 -0.976720057 1.550396563 -0.114614937 -2.106725798 +[256] -3.543205014 -64.153096610 -1.674467836 -2.013424285 -2.506361843 +[261] 0.171864835 1.109748552 1.058702426 0.607026838 0.841762192 +[266] 1.600486017 -0.341279447 1.218882366 -1.075804146 -3.976274166 +[271] 1.462331510 -2.327053523 1.443964144 -70.883566817 -0.662165420 +[276] -1.690102935 -50.916636504 -3.285496238 1.214680711 1.243536650 +[281] -0.209042356 -1.987493543 0.412999360 -3.236351739 1.359980628 +[286] -1.527350949 1.444523027 -2.321816594 -2.549388281 0.552707478 +[291] 1.307238920 1.553288676 -2.277551572 -4.393119872 1.180012547 +[296] -1.006935254 -0.716277972 -0.594563456 -2.172846043 -1.984262894 +> +> +> +> cleanEx() +> nameEx("BiCopDeriv2") +> ### * BiCopDeriv2 +> +> flush(stderr()); flush(stdout()) +> +> ### Name: BiCopDeriv2 +> ### Title: Second derivatives of a bivariate copula density +> ### Aliases: BiCopDeriv2 +> +> ### ** Examples +> +> # simulate from a bivariate t-copula +> simdata = BiCopSim(300,2,-0.7,par2=4) +> +> # second derivative of the bivariate t-copula with respect to the first parameter +> u1 = simdata[,1] +> u2 = simdata[,2] +> BiCopDeriv2(u1,u2,2,-0.7,par2=4, deriv="par") + [1] 2.4126542 -6.6825108 -6.3560370 -13.7227857 -9.1816929 + [6] -7.0908205 13.7290309 10.7473379 1.2577657 2.6630769 + [11] 45.1413216 -5.6405356 3.4557714 -38.1175487 23.8842516 + [16] 10.4429381 -3.4900896 -4.0350153 -5.2822373 14.4093322 + [21] -2.3705610 6.3865847 -2.3729617 -8.3403632 -1.7953292 + [26] -5.9126744 -0.8925703 -2.7198451 12.1687196 13.2898122 + [31] 34.8767633 5.5283219 6.8140897 0.5179240 12.8722339 + [36] -1.9694262 2.3857559 -7.1967954 19.9757800 -0.8634186 + [41] 5.8194993 3.3938077 7.1423000 -5.1528390 -6.5129152 + [46] -2.6078043 -6.5350832 -6.9423348 9.5969194 1.2028442 + [51] 12.2097919 -5.3415160 2.3088684 6.2549771 -6.3055972 + [56] -20.6839367 8.6985442 1.8900924 -7.2938766 9.6259884 + [61] -15.8136161 -4.4191251 13.3567417 -1.6699869 15.6181921 + [66] -8.2228638 49.6433734 -6.8637577 11.5149595 -10.1757433 + [71] 5.7891358 -5.1789980 13.2930910 17.9367741 11.1038423 + [76] 9.7799834 9.3298570 -3.7109533 -7.6361988 -5.8621277 + [81] -7.0977482 0.3699164 18.6443999 -12.3991863 14.2560643 + [86] -6.1678671 19.3905631 -7.4826160 -2.0968065 -6.4709585 + [91] -6.1599241 7.7973748 19.3468978 -4.3365165 -3.1372378 + [96] 14.3722621 -12.2920083 14.3064742 16.3602446 4.6174577 +[101] -5.8752261 2.9774240 11.4235543 -6.1721458 13.0711948 +[106] 24.5566247 -2.0566903 19.3946357 -3.4040873 46.5514372 +[111] -6.6975421 11.8752549 4.8264870 -1.9410271 -4.8470163 +[116] -6.5319545 11.8388787 8.7842751 8.5351932 10.8108849 +[121] 13.7383533 17.5443858 -3.4835638 -6.5227577 -7.3817498 +[126] -3.1497797 10.5288361 -7.0505394 10.7116425 -9.1255948 +[131] 6.4561544 6.1147706 -0.1415321 47.2160109 -2.1404643 +[136] -3.2675803 -5.8061782 -6.0783318 -6.6882969 0.2205718 +[141] 9.2056534 22.6513172 -5.4130890 -6.4797445 -8.6119575 +[146] -6.1626208 99.0525948 5.6320135 -4.5034060 -10.8423355 +[151] -8.2161180 11.7010068 -3.1354411 10.6979666 -7.4363695 +[156] -7.9862145 -7.0399481 10.7286487 -9.0056350 -19.8533850 +[161] 10.9014112 -0.7675042 -0.2967231 -7.3862615 9.1439497 +[166] 155.9358951 -1.0080337 -9.1237377 -5.7171014 -2.9464925 +[171] 269.9285276 10.3593989 8.7543815 -4.7214883 7.2427847 +[176] -6.7186224 15.3700517 124.6436795 -9.6978141 11.7143732 +[181] -7.6979536 20.5984504 -5.7257439 40.5312907 12.7734411 +[186] 12.0655708 42.4723521 4.4524000 -4.4733160 9.1906767 +[191] 12.1270553 -0.8568985 -5.9649734 -7.0021920 -23.9452815 +[196] -6.2800218 5.3513165 -3.9053336 10.6781184 -6.4459971 +[201] 0.4934674 -2.4424125 -13.7947217 2.6918629 -15.0437654 +[206] 179.5492436 -6.4095059 12.3367635 5.0010992 -6.3084576 +[211] 12.1575256 -3.7222823 6.9552673 -14.7678286 -5.2660209 +[216] -11.0043502 12.5483203 25.2705550 -12.1320323 -7.5170928 +[221] -16.7607915 9.6529562 5.9831467 -9.2588542 -1.5943981 +[226] 19.2252029 -5.8827620 41.3950758 -0.7504865 -8.7125535 +[231] 7.1471377 -182.3423219 -11.5964015 0.1386318 5.9833540 +[236] -6.7067508 14.3516973 -9.2066813 15.6816459 5.2243435 +[241] 1.1197675 -0.8486390 11.8796392 2.1755199 7.3798075 [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/vinecopula -r 61 From noreply at r-forge.r-project.org Fri Mar 21 11:32:19 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 21 Mar 2014 11:32:19 +0100 (CET) Subject: [Vinecopula-commits] r62 - in pkg/src: . include Message-ID: <20140321103219.1708118670A@r-forge.r-project.org> Author: ulf Date: 2014-03-21 11:32:18 +0100 (Fri, 21 Mar 2014) New Revision: 62 Modified: pkg/src/gof.c pkg/src/hfunc.c pkg/src/include/gof.h pkg/src/likelihood.c pkg/src/rvine.c pkg/src/rvinederiv2.c Log: Line ending hat bei ein paar Dateien nicht gepasst. Modified: pkg/src/gof.c =================================================================== --- pkg/src/gof.c 2014-03-21 08:57:02 UTC (rev 61) +++ pkg/src/gof.c 2014-03-21 10:32:18 UTC (rev 62) @@ -1,667 +1,667 @@ -#include "include/vine.h" -#include "include/memoryhandling.h" -#include "include/gof.h" -#include "include/rvinederiv2.h" -#include "include/pit.h" -#include "include/rvine.h" - -///////////////////////////////////////////////////////////////////// -// Code form Daniel Berg, R-package copulaGOF -// AD: Anderson-Darling GOF test -// (Cumulative distribution function test) -// INPUT: -// cdf CDF for which to compute the test -// n Length of cdf -///////////////////////////////////////////////////////////////////// -void ADtest(double* cdf, int* n, double* out) -{ - int j; - double sum=0.0; - for(j=0;j<*n;j++) sum += (2.0*((double)j+1.0)-1.0)*(log(cdf[j])+log(1.0-cdf[*n-1-j])); - *out = -(double)*n-(1.0/(double)*n)*sum; -} - - -/////////////////////////////////////////////////////////////////////////////// -// Code form Daniel Berg, R-package copulaGOF -// Function to compute cumulative distribution function of a uniform vector x ($\hat F(x)$) -/////////////////////////////////////////////////////////////////////////////// -void CumDist(double* x, int* i_n, int* i_m, double* out) -{ - int i,j,n,m; - double *y; - n=*i_n; m=*i_m; - y = malloc(m*sizeof(double)); - for(i=0;imaxdist) maxdist = tmp; - } - *out = sqrt((double)*n)*maxdist; -} - - - -//////////////////////////////////////////////////////// -// Goodness-of-fit test based on White's information equality -// by U. Schepsmeier -/////////////////////////////////////////////////////////// - -void White(int* T, int* d, int* family, int* maxmat, int* matrix, int* condirect, int* conindirect, double* par, double* par2, double* data, double* D, double* V) -{ - int i=0, dd=0, tt=0, k=1, j=0, kk=0, t=0, mm=0, dd2=0; - double *Dprime, *hess, *subhess, *der, *subder, *dat, *hess_red, *der_red; - - for(i=0; i<(*d*(*d));i++) - { - if(family[i]!=0) dd++; - if(family[i]==2) tt++; - } - mm=(dd+tt)*(dd+tt+1)/2; - dd2=*d*(*d-1)/2; - - //Allocate memory - //V = create_matrix((dd+tt)*(dd+tt+1)/2,(dd+tt)*(dd+tt+1)/2); - //D = malloc((dd+tt)*(dd+tt+1)/2*sizeof(double)); - Dprime = malloc((dd+tt)*(dd+tt+1)/2*sizeof(double)); - hess = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); - subhess = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); - der = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); - subder = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); - hess_red = malloc((dd+tt)*(dd+tt)*sizeof(double)); - der_red = malloc((dd+tt)*(dd+tt)*sizeof(double)); - dat = malloc(*d*sizeof(double)); - - // initialisieren - for(i=0;i=*statistic) - *pvalue+=1.0/(*B); - } - - free(f); - free(bdata); -} - - - -/* Equal probability sampling; with-replacement case */ - -void MySample(int *k, int *n, int *y) -{ - int i; - - GetRNGstate(); - for (i = 0; i < *k; i++) - { - y[i] = (int) *n * unif_rand() + 1; - } - PutRNGstate(); -} - - -//////////////////////////////////////////////////////////////// - -// gof-test based on empirical copula process - -void gofECP(int* T, int* d, int* family, int* maxmat, int* matrix, int* conindirect, double* par, double* par2, double* data, double* statistic, int* statisticName) -{ - double *znull, *Chat1, *Chat2, U=0; - int T2=1000, i=0, t=0, takeU=0; - znull = malloc(*d*1000*sizeof(double)); - Chat1 = malloc(*T*sizeof(double)); - Chat2 = malloc(*T*sizeof(double)); - - for(t=0;t=*statistic) - *pvalue+=1.0/(*B); - } - - free(f); - free(bdata); -} - - -// n = dim(u)[1] -// m = dim(data)[1] -// Chat vector of length n - -void ChatZj(double* data, double* u, int* n, int* d, int* m, double* Chat) -{ - int i,j,k; - double *helpvar; - helpvar=malloc(*m*sizeof(double)); - - for(j=0;j<*n;j++) - { - Chat[j]=0; - for(k=0;k<*m;k++) - { - helpvar[k]=0; - for(i=0;i<*d;i++) - { - if(data[k+1+(*m*i)-1]<=u[j+1+(*n*i)-1]) - helpvar[k]++; - } - if(helpvar[k]==*d) - Chat[j]++; - } - Chat[j]/=(*m+1); - } - - free(helpvar); -} - -void C_ind(double* data, int* n, int* d, double* C) -{ - int t=0, i=0; - - for(t=0;t<*n;t++) - { - for(i=0;i<*d;i++) - { - if(i==0) - C[t]=data[t+1+(*n*i)-1]; - else - C[t]=C[t] * data[t+1+(*n*i)-1]; - } - - } -} - - - -void gofECP2(int* T, int* d, int* family, int* maxmat, int* matrix, int* condirect, int* conindirect, double* par, double* par2, double* data, - double* vv, double* vv2, int* calcupdate, double* statistic, int* statisticName) -{ - double *udata, *Chat1, *Chat2; - int i=0, t=0; - udata = malloc(*d*(*T)*sizeof(double)); - Chat1 = malloc(*T*sizeof(double)); - Chat2 = malloc(*T*sizeof(double)); - - for(t=0;t<*T;t++) - { - for(i=0;i<*d;i++) - { - udata[t+1+(*T*i)-1]=0; - } - } - for(t=0;t<*T;t++) - { - Chat1[t]=0; - Chat2[t]=1; - } - - RvinePIT(T, d, family, maxmat, matrix, condirect, conindirect, par, par2, data, udata, vv, vv2, calcupdate); - ChatZj(udata, udata, T, d, T, Chat1); - - C_ind(udata,T,d,Chat2); - - *statistic=0; - if(*statisticName==3) //Cramer-von Mises test statistic - { - for(i=0;i<*T;i++) - { - *statistic+=pow(Chat1[i]-Chat2[i],2); - } - } - else if(*statisticName==2) // KS - { - for(i=0;i<*T;i++) - { - *statistic=MAX(fabs(Chat1[i]-Chat2[i]),*statistic); - } - *statistic=*statistic*sqrt(*T); - } - - free(udata); - free(Chat1); - free(Chat2); -} - -void gofECP2_pvalue(int* T, int* d, int* family, int* maxmat, int* matrix, int* condirect, int* conindirect, double* par, double* par2, double* data, - double* vv, double* vv2, int* calcupdate, double* statistic, double* pvalue, int* statisticName, int* B) -{ - int i=0, m=0, t=0, *f; - double *bdata, bstat=0; - - f = malloc(*T*sizeof(int)); - bdata = malloc(*d*(*T)*sizeof(double)); - //Rprintf("%f\n",*statistic); - for(m=0;m<*B;m++) - { - MySample(T, T, f); - for(t=0;t<*T;t++) - { - for(i=0;i<*d;i++) - { - bdata[(t+1)+(*T*i)-1]=data[(f[t]+1)+(*T*i)-1]; - } - } - bstat=0; - gofECP2(T, d, family, maxmat, matrix, condirect, conindirect, par, par2, bdata, vv, vv2, calcupdate, &bstat, statisticName); - //Rprintf("%f ",bstat); - if(bstat>=*statistic) - *pvalue+=1.0/(*B); - } - - free(f); - free(bdata); -} +#include "include/vine.h" +#include "include/memoryhandling.h" +#include "include/gof.h" +#include "include/rvinederiv2.h" +#include "include/pit.h" +#include "include/rvine.h" + +///////////////////////////////////////////////////////////////////// +// Code form Daniel Berg, R-package copulaGOF +// AD: Anderson-Darling GOF test +// (Cumulative distribution function test) +// INPUT: +// cdf CDF for which to compute the test +// n Length of cdf +///////////////////////////////////////////////////////////////////// +void ADtest(double* cdf, int* n, double* out) +{ + int j; + double sum=0.0; + for(j=0;j<*n;j++) sum += (2.0*((double)j+1.0)-1.0)*(log(cdf[j])+log(1.0-cdf[*n-1-j])); + *out = -(double)*n-(1.0/(double)*n)*sum; +} + + +/////////////////////////////////////////////////////////////////////////////// +// Code form Daniel Berg, R-package copulaGOF +// Function to compute cumulative distribution function of a uniform vector x ($\hat F(x)$) +/////////////////////////////////////////////////////////////////////////////// +void CumDist(double* x, int* i_n, int* i_m, double* out) +{ + int i,j,n,m; + double *y; + n=*i_n; m=*i_m; + y = malloc(m*sizeof(double)); + for(i=0;imaxdist) maxdist = tmp; + } + *out = sqrt((double)*n)*maxdist; +} + + + +//////////////////////////////////////////////////////// +// Goodness-of-fit test based on White's information equality +// by U. Schepsmeier +/////////////////////////////////////////////////////////// + +void White(int* T, int* d, int* family, int* maxmat, int* matrix, int* condirect, int* conindirect, double* par, double* par2, double* data, double* D, double* V) +{ + int i=0, dd=0, tt=0, k=1, j=0, kk=0, t=0, mm=0, dd2=0; + double *Dprime, *hess, *subhess, *der, *subder, *dat, *hess_red, *der_red; + + for(i=0; i<(*d*(*d));i++) + { + if(family[i]!=0) dd++; + if(family[i]==2) tt++; + } + mm=(dd+tt)*(dd+tt+1)/2; + dd2=*d*(*d-1)/2; + + //Allocate memory + //V = create_matrix((dd+tt)*(dd+tt+1)/2,(dd+tt)*(dd+tt+1)/2); + //D = malloc((dd+tt)*(dd+tt+1)/2*sizeof(double)); + Dprime = malloc((dd+tt)*(dd+tt+1)/2*sizeof(double)); + hess = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); + subhess = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); + der = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); + subder = malloc((dd2+tt)*(dd2+tt)*sizeof(double)); + hess_red = malloc((dd+tt)*(dd+tt)*sizeof(double)); + der_red = malloc((dd+tt)*(dd+tt)*sizeof(double)); + dat = malloc(*d*sizeof(double)); + + // initialisieren + for(i=0;i=*statistic) + *pvalue+=1.0/(*B); + } + + free(f); + free(bdata); +} + + + +/* Equal probability sampling; with-replacement case */ + +void MySample(int *k, int *n, int *y) +{ + int i; + + GetRNGstate(); + for (i = 0; i < *k; i++) + { + y[i] = (int) *n * unif_rand() + 1; + } + PutRNGstate(); +} + + +//////////////////////////////////////////////////////////////// + +// gof-test based on empirical copula process + +void gofECP(int* T, int* d, int* family, int* maxmat, int* matrix, int* conindirect, double* par, double* par2, double* data, double* statistic, int* statisticName) +{ + double *znull, *Chat1, *Chat2, U=0; + int T2=1000, i=0, t=0, takeU=0; + znull = malloc(*d*1000*sizeof(double)); + Chat1 = malloc(*T*sizeof(double)); + Chat2 = malloc(*T*sizeof(double)); + + for(t=0;t=*statistic) + *pvalue+=1.0/(*B); + } + + free(f); + free(bdata); +} + + +// n = dim(u)[1] +// m = dim(data)[1] +// Chat vector of length n + +void ChatZj(double* data, double* u, int* n, int* d, int* m, double* Chat) +{ + int i,j,k; + double *helpvar; + helpvar=malloc(*m*sizeof(double)); + + for(j=0;j<*n;j++) + { + Chat[j]=0; + for(k=0;k<*m;k++) + { + helpvar[k]=0; + for(i=0;i<*d;i++) + { + if(data[k+1+(*m*i)-1]<=u[j+1+(*n*i)-1]) + helpvar[k]++; + } + if(helpvar[k]==*d) + Chat[j]++; + } + Chat[j]/=(*m+1); + } + + free(helpvar); +} + +void C_ind(double* data, int* n, int* d, double* C) +{ + int t=0, i=0; + + for(t=0;t<*n;t++) + { + for(i=0;i<*d;i++) + { + if(i==0) + C[t]=data[t+1+(*n*i)-1]; + else + C[t]=C[t] * data[t+1+(*n*i)-1]; + } + + } +} + + + +void gofECP2(int* T, int* d, int* family, int* maxmat, int* matrix, int* condirect, int* conindirect, double* par, double* par2, double* data, + double* vv, double* vv2, int* calcupdate, double* statistic, int* statisticName) +{ + double *udata, *Chat1, *Chat2; + int i=0, t=0; + udata = malloc(*d*(*T)*sizeof(double)); + Chat1 = malloc(*T*sizeof(double)); + Chat2 = malloc(*T*sizeof(double)); + + for(t=0;t<*T;t++) + { + for(i=0;i<*d;i++) + { + udata[t+1+(*T*i)-1]=0; + } + } + for(t=0;t<*T;t++) + { + Chat1[t]=0; + Chat2[t]=1; + } + + RvinePIT(T, d, family, maxmat, matrix, condirect, conindirect, par, par2, data, udata, vv, vv2, calcupdate); + ChatZj(udata, udata, T, d, T, Chat1); + + C_ind(udata,T,d,Chat2); + + *statistic=0; + if(*statisticName==3) //Cramer-von Mises test statistic + { + for(i=0;i<*T;i++) + { + *statistic+=pow(Chat1[i]-Chat2[i],2); + } + } + else if(*statisticName==2) // KS + { + for(i=0;i<*T;i++) + { + *statistic=MAX(fabs(Chat1[i]-Chat2[i]),*statistic); + } + *statistic=*statistic*sqrt(*T); + } + + free(udata); + free(Chat1); + free(Chat2); +} + +void gofECP2_pvalue(int* T, int* d, int* family, int* maxmat, int* matrix, int* condirect, int* conindirect, double* par, double* par2, double* data, + double* vv, double* vv2, int* calcupdate, double* statistic, double* pvalue, int* statisticName, int* B) +{ + int i=0, m=0, t=0, *f; + double *bdata, bstat=0; + + f = malloc(*T*sizeof(int)); + bdata = malloc(*d*(*T)*sizeof(double)); + //Rprintf("%f\n",*statistic); + for(m=0;m<*B;m++) + { + MySample(T, T, f); + for(t=0;t<*T;t++) + { + for(i=0;i<*d;i++) + { + bdata[(t+1)+(*T*i)-1]=data[(f[t]+1)+(*T*i)-1]; + } + } + bstat=0; + gofECP2(T, d, family, maxmat, matrix, condirect, conindirect, par, par2, bdata, vv, vv2, calcupdate, &bstat, statisticName); + //Rprintf("%f ",bstat); + if(bstat>=*statistic) + *pvalue+=1.0/(*B); + } + + free(f); + free(bdata); +} Modified: pkg/src/hfunc.c =================================================================== --- pkg/src/hfunc.c 2014-03-21 08:57:02 UTC (rev 61) +++ pkg/src/hfunc.c 2014-03-21 10:32:18 UTC (rev 62) @@ -1,1273 +1,1273 @@ -/* -** hfunc.c - C code of the package CDRVine -** -** with contributions from Carlos Almeida, Aleksey Min, -** Ulf Schepsmeier, Jakob Stoeber and Eike Brechmann -** -** A first version was based on code -** from Daniel Berg -** provided by personal communication. -** -*/ - -#include "include/vine.h" -#include "include/hfunc.h" -#include "include/evCopula.h" - -#define UMAX 1-1e-10 - -#define UMIN 1e-10 - -#define XEPS 1e-4 - - -// h-func for BB1 - -void pcondbb1(double* u, double* v, int* n, double* param, double* out) -{ - int i; - double th, de; - double t1, t2, t3, t16, t17, t4, t5, t6, t7, t9, t10, t12, t13, t20; - - th = param[0]; - de = param[1]; - for(i=0;i<*n;i++) - { - t1 = pow(u[i],-th); - t2 = t1-1.; - t3 = pow(t2,de); - t16 = 1./u[i]; - t17 = 1./t2; - t4 = pow(v[i],-th); - t5 = t4-1.; - t6 = pow(t5,de); - t7 = t3+t6; - t9 = pow(t7,1/de); - t10 = 1.0+t9; - t12 = pow(t10,-1/th); - t13 = t12*t9; - t20 = 1./t10; - out[i] = t13*t3*t1*t16*t17/t7*t20; - } - -} - - - -void pcondbb6(double* u, double* v, int* n, double* param, double* out) -{ - int i; - double th, de; - double t1, t2, t3, t4, t5, t12, t16, t6, t7, t8, t9, t10, t11, t13, t14, t15, t17; - - th = param[0]; - de = param[1]; - - for(i=0;i<*n;i++) - { - t1 = 1.0-u[i]; [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/vinecopula -r 62 From noreply at r-forge.r-project.org Wed Mar 26 16:18:54 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 26 Mar 2014 16:18:54 +0100 (CET) Subject: [Vinecopula-commits] r63 - in pkg: . inst tests Message-ID: <20140326151854.60238186256@r-forge.r-project.org> Author: etobi Date: 2014-03-26 16:18:51 +0100 (Wed, 26 Mar 2014) New Revision: 63 Modified: pkg/DESCRIPTION pkg/inst/ChangeLog pkg/tests/additonalExampleRuns.R pkg/tests/additonalExampleRuns.Rout.save Log: maintainer changed Modified: pkg/DESCRIPTION =================================================================== --- pkg/DESCRIPTION 2014-03-21 10:32:18 UTC (rev 62) +++ pkg/DESCRIPTION 2014-03-26 15:18:51 UTC (rev 63) @@ -1,10 +1,10 @@ Package: VineCopula Type: Package Title: Statistical inference of vine copulas -Version: 1.2-1 -Date: 2014-03-21 +Version: 1.3 +Date: 2014-03-26 Author: Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler -Maintainer: Ulf Schepsmeier +Maintainer: Tobias Erhardt Depends: R (>= 2.11.0) Imports: MASS, mvtnorm, igraph, methods, copula Suggests: CDVine, TSP, ADGofTest Modified: pkg/inst/ChangeLog =================================================================== --- pkg/inst/ChangeLog 2014-03-21 10:32:18 UTC (rev 62) +++ pkg/inst/ChangeLog 2014-03-26 15:18:51 UTC (rev 63) @@ -2,7 +2,12 @@ Current authors: Ulf Schepsmeier, Tobias Erhardt and Benedikt Graeler Former authors: Eike Brechmann and Jakob Stoeber +Maintainer: Tobias Erhardt +Version 1.3 (March 26, 2014) + +- Maintainer changed from Ulf Schepsmeier to Tobias Erhardt (tobias.erhardt at tum.de) + Version 1.2-1 (March 21, 2014) - Moved copula from depends to the more appropriate import field Modified: pkg/tests/additonalExampleRuns.R =================================================================== --- pkg/tests/additonalExampleRuns.R 2014-03-21 10:32:18 UTC (rev 62) +++ pkg/tests/additonalExampleRuns.R 2014-03-26 15:18:51 UTC (rev 63) @@ -1,3 +1,8 @@ +## switch for testing the following time consuming examples +docheck <- FALSE + +if(docheck){ + ## tests from excluded examples library(VineCopula) @@ -220,4 +225,6 @@ set.seed(666) rCopula(500,vine) -# End(Not run) \ No newline at end of file +# End(Not run) + +} \ No newline at end of file Modified: pkg/tests/additonalExampleRuns.Rout.save =================================================================== --- pkg/tests/additonalExampleRuns.Rout.save 2014-03-21 10:32:18 UTC (rev 62) +++ pkg/tests/additonalExampleRuns.Rout.save 2014-03-26 15:18:51 UTC (rev 63) @@ -1,5 +1,5 @@ -R version 3.1.0 alpha (2014-03-13 r65184) -- "Unsuffered Consequences" +R version 3.0.3 (2014-03-06) -- "Warm Puppy" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) @@ -15,842 +15,754 @@ 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. -> ## tests from excluded examples -> library(VineCopula) -> -> ## Not run: -> # chi-plots for bivariate Gaussian copula data -> n = 500 -> tau = 0.5 -> -> # simulate copula data -> fam = 1 -> theta = BiCopTau2Par(fam,tau) -> set.seed(666) -> dat = BiCopSim(n,fam,theta) -> -> # create chi-plots -> par(mfrow=c(1,3)) -> BiCopChiPlot(dat[,1],dat[,2],xlim=c(-1,1),ylim=c(-1,1), -+ main="General chi-plot") -> BiCopChiPlot(dat[,1],dat[,2],mode="lower",xlim=c(-1,1), -+ ylim=c(-1,1),main="Lower chi-plot") -> BiCopChiPlot(dat[,1],dat[,2],mode="upper",xlim=c(-1,1), -+ ylim=c(-1,1),main="Upper chi-plot") -> -> # simulate from a bivariate Clayton copula -> set.seed(666) -> simdata = BiCopSim(300,3,2) -> u1 = simdata[,1] -> u2 = simdata[,2] -> -> # perform White's goodness-of-fit test for the true copula -> BiCopGofTest(u1,u2,family=3) -$p.value - [,1] -[1,] 0.4394173 - -$statistic - [,1] -[1,] 0.5978035 - -> -> # perform Kendall's goodness-of-fit test for the Frank copula -> BiCopGofTest(u1,u2,family=5) -$p.value - [,1] -[1,] 0.2979448 - -$statistic - [,1] -[1,] 1.08337 - -> -> # perform Kendall's goodness-of-fit test for the true copula -> gof = BiCopGofTest(u1,u2,family=3,method="kendall") -> gof$p.value.CvM -[1] 0.46 -> gof$p.value.KS -[1] 0.39 -> -> # perform Kendall's goodness-of-fit test for the Frank copula -> gof = BiCopGofTest(u1,u2,family=5,method="kendall") -> gof$p.value.CvM -[1] 0 -> gof$p.value.KS -[1] 0 -> -> # Not run: -> # Gaussian and Clayton copulas -> n = 500 -> tau = 0.5 -> -> # simulate from Gaussian copula -> fam1 = 1 -> theta1 = BiCopTau2Par(fam1,tau) -> set.seed(666) -> dat1 = BiCopSim(n,fam1,theta1) -> -> # simulate from Clayton copula -> fam2 = 3 -> theta2 = BiCopTau2Par(fam2,tau) -> set.seed(666) -> dat2 = BiCopSim(n,fam2,theta2) -> -> # create K-plots -> par(mfrow=c(1,2)) -> BiCopKPlot(dat1[,1],dat1[,2],main="Gaussian copula") -> BiCopKPlot(dat2[,1],dat2[,2],main="Clayton copula") -> # End(Not run) -> -> # Not run: -> # Clayton and rotated Clayton copulas -> n = 1000 -> tau = 0.5 -> -> # simulate from Clayton copula -> fam = 3 -> theta = BiCopTau2Par(fam,tau) -> set.seed(666) -> dat = BiCopSim(n,fam,theta) -> -> # create lambda-function plots -> par(mfrow=c(1,3)) -> BiCopLambda(dat[,1],dat[,2]) # empirical lambda-function -> BiCopLambda(family=fam,par=theta) # theoretical lambda-function -> BiCopLambda(dat[,1],dat[,2],family=fam,par=theta) # both -> -> # simulate from rotated Clayton copula (90 degrees) -> fam = 23 -> theta = BiCopTau2Par(fam,-tau) -> set.seed(666) -> dat = BiCopSim(n,fam,theta) -> -> # rotate the data to standard Clayton copula data -> rot_dat = 1-dat[,1] -> -> par(mfrow=c(1,3)) -> BiCopLambda(rot_dat,dat[,2]) # empirical lambda-function -> BiCopLambda(family=3,par=-theta) # theoretical lambda-function -> BiCopLambda(rot_dat,dat[,2],family=3,par=-theta) # both -> # End(Not run) -> -> # Not run: -> ## Example 3: empirical data -> data(daxreturns) -> cop3 = BiCopSelect(daxreturns[,1],daxreturns[,4], -+ familyset=c(1:10,13,14,16,23,24,26)) -> cop3$family -[1] 14 -> cop3$par -[1] 1.614805 -> cop3$par2 -[1] 0 -> # End(Not run) -> -> # Not run: -> # simulate from a t-copula -> set.seed(666) -> dat = BiCopSim(500,2,0.7,5) -> -> # apply the test for families 1-10 -> vcgof = BiCopVuongClarke(dat[,1],dat[,2],familyset=c(1:10)) -> -> # display the Vuong test scores -> vcgof[1,] - 1 2 3 4 5 6 7 8 9 10 - 0 7 -3 0 -2 -8 7 -2 7 -6 -> # End(Not run) -> -> # Not run: -> # select the R-vine structure, families and parameters -> RVM = RVineStructureSelect(daxreturns[,1:5],c(1:6)) -> RVM$Matrix - [,1] [,2] [,3] [,4] [,5] -[1,] 3 0 0 0 0 -[2,] 4 2 0 0 0 -[3,] 5 4 1 0 0 -[4,] 1 5 4 5 0 -[5,] 2 1 5 4 4 -> RVM$par - [,1] [,2] [,3] [,4] [,5] -[1,] 0.0000000 0.0000000 0.0000000 0.000000 0 -[2,] 0.4144800 0.0000000 0.0000000 0.000000 0 -[3,] 0.6292681 0.8673638 0.0000000 0.000000 0 -[4,] 0.1837189 2.0586327 0.3912384 0.000000 0 -[5,] 0.6149777 0.5934291 0.6183352 0.684548 0 -> RVM$par2 - [,1] [,2] [,3] [,4] [,5] -[1,] 0.000000 0.000000 0.000000 0.000000 0 -[2,] 0.000000 0.000000 0.000000 0.000000 0 -[3,] 0.000000 0.000000 0.000000 0.000000 0 -[4,] 10.184146 0.000000 0.000000 0.000000 0 -[5,] 4.634146 4.601458 6.502828 8.766498 0 -> -> # select the C-vine structure, families and parameters -> CVM = RVineStructureSelect(daxreturns[,1:5],c(1:6),type="CVine") -> CVM$Matrix - [,1] [,2] [,3] [,4] [,5] -[1,] 3 0 0 0 0 -[2,] 4 1 0 0 0 -[3,] 1 4 2 0 0 -[4,] 2 2 4 5 0 -[5,] 5 5 5 4 4 -> CVM$par - [,1] [,2] [,3] [,4] [,5] -[1,] 0.0000000 0.0000000 0.000000 0.000000 0 -[2,] 0.4551787 0.0000000 0.000000 0.000000 0 -[3,] 0.8908653 1.3220209 0.000000 0.000000 0 -[4,] 0.4917446 0.3834983 1.522463 0.000000 0 -[5,] 0.4521326 0.6183352 0.564711 0.684548 0 -> CVM$par2 - [,1] [,2] [,3] [,4] [,5] -[1,] 0.000000 0.000000 0.000000 0.000000 0 -[2,] 0.000000 0.000000 0.000000 0.000000 0 -[3,] 0.000000 0.000000 0.000000 0.000000 0 -[4,] 8.054474 6.557946 0.000000 0.000000 0 -[5,] 5.707574 6.502828 5.539292 8.766498 0 -> -> # compare the two models based on the data -> clarke = RVineClarkeTest(daxreturns[,1:5],RVM,CVM) -> clarke$statistic -[1] 539 -> clarke$statistic.Schwarz -[1] 548 -> clarke$p.value -[1] 0.02021913 -> clarke$p.value.Schwarz -[1] 0.07299638 -> # End(Not run) -> -> # Not run: -> # White test with asymptotic p-value -> RVineGofTest(daxreturns[,1:5], RVM, B=0) -$White -[1] 150.4045 - -$p.value -[1] 0.03144801 - -> -> # ECP2 test with Cramer-von-Mises test statistic and a bootstrap with 200 replications -> # for the calculation of the p-value -> RVineGofTest(daxreturns[,1:5], RVM, method="ECP2", statistic="CvM", B=200) -$CvM -[1] 0.09003453 - -$p.value -[1] 0.775 - -> # End(Not run) -> -> ## Not run: -> # 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) -> -> # define R-vine pair-copula family matrix -> family = c(0,1,3,4,4,0,0,3,4,1,0,0,0,4,1,0,0,0,0,3,0,0,0,0,0) -> family = matrix(family,5,5) -> -> # define R-vine pair-copula parameter matrix -> par = c(0,0.2,0.9,1.5,3.9,0,0,1.1,1.6,0.9,0,0,0,1.9,0.5, -+ 0,0,0,0,4.8,0,0,0,0,0) -> par = matrix(par,5,5) -> -> # define second R-vine pair-copula parameter matrix -> par2 = matrix(0,5,5) -> -> # define RVineMatrix object -> RVM = RVineMatrix(Matrix=Matrix,family=family,par=par,par2=par2, -+ names=c("V1","V2","V3","V4","V5")) -> -> # simulate a sample of size 300 from the R-vine copula model -> set.seed(666) -> simdata = RVineSim(300,RVM) -> -> # compute the MLE -> mle = RVineMLE(simdata,RVM,grad=TRUE) -iter 10 value -1111.253373 -iter 20 value -1111.562935 -iter 30 value -1111.991155 -iter 40 value -1112.008869 -iter 50 value -1112.062737 -iter 60 value -1112.114981 -iter 70 value -1112.168354 -final value -1112.174829 -converged -> mle$RVM -R-vine matrix: - [,1] [,2] [,3] [,4] [,5] -[1,] 5 0 0 0 0 -[2,] 2 2 0 0 0 -[3,] 3 3 3 0 0 -[4,] 1 4 4 4 0 -[5,] 4 1 1 1 1 - -Where -1 <-> V1 -2 <-> V2 -3 <-> V3 -4 <-> V4 -5 <-> V5 -> # End(Not run) -> -> ##TODO shorten this test, takes too long -> # # Not run: -> # RVM = RVineStructureSelect(daxreturns,c(1:6),progress=TRUE) -> # # End(Not run) -> # -> # # specify a C-vine copula model with only Clayton, Gumbel and Frank copulas -> # # Not run: -> # CVM = RVineStructureSelect(daxreturns,c(3,4,5),"CVine") -> # # End(Not run) -> # # determine the order of the nodes in a D-vine using the package TSP -> # # Not run: -> # library(TSP) -> # d = dim(daxreturns)[2] -> # M = 1 - abs(TauMatrix(daxreturns)) -> # hamilton = insert_dummy(TSP(M),label="cut") -> # sol = solve_TSP(hamilton,method="repetitive_nn") -> # order = cut_tour(sol,"cut") -> # DVM = D2RVine(order,family=rep(0,d*(d-1)/2),par=rep(0,d*(d-1)/2)) -> # RVineCopSelect(daxreturns,c(1:6),DVM$Matrix) -> # End(Not run) -> -> # Not run: -> RVM = RVineStructureSelect(daxreturns[,1:5],c(1:6)) -> CVM = RVineStructureSelect(daxreturns[,1:5],c(1:6),type="CVine") -> -> # compare the two models based on the data -> vuong = RVineVuongTest(daxreturns[,1:5],RVM,CVM) -> vuong$statistic -[1] 0.6982158 -> vuong$statistic.Schwarz -[1] 1.027616 -> vuong$p.value -[1] 0.4850423 -> vuong$p.value.Schwarz -[1] 0.3041306 -> # End(Not run) -> -> # Not run: -> library(copula) - -Attaching package: 'copula' - -The following object is masked from 'package:VineCopula': - - fitCopula - -> vine <- vineCopula(4L,"CVine") -> -> set.seed(666) -> rCopula(500,vine) - [,1] [,2] [,3] [,4] - [1,] 0.7743684903 0.197224191 0.9780138442 0.201327350 - [2,] 0.3612444273 0.742611942 0.9787284394 0.498113709 - [3,] 0.0133158357 0.259946129 0.7758930807 0.016379053 - [4,] 0.0957447842 0.142163540 0.2111262376 0.811256444 - [5,] 0.0365471959 0.891637413 0.4832364111 0.466664528 - [6,] 0.9842240803 0.601345547 0.0383443474 0.141495691 - [7,] 0.8063855253 0.266685676 0.0427020509 0.612174522 - [8,] 0.5533483981 0.853500765 0.4697785398 0.397616561 - [9,] 0.8046367336 0.508897385 0.6349153537 0.494251721 - [10,] 0.2801308988 0.908710354 0.7841161578 0.558997022 - [11,] 0.2444374892 0.530970655 0.1183959420 0.983383433 - [12,] 0.8977528436 0.738573763 0.3773106968 0.606168831 - [13,] 0.5121942617 0.989246660 0.0691335856 0.084620626 - [14,] 0.1299455715 0.746132021 0.0388791817 0.685635417 - [15,] 0.1439773615 0.891079958 0.0896361163 0.037732719 - [16,] 0.7748743587 0.812063878 0.2606025457 0.651594998 - [17,] 0.9238038510 0.266106121 0.2661329871 0.910917896 - [18,] 0.5905635331 0.918147645 0.6037942769 0.328263949 - [19,] 0.6661178111 0.874787498 0.0688752665 0.793463009 - [20,] 0.5714270058 0.048944066 0.9803513540 0.914537349 - [21,] 0.7659584857 0.775846373 0.3125150499 0.842217308 - [22,] 0.3141499059 0.756563893 0.9675243802 0.169422925 - [23,] 0.6968751778 0.872650789 0.1324707782 0.078513110 - [24,] 0.3782238525 0.579624758 0.5364251249 0.108531924 - [25,] 0.7403151453 0.451789635 0.6461082133 0.749298733 - [26,] 0.5782921447 0.369409172 0.8813395619 0.599252820 - [27,] 0.2417592837 0.991064092 0.2720299934 0.225755411 - [28,] 0.3065364894 0.736066050 0.2058734051 0.242183074 - [29,] 0.4066693399 0.411321262 0.2207378661 0.868450051 - [30,] 0.7642357713 0.217509840 0.8997187309 0.816142634 - [31,] 0.1601893809 0.566658863 0.1824444511 0.867856246 - [32,] 0.0937132754 0.638223762 0.9734738106 0.009292930 - [33,] 0.7511339965 0.103923442 0.3436669305 0.591091853 - [34,] 0.5735987651 0.951237907 0.6553645076 0.377351639 - [35,] 0.9499114281 0.578954988 0.4752220884 0.254485867 - [36,] 0.3758446192 0.052798728 0.4420929269 0.697271063 - [37,] 0.7591612791 0.113734436 0.5760056155 0.099177053 - [38,] 0.1097460489 0.089127219 0.4737118890 0.356403576 - [39,] 0.2159698724 0.573215632 0.0016242201 0.718207759 - [40,] 0.2651135898 0.153830340 0.2900760283 0.067229538 - [41,] 0.9318368479 0.133479226 0.8126322976 0.759258038 - [42,] 0.3713044880 0.952166667 0.0996854173 0.307502680 - [43,] 0.4942615442 0.799964843 0.8426329251 0.647393905 - [44,] 0.6565674008 0.228435223 0.9240007692 0.485242063 - [45,] 0.5546194194 0.852844047 0.0898779368 0.740950904 - [46,] 0.3131348765 0.100732039 0.1840703834 0.213704721 - [47,] 0.6256980768 0.428000274 0.6235166367 0.577644360 - [48,] 0.1489856443 0.575752754 0.6500458319 0.638607423 - [49,] 0.7874355474 0.080619973 0.2898914691 0.223104578 - [50,] 0.5703688168 0.256050143 0.5171432674 0.769378419 - [51,] 0.1717156325 0.339101385 0.0346307140 0.378165489 - [52,] 0.9764601048 0.628306977 0.7929682066 0.576068396 - [53,] 0.1587420395 0.375621754 0.7126429004 0.642280536 - [54,] 0.2176803409 0.835219718 0.7511949919 0.092663403 - [55,] 0.1462978539 0.224104125 0.2406677336 0.479203157 - [56,] 0.1708911972 0.593215867 0.4259613717 0.782201018 - [57,] 0.8910149985 0.142018785 0.0872662787 0.298543895 - [58,] 0.3779736755 0.310509426 0.8581924702 0.185521572 - [59,] 0.0457103401 0.879344751 0.3266109165 0.610508331 - [60,] 0.4137852436 0.631626930 0.0201767548 0.560452844 - [61,] 0.2195571528 0.718596233 0.8913105952 0.714111986 - [62,] 0.7382447990 0.744075007 0.8478900143 0.701567872 - [63,] 0.4122337785 0.671587694 0.8733269582 0.958611961 - [64,] 0.6021437587 0.955820256 0.3093991736 0.610134651 - [65,] 0.6450917169 0.928400521 0.1264171537 0.114088232 - [66,] 0.7526843124 0.436705104 0.7802989122 0.076146137 - [67,] 0.2997063766 0.654224689 0.1309945930 0.765423296 - [68,] 0.3087085823 0.876935426 0.6371941748 0.342596608 - [69,] 0.4284886608 0.849930797 0.0008197445 0.813576228 - [70,] 0.0874580105 0.289057647 0.8494888905 0.805416501 - [71,] 0.9950445746 0.526671264 0.1112271971 0.945346809 - [72,] 0.7236955145 0.766487946 0.9305669612 0.498757267 - [73,] 0.7239606669 0.361902371 0.1568023660 0.303363824 - [74,] 0.7426302731 0.399672838 0.9347559172 0.946996531 - [75,] 0.5447802225 0.838801894 0.5616297950 0.707813082 - [76,] 0.0706888989 0.119998450 0.0310555075 0.463001627 - [77,] 0.4483564957 0.872894669 0.5048730967 0.902939290 - [78,] 0.0438287666 0.643314284 0.6988559945 0.432357483 - [79,] 0.8284931015 0.841108692 0.9299757103 0.485348572 - [80,] 0.7633930759 0.722670076 0.1641295145 0.992984264 - [81,] 0.4222436752 0.510317259 0.8841753434 0.815883017 - [82,] 0.3102896563 0.290614294 0.9858013957 0.483377530 - [83,] 0.1074008208 0.895984350 0.7338644972 0.764169478 - [84,] 0.0669399693 0.586228112 0.9107325065 0.992980055 - [85,] 0.7499900353 0.032749303 0.2553250678 0.424626995 - [86,] 0.3636265502 0.491994663 0.4343010753 0.570558629 - [87,] 0.9078977865 0.149545077 0.4103580574 0.386177163 - [88,] 0.3463237630 0.180769041 0.2505669079 0.723566933 - [89,] 0.3568387409 0.762676157 0.0026778339 0.902502597 - [90,] 0.9372461650 0.028783082 0.5805151563 0.320475659 - [91,] 0.5341461205 0.844306072 0.0044064738 0.239406295 - [92,] 0.0869177727 0.431421488 0.8170050057 0.685073657 - [93,] 0.5969637693 0.649056442 0.8868091749 0.752216479 - [94,] 0.4407886460 0.765468751 0.6110754195 0.230400142 - [95,] 0.7709763278 0.003451970 0.3045489269 0.677755016 - [96,] 0.8306224118 0.981180732 0.0146101408 0.427443687 - [97,] 0.0260336597 0.497721859 0.7918673381 0.536566794 - [98,] 0.8351932005 0.254128620 0.7913846564 0.873722913 - [99,] 0.2165347089 0.939788748 0.1385002721 0.383461147 -[100,] 0.4339649915 0.296471564 0.7247037594 0.336028221 -[101,] 0.9783641526 0.866081857 0.9018030704 0.325471421 -[102,] 0.3971384598 0.265053156 0.9096906008 0.838811320 -[103,] 0.7162932027 0.695596617 0.4661542471 0.385693899 -[104,] 0.9766215621 0.978381113 0.9296605005 0.850788791 -[105,] 0.8914492358 0.323866647 0.5856527244 0.253404879 -[106,] 0.6137620085 0.517032054 0.7084812184 0.384624342 -[107,] 0.6937829796 0.482504157 0.2806229971 0.111000120 -[108,] 0.2252501699 0.192968889 0.7676781283 0.144796298 -[109,] 0.3975286756 0.856579141 0.7646776433 0.349135153 -[110,] 0.2514651113 0.468221299 0.2596560335 0.251388092 -[111,] 0.1048730048 0.480938709 0.5862234468 0.157663264 -[112,] 0.8533307265 0.802534590 0.0630291228 0.774797393 -[113,] 0.8543458662 0.959840256 0.5253083515 0.794741470 -[114,] 0.9343227027 0.415850785 0.5709062461 0.715303819 -[115,] 0.4945777149 0.319346633 0.4525958812 0.921565412 -[116,] 0.5938526166 0.742607552 0.3950976874 0.381024701 -[117,] 0.7792707451 0.446705242 0.8011080394 0.053082889 -[118,] 0.6759392642 0.110763745 0.5593784570 0.578903007 -[119,] 0.0537102909 0.861216648 0.5484887112 0.191311767 -[120,] 0.1262770237 0.404101574 0.2281427665 0.790996143 -[121,] 0.7423158411 0.264997610 0.0497878187 0.727313877 -[122,] 0.1385788159 0.473839645 0.2715208770 0.361259246 -[123,] 0.3941312041 0.516422224 0.5751485603 0.913428178 -[124,] 0.7122545927 0.282151025 0.7430913700 0.336726994 -[125,] 0.0864723539 0.137007158 0.8332147521 0.281362747 -[126,] 0.3166397884 0.093503658 0.6104916255 0.486205183 -[127,] 0.4951614400 0.621448159 0.2981001402 0.622220361 -[128,] 0.8094501127 0.343012312 0.2104642675 0.773515745 -[129,] 0.9557679957 0.286419369 0.0794727448 0.661053497 -[130,] 0.3118138872 0.630501184 0.6049537384 0.876706274 -[131,] 0.0342228804 0.771673130 0.9368422253 0.254222035 -[132,] 0.3931704909 0.407810160 0.6519637303 0.232840615 -[133,] 0.2398367440 0.463389060 0.0757585869 0.739007716 -[134,] 0.6477067082 0.498322295 0.8434889137 0.425229206 -[135,] 0.2592272202 0.847242712 0.3250673641 0.072640638 -[136,] 0.4135137298 0.294362260 0.0082187485 0.169481597 -[137,] 0.1102090557 0.357150810 0.4791381841 0.628914608 -[138,] 0.0291915040 0.317528534 0.3061793284 0.688495747 -[139,] 0.5546681047 0.777362950 0.7623155026 0.425375876 -[140,] 0.9654694719 0.937939378 0.4363308840 0.365133651 -[141,] 0.9337793922 0.093578767 0.1778323287 0.634321812 -[142,] 0.4263039595 0.247728514 0.6804367560 0.951060107 -[143,] 0.0055627781 0.657620627 0.4659305960 0.862668524 -[144,] 0.1916651884 0.882191312 0.1169548559 0.884029913 -[145,] 0.8443164860 0.545540991 0.3381157848 0.612806927 -[146,] 0.3035845007 0.996642929 0.2449090297 0.494586456 -[147,] 0.0983962484 0.551325806 0.0632993493 0.110916249 -[148,] 0.2652095708 0.659197510 0.1011707778 0.915162335 -[149,] 0.4929900784 0.408335317 0.9016870754 0.628590122 -[150,] 0.0489578447 0.394935755 0.2591228082 0.331622616 -[151,] 0.6669344027 0.625317686 0.5075432686 0.284504177 -[152,] 0.3621549048 0.768481911 0.2988393311 0.371669197 -[153,] 0.0326483354 0.144800921 0.4674971097 0.467041486 -[154,] 0.6198881525 0.996896958 0.9224957055 0.030758351 -[155,] 0.5376262197 0.324835435 0.9192293161 0.362162672 -[156,] 0.2576842806 0.777084367 0.0603294310 0.148089551 -[157,] 0.3500228543 0.724576649 0.1668874554 0.625389982 -[158,] 0.2161285661 0.080344860 0.8572669341 0.534154641 -[159,] 0.9111834818 0.339142072 0.2979932092 0.839897137 -[160,] 0.0560075995 0.251565638 0.1065861024 0.084512484 -[161,] 0.0462357609 0.653913901 0.5670640329 0.604898218 -[162,] 0.3610695442 0.478445034 0.2008723405 0.222925923 -[163,] 0.9494444395 0.030701017 0.4029161467 0.581024964 -[164,] 0.7975459564 0.212698670 0.7370460802 0.834826638 -[165,] 0.3424032438 0.373054494 0.7425395199 0.102290838 -[166,] 0.8210614766 0.719421685 0.9488708046 0.614808284 -[167,] 0.4656176886 0.687057783 0.8464449772 0.275338395 -[168,] 0.2352189699 0.869283458 0.4975102539 0.530897514 -[169,] 0.8449436247 0.231636410 0.0050560117 0.197853174 -[170,] 0.8511695394 0.794882977 0.4079136280 0.341474468 -[171,] 0.2390391729 0.679682165 0.1650999326 0.534640821 -[172,] 0.9170250949 0.708150995 0.7061667675 0.180957641 -[173,] 0.7601360832 0.898726894 0.7251891324 0.194109676 -[174,] 0.7113639880 0.917680320 0.8643603884 0.609830835 -[175,] 0.2820347275 0.971891471 0.5355856742 0.227349275 -[176,] 0.5997360051 0.154081805 0.4637709183 0.845961729 -[177,] 0.4354194493 0.773573316 0.0967188128 0.424934591 -[178,] 0.5771441387 0.475725745 0.1756015311 0.234882956 -[179,] 0.4343538592 0.574824400 0.9920985959 0.756193620 -[180,] 0.3622156528 0.547339699 0.1859536748 0.524521267 -[181,] 0.2250695992 0.911340973 0.7638558464 0.341152911 -[182,] 0.8203911844 0.984728851 0.4024798393 0.398337749 -[183,] 0.3553854842 0.996304989 0.4209121999 0.825072953 -[184,] 0.0540067432 0.126679682 0.9832146429 0.438097001 -[185,] 0.0977464563 0.144636228 0.6997192786 0.964076800 -[186,] 0.5718035589 0.976129007 0.7661929270 0.353297002 -[187,] 0.6672807375 0.812140311 0.6806913668 0.417172965 -[188,] 0.6312760920 0.845643334 0.3147387863 0.623067643 -[189,] 0.2489069414 0.170307136 0.0528473828 0.352397213 -[190,] 0.7154197919 0.769427613 0.0439616535 0.296600588 -[191,] 0.3728102313 0.606454670 0.1744521784 0.325637069 -[192,] 0.5313717655 0.213290896 0.1098954093 0.470625348 -[193,] 0.0183186221 0.612048755 0.3343215247 0.983097545 -[194,] 0.6339995915 0.751820059 0.2734629191 0.243564314 -[195,] 0.3502755684 0.483300012 0.9734322524 0.218934502 -[196,] 0.4920768677 0.722552758 0.5070240900 0.070143877 -[197,] 0.0194451697 0.205571976 0.7541954345 0.630418118 -[198,] 0.8489873135 0.051017051 0.8036233829 0.583407820 -[199,] 0.8866788479 0.950272547 0.0732990042 0.834296813 -[200,] 0.3632328885 0.444549295 0.9541965688 0.010449900 -[201,] 0.2735836152 0.830732305 0.8230200189 0.392719318 -[202,] 0.7352467482 0.901445550 0.0822419475 0.368879102 -[203,] 0.3630899456 0.488129941 0.8006980552 0.575974445 -[204,] 0.7874140171 0.849424730 0.1900799496 0.533960375 -[205,] 0.8334457523 0.754456814 0.4303900155 0.755243090 -[206,] 0.3164512538 0.821538813 0.6494338685 0.154915826 -[207,] 0.3741788722 0.286865845 0.8432514123 0.181860059 -[208,] 0.6069478868 0.657173519 0.8113320200 0.546618887 -[209,] 0.8379858243 0.066471890 0.9748757288 0.805784753 -[210,] 0.0663143010 0.781842248 0.5844962969 0.798303778 -[211,] 0.5553825684 0.826247105 0.2980761654 0.934750434 -[212,] 0.6941594929 0.863456176 0.2019991342 0.263072162 -[213,] 0.8025015295 0.022981469 0.7881118841 0.121721596 -[214,] 0.2573423921 0.105063497 0.3959441814 0.406720767 -[215,] 0.4574301527 0.014828125 0.9075640836 0.366266056 -[216,] 0.7250718824 0.783072366 0.4091000268 0.215065519 -[217,] 0.4007112575 0.590563430 0.5302661911 0.147716149 -[218,] 0.2249917972 0.566724799 0.2234066734 0.054572506 -[219,] 0.6243523695 0.855703998 0.0435405250 0.370553982 -[220,] 0.7651069134 0.951624621 0.4868271784 0.589320412 -[221,] 0.6758246957 0.319414223 0.6893930857 0.536409341 -[222,] 0.1508573301 0.847545645 0.3025167799 0.255791885 -[223,] 0.5158530220 0.665776487 0.5712286504 0.972977022 -[224,] 0.4382174690 0.607895790 0.8810680558 0.382243131 -[225,] 0.9040353345 0.818195505 0.1890957728 0.279341920 -[226,] 0.0956006302 0.433048549 0.1651034511 0.184365910 -[227,] 0.7956483513 0.622831352 0.5386761294 0.034711238 -[228,] 0.3661794967 0.195988555 0.2794191148 0.962412738 -[229,] 0.9471271602 0.549059042 0.9749584261 0.717982193 -[230,] 0.3556773327 0.867656888 0.2311769573 0.076064603 -[231,] 0.3916409630 0.681572748 0.9537506220 0.020585128 -[232,] 0.7171780958 0.669524003 0.6586226965 0.254619111 -[233,] 0.3992693252 0.494142564 0.1740932919 0.194849428 -[234,] 0.8798466546 0.476180211 0.1617385235 0.405467161 -[235,] 0.1666286134 0.075125683 0.2838694500 0.076784107 -[236,] 0.9361824323 0.933077563 0.1356491460 0.679490731 -[237,] 0.5197204188 0.339432430 0.0399253590 0.182384872 -[238,] 0.3721226270 0.752011640 0.1098320589 0.798284948 -[239,] 0.1836079187 0.603453786 0.6101417094 0.041103652 -[240,] 0.4993634163 0.207342210 0.3261762194 0.486902969 -[241,] 0.6467777344 0.129989076 0.6651675196 0.449809124 -[242,] 0.6536722353 0.695856193 0.7535691005 0.061294960 -[243,] 0.0499363518 0.046064124 0.8446276195 0.104884493 -[244,] 0.2620879861 0.148730939 0.1752178846 0.019662158 -[245,] 0.4427078820 0.094287481 0.8933788843 0.585570112 -[246,] 0.9169778530 0.648075843 0.7762387784 0.204912888 -[247,] 0.5732168553 0.863256845 0.5047426480 0.469652176 -[248,] 0.4276488579 0.131531685 0.1593779558 0.845790585 -[249,] 0.8587067372 0.502891751 0.5593184705 0.375858957 -[250,] 0.9890882210 0.938063616 0.9706202168 0.216183099 -[251,] 0.8379715749 0.129972132 0.5695172495 0.625571513 -[252,] 0.7212316899 0.572297784 0.0382156211 0.051894007 -[253,] 0.5216590953 0.015851347 0.9769222983 0.272455045 -[254,] 0.5143919997 0.114772279 0.1596595603 0.809009656 -[255,] 0.7357275770 0.853319851 0.2404850596 0.704516945 -[256,] 0.1952619776 0.944837198 0.3381335489 0.726653310 -[257,] 0.6910012066 0.214935871 0.4175838032 0.218764917 -[258,] 0.4867478984 0.343270314 0.2169513768 0.380788512 -[259,] 0.4428913160 0.343588427 0.5667717615 0.949275269 -[260,] 0.1775206316 0.142845772 0.0695777584 0.118463847 -[261,] 0.2351934593 0.337216868 0.9805003721 0.005284573 -[262,] 0.4857526280 0.558714604 0.5375014008 0.511780816 -[263,] 0.6552407253 0.130329409 0.7706996505 0.282453222 -[264,] 0.2740938128 0.395738140 0.1035083684 0.006252106 -[265,] 0.7483767993 0.547375288 0.6094368612 0.932357808 -[266,] 0.6706526354 0.151936714 0.9280017349 0.642849064 -[267,] 0.1692593219 0.512618867 0.8483696235 0.554460279 -[268,] 0.6046569496 0.175424204 0.5205884210 0.980532835 -[269,] 0.4171814560 0.160848656 0.0254654889 0.898504830 -[270,] 0.4675834295 0.565785344 0.8435611597 0.885702458 -[271,] 0.2869922114 0.653929896 0.0656541944 0.549899117 -[272,] 0.2903471391 0.175998944 0.2433835415 0.855399843 -[273,] 0.9098031069 0.600858136 0.0691988289 0.630983036 -[274,] 0.5219512563 0.196392351 0.9942230587 0.171735779 -[275,] 0.7468491504 0.370164049 0.7109902038 0.282020319 -[276,] 0.1262481522 0.390918806 0.8852912916 0.104233933 -[277,] 0.0300880789 0.647038511 0.1334821235 0.240433870 -[278,] 0.6879101389 0.589410251 0.4775275313 0.491272935 -[279,] 0.6160576248 0.761771664 0.2333714277 0.272765368 -[280,] 0.3549011711 0.051849936 0.8768312477 0.877099060 -[281,] 0.8581745944 0.971428056 0.5737855358 0.332571355 -[282,] 0.0207595848 0.042617511 0.7648429871 0.827382307 -[283,] 0.6349156951 0.124888753 0.7582474155 0.187631488 -[284,] 0.1530019275 0.031149091 0.9507271959 0.772281578 -[285,] 0.6720045879 0.978253266 0.1504266458 0.133118892 -[286,] 0.8485787737 0.734150176 0.8971518457 0.308240966 -[287,] 0.8162173289 0.762108188 0.0482832582 0.678645760 -[288,] 0.1517000652 0.989808477 0.5504770332 0.590718119 -[289,] 0.6345506713 0.545683430 0.0139598753 0.678947515 -[290,] 0.8936809630 0.442411056 0.1092832964 0.419108480 -[291,] 0.9164704378 0.303237157 0.7087321593 0.891897406 -[292,] 0.5595637094 0.593235709 0.8172157183 0.180815238 -[293,] 0.5450307759 0.731739299 0.7757680221 0.936030307 -[294,] 0.9844803826 0.952755239 0.7349386474 0.200063891 -[295,] 0.5252404297 0.912472579 0.1983703848 0.873221091 -[296,] 0.5562255983 0.346838131 0.2333369483 0.126236536 -[297,] 0.4020865897 0.884241141 0.2719432884 0.604082966 -[298,] 0.7625291559 0.952015422 0.6255507688 0.757415980 -[299,] 0.5018466183 0.931425986 0.1910752419 0.806532523 -[300,] 0.2368220380 0.122242337 0.3275852152 0.173029160 -[301,] 0.5842146724 0.936198387 0.8389963040 0.126142483 -[302,] 0.2276427920 0.316277360 0.5839341637 0.590474609 -[303,] 0.5422491468 0.200553625 0.5389597269 0.879883609 -[304,] 0.7374660282 0.768241838 0.9755696333 0.763199614 -[305,] 0.1471564339 0.559007475 0.9607511451 0.217728840 -[306,] 0.5889839104 0.675189323 0.5226181226 0.430570702 -[307,] 0.7506851617 0.386064682 0.4334508299 0.965842676 -[308,] 0.2637242335 0.650240324 0.3104421902 0.638478931 -[309,] 0.1803990712 0.089696390 0.2932914000 0.006119711 -[310,] 0.7184373385 0.404312139 0.1811476685 0.965097900 -[311,] 0.2377872753 0.984447725 0.8718100854 0.106952735 -[312,] 0.3503712702 0.603536791 0.8463436530 0.310144706 -[313,] 0.4495570462 0.272465356 0.5138976437 0.488285378 -[314,] 0.8614247281 0.744840986 0.1210435661 0.716413555 -[315,] 0.1381337575 0.230298426 0.9294903460 0.636520796 -[316,] 0.7497352820 0.403666644 0.8337023426 0.202122381 -[317,] 0.3304093368 0.647110599 0.3845536171 0.331561915 -[318,] 0.9508939169 0.080059566 0.0898211326 0.447491282 -[319,] 0.5857214541 0.141073883 0.1875592161 0.181189312 -[320,] 0.0435665241 0.641066964 0.0711824722 0.029968474 -[321,] 0.8272884621 0.002672554 0.7767159531 0.245260445 -[322,] 0.2731244157 0.085408063 0.2267000161 0.289309197 -[323,] 0.0462573939 0.811523305 0.1565170230 0.912522806 -[324,] 0.2103107716 0.739090083 0.2226596023 0.409184119 -[325,] 0.4961829542 0.965206025 0.6379224574 0.234194163 -[326,] 0.0008594517 0.978437975 0.9299203167 0.034800552 -[327,] 0.0392625227 0.771819892 0.3514823148 0.490745436 -[328,] 0.5656738437 0.684209259 0.3451482116 0.451761807 -[329,] 0.6252417772 0.079320913 0.2755355502 0.746796617 -[330,] 0.2451075327 0.365693996 0.8820323015 0.706722256 -[331,] 0.5734970425 0.119838247 0.1386956216 0.963373072 -[332,] 0.8048224875 0.931301645 0.6412679160 0.307184222 -[333,] 0.2925654361 0.303601390 0.7828756943 0.931845217 -[334,] 0.9969732796 0.564097288 0.8340119412 0.754510663 -[335,] 0.3455017877 0.795235615 0.0569652505 0.611305799 -[336,] 0.2326845648 0.521942220 0.2309741084 0.313772211 -[337,] 0.0869935376 0.723186854 0.8113833682 0.639738104 -[338,] 0.2045802616 0.380672575 0.5373175945 0.716390287 -[339,] 0.6589587668 0.506170188 0.9339784922 0.100771416 -[340,] 0.3214371668 0.473791970 0.2646674979 0.179875074 -[341,] 0.7434530903 0.984879570 0.4664959104 0.117323593 -[342,] 0.4472260750 0.892814937 0.5007153689 0.516901009 -[343,] 0.4599100070 0.204192071 0.5612023761 0.483082423 -[344,] 0.4270402647 0.987336002 0.7972487614 0.112641990 -[345,] 0.4507297378 0.746419842 0.8726341100 0.589500092 -[346,] 0.7132621077 0.550999165 0.0264370556 0.982933392 -[347,] 0.6183664217 0.458623182 0.2545521415 0.384219691 -[348,] 0.5129058261 0.226279549 0.9553426658 0.474686575 -[349,] 0.0139840404 0.377497884 0.3167468484 0.271984325 -[350,] 0.6544892930 0.589097009 0.7383347314 0.967833379 -[351,] 0.2483195239 0.783252000 0.4792166667 0.943698976 -[352,] 0.3341092798 0.376029821 0.5487082228 0.173540368 -[353,] 0.8799060567 0.286639028 0.5109444920 0.647152330 -[354,] 0.3399565150 0.713364316 0.7914584880 0.534581822 -[355,] 0.5333003050 0.738410240 0.5695481685 0.118196896 -[356,] 0.6283332780 0.021384809 0.3013993963 0.235892471 -[357,] 0.3496081459 0.082318803 0.8034476112 0.615855429 -[358,] 0.6827916105 0.739332259 0.4556267061 0.560452784 -[359,] 0.3037325416 0.954792430 0.5853331985 0.818992345 -[360,] 0.8175444310 0.362225051 0.7151003983 0.228975809 -[361,] 0.0063419391 0.284399928 0.5142549528 0.487628832 -[362,] 0.4775556314 0.584947050 0.5906238395 0.117727362 -[363,] 0.4372084681 0.769685948 0.2747515938 0.682309937 -[364,] 0.7498383273 0.967765797 0.8447801836 0.280101757 -[365,] 0.1267350963 0.504340193 0.0679511335 0.255510229 -[366,] 0.1332432132 0.210321337 0.5455718499 0.371653482 -[367,] 0.4835004443 0.540350976 0.6908350498 0.774367710 -[368,] 0.7049593334 0.203165571 0.7171184889 0.545066704 -[369,] 0.4783587519 0.441262098 0.2402160212 0.846125873 -[370,] 0.3122980180 0.676219228 0.6122906946 0.453429835 -[371,] 0.7974219534 0.361899156 0.3115806549 0.844481082 -[372,] 0.6184745003 0.981996044 0.3197651270 0.157665661 -[373,] 0.6590813969 0.843595678 0.6124570610 0.974553713 -[374,] 0.4819237876 0.249550602 0.3836133203 0.453789817 -[375,] 0.5730831542 0.467314963 0.3064885780 0.033655912 -[376,] 0.7225157402 0.457241144 0.7478901469 0.796643843 -[377,] 0.8063645191 0.499557219 0.0245002492 0.945755220 -[378,] 0.4178847608 0.473695976 0.7174830632 0.230468606 -[379,] 0.3640867800 0.620711620 0.4733614819 0.563877373 [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/vinecopula -r 63