[spcopula-commits] r75 - / pkg pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 5 14:18:11 CET 2013
Author: ben_graeler
Date: 2013-01-05 14:18:11 +0100 (Sat, 05 Jan 2013)
New Revision: 75
Added:
spcopula_1.0.75.tar.gz
spcopula_1.0.75.zip
Removed:
spcopula_1.0.74.tar.gz
spcopula_1.0.74.zip
Modified:
pkg/DESCRIPTION
pkg/R/empiricalCopula.R
Log:
- changed CDF of empiricalCopula to use the preferred R-function Cn and to be in-line with the upcoming copula release
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2012-12-28 16:05:21 UTC (rev 74)
+++ pkg/DESCRIPTION 2013-01-05 13:18:11 UTC (rev 75)
@@ -1,11 +1,11 @@
Package: spcopula
Type: Package
Title: copula driven spatial analysis
-Version: 1.0.74
-Date: 2012-12-28
+Version: 1.0.75
+Date: 2013-01-05
Author: Benedikt Graeler
Maintainer: Benedikt Graeler <ben.graeler at uni-muenster.de>
-Description: This package provides a framework to analyse spatial data provided in the format of the spacetime package with copulas. Additionally, support for calculating different multivariate return periods is implemented.
+Description: This package provides a framework to analyse spatial and spatio-temporal data provided in the format of the spacetime package with copulas. Additionally, support for calculating different multivariate return periods is implemented.
License: GPL-2
LazyLoad: yes
Depends: copula (>= 0.999-5), spacetime (>= 1.0-2), CDVine, methods, lattice, R (>= 2.15.0)
Modified: pkg/R/empiricalCopula.R
===================================================================
--- pkg/R/empiricalCopula.R 2012-12-28 16:05:21 UTC (rev 74)
+++ pkg/R/empiricalCopula.R 2013-01-05 13:18:11 UTC (rev 75)
@@ -33,40 +33,14 @@
## density, not yet needed and hence not implemented ##
## jcdf ##
-# pempCop <- function(u, copula) {
-# t_data <- t(copula at sample)
-#
-# u <- matrix(u,ncol=copula at dimension)
-#
-# # --/-- make this a C-function?
-# res <- NULL
-# for(i in 1:nrow(u)) {
-# bool <- t_data <= u[i,]
-# for (i in 2:nrow(t_data)) bool[1,] <- bool[1,] * bool[i,]
-# res <- c(res,sum(bool[1,]))
-# }
-# # --//--
-#
-# return(res/ncol(t_data))
-# }
-
# from package copula
pempCop.C <- function(u, copula) {
- .C("RmultCn", as.double(copula at sample), as.integer(nrow(copula at sample)),
- copula at dimension, as.double(u), as.integer(nrow(u)), as.double(u[,1]),
- PACKAGE="copula")[[6]]
+ Cn(copula at sample, u) # preferred use instead of direct C-code from copula <=0.999-5
+# .C("RmultCn", as.double(copula at sample), as.integer(nrow(copula at sample)),
+# copula at dimension, as.double(u), as.integer(nrow(u)), as.double(u[,1]),
+# PACKAGE="copula")[[6]]
}
-##
-# us <- matrix(runif(100),ncol=2)
-# copula <- genEmpCop(normalCopula(.3),1e6)
-#
-# hist(pCopula(us,normalCopula(.3)) - pempCop.C(us,copula),main="C")
-# hist(pCopula(us,normalCopula(.3)) - pempCop(us,copula),main="R")
-#
-# system.time(pempCop.C(us,copula))
-# system.time(pempCop(us,copula))
-
setMethod("pCopula", signature("numeric", "empiricalCopula"),
function(u, copula, ...) {
pempCop.C(matrix(u,ncol=copula at dimension),copula)
Deleted: spcopula_1.0.74.tar.gz
===================================================================
(Binary files differ)
Deleted: spcopula_1.0.74.zip
===================================================================
(Binary files differ)
Added: spcopula_1.0.75.tar.gz
===================================================================
(Binary files differ)
Property changes on: spcopula_1.0.75.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: spcopula_1.0.75.zip
===================================================================
(Binary files differ)
Property changes on: spcopula_1.0.75.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
More information about the spcopula-commits
mailing list