[Vinecopula-commits] r56 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fr Feb 7 16:44:48 CET 2014


Author: ben_graeler
Date: 2014-02-07 16:44:47 +0100 (Fri, 07 Feb 2014)
New Revision: 56

Removed:
   pkg/R/wrappingCFunctions.r
Modified:
   pkg/DESCRIPTION
   pkg/R/0_prep_object.R
   pkg/R/BB8copula.R
   pkg/R/vineCopulas.R
Log:
- copula needs to be in depends as otherwise the order of loading packages matters

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2014-02-07 12:23:34 UTC (rev 55)
+++ pkg/DESCRIPTION	2014-02-07 15:44:47 UTC (rev 56)
@@ -5,8 +5,8 @@
 Date: 2014-02-07
 Author: Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler
 Maintainer: Ulf Schepsmeier <schepsmeier at ma.tum.de>
-Depends: R (>= 2.11.0)
-Imports: MASS, mvtnorm, igraph, copula, methods
+Depends: R (>= 2.11.0), copula
+Imports: MASS, mvtnorm, igraph, methods
 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/0_prep_object.R
===================================================================
--- pkg/R/0_prep_object.R	2014-02-07 12:23:34 UTC (rev 55)
+++ pkg/R/0_prep_object.R	2014-02-07 15:44:47 UTC (rev 56)
@@ -43,6 +43,10 @@
   constr(c(par,par2))
 }
 
+# generic fitting
+## make fitCopula from copula generic
+setGeneric("fitCopula", fitCopula)
+
 #########################################################
 ## generic wrapper functions to the VineCopula package ##
 #########################################################

Modified: pkg/R/BB8copula.R
===================================================================
--- pkg/R/BB8copula.R	2014-02-07 12:23:34 UTC (rev 55)
+++ pkg/R/BB8copula.R	2014-02-07 15:44:47 UTC (rev 56)
@@ -242,7 +242,7 @@
 setMethod("tau",signature("r270BB8Copula"),linkVineCop.tau)
 setMethod("tailIndex",signature("r270BB8Copula"),linkVineCop.tailIndex)
 
-### et union
+### set union
 
 setClassUnion("twoParamBiCop",c("BB1Copula","BB6Copula","BB7Copula","BB8Copula",
                                 "surBB1Copula","surBB6Copula","surBB7Copula","surBB8Copula",
@@ -262,7 +262,7 @@
   
   copFit <- copulaFromFamilyIndex(copula at family, fit$par, fit$par2)
   new("fitCopula", estimate = c(fit$par, fit$par2), var.est = cbind(fit$se, fit$se2), 
-      method = "estimation based on 'maximum pseudo-likelihood' via BiCopEst", 
+      method = "maximum pseudo-likelihood via BiCopEst", 
       loglik = sum(dCopula(data, copFit, log=T)),
       fitting.stats=list(convergence = as.integer(NA)), nsample = nrow(data),
       copula=copFit)

Modified: pkg/R/vineCopulas.R
===================================================================
--- pkg/R/vineCopulas.R	2014-02-07 12:23:34 UTC (rev 55)
+++ pkg/R/vineCopulas.R	2014-02-07 15:44:47 UTC (rev 56)
@@ -90,9 +90,6 @@
 
 setMethod("rCopula", signature("numeric","vineCopula"), rRVine)
 
-## make fitCopula from copula generic
-setGeneric("fitCopula",fitCopula)
-
 # fitting using RVine
 fitVineCop <- function(copula, data, 
                        method=list(StructureSelect=FALSE, indeptest=FALSE)) {

Deleted: pkg/R/wrappingCFunctions.r
===================================================================
--- pkg/R/wrappingCFunctions.r	2014-02-07 12:23:34 UTC (rev 55)
+++ pkg/R/wrappingCFunctions.r	2014-02-07 15:44:47 UTC (rev 56)
@@ -1,30 +0,0 @@
-# wrapping C functions to be used in spcopula
-
-RHfunc1 <- function(fam, n, u, param) {
-  .C("Hfunc1", as.integer(fam), as.integer(n), as.double(u[,2]), as.double(u[,1]), 
-     as.double(param[1]), as.double(param[2]), as.double(rep(0, n)), 
-     PACKAGE = "VineCopula")
-}
-
-RHfunc2 <- function(fam, n, u, param) {
-  .C("Hfunc2", as.integer(fam), as.integer(n), as.double(u[,1]), as.double(u[,2]), 
-     as.double(param[1]), as.double(param[2]), as.double(rep(0, n)), 
-     PACKAGE = "VineCopula")
-}
-    
-RLL_mod_separate <- function(fam, n, u, param) {
-  .C("LL_mod_seperate", as.integer(fam), as.integer(n), as.double(u[,1]), 
-     as.double(u[,2]), as.double(param[1]), as.double(param[2]), 
-     as.double(rep(0, n)), PACKAGE = "VineCopula")
-}
-
-RarchCDF <- function(fam, n, u, param) {
-  .C("archCDF", as.double(u[,1]), as.double(u[,2]), as.integer(n), as.double(param),
-     as.integer(fam), as.double(rep(0, n)), PACKAGE = "VineCopula")
-}
-
-Rpcc <- function(fam, n, param) {
-  .C("pcc", as.integer(n), as.integer(2), as.integer(fam), as.integer(1), 
-     as.double(param[1]), as.double(param[2]), as.double(rep(0, n * 2)), 
-     PACKAGE = "VineCopula")
-}
\ No newline at end of file



Mehr Informationen über die Mailingliste Vinecopula-commits