[spcopula-commits] r92 - / pkg pkg/R pkg/demo pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 11 17:38:43 CEST 2013


Author: ben_graeler
Date: 2013-04-11 17:38:43 +0200 (Thu, 11 Apr 2013)
New Revision: 92

Modified:
   pkg/DESCRIPTION
   pkg/R/spCopula.R
   pkg/R/vineCopulas.R
   pkg/demo/00Index
   pkg/man/condSpVine.Rd
   pkg/man/spCopDemo.Rd
   spcopula_0.1-1.tar.gz
   spcopula_0.1-1.zip
Log:
- double checking values from dduCopula and ddvCopula for an spCopula

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2013-04-05 10:53:10 UTC (rev 91)
+++ pkg/DESCRIPTION	2013-04-11 15:38:43 UTC (rev 92)
@@ -2,7 +2,7 @@
 Type: Package
 Title: copula driven spatial analysis
 Version: 0.1-1
-Date: 2013-04-05
+Date: 2013-04-11
 Author: Benedikt Graeler
 Maintainer: Benedikt Graeler <ben.graeler at uni-muenster.de>
 Description: This package provides a framework to analyse via copulas spatial and spatio-temporal data provided in the format of the spacetime package. Additionally, support for calculating different multivariate return periods is implemented.

Modified: pkg/R/spCopula.R
===================================================================
--- pkg/R/spCopula.R	2013-04-05 10:53:10 UTC (rev 91)
+++ pkg/R/spCopula.R	2013-04-11 15:38:43 UTC (rev 92)
@@ -381,6 +381,13 @@
     }
   }
   
+  if(any(res < 0) || any(res > 1)) {
+    warning("Partial derivative produced values outside of [0,1], corrections will be applied to:\n",
+            paste(res[res<0],collapse=" "),paste(res[res>1],collapse=" "))
+    res[res<0] <- 0
+    res[res>1] <- 1
+  }
+  
   return(res)
 }
 
@@ -430,6 +437,13 @@
     }
   }
   
+  if(any(res < 0) || any(res > 1)) {
+    warning("Partial derivative produced values outside of [0,1], corrections will be applied to:\n",
+            paste(res[res<0],collapse=" "),paste(res[res>1],collapse=" "))
+    res[res<0] <- 0
+    res[res>1] <- 1
+  }
+  
   return(res)
 }
 

Modified: pkg/R/vineCopulas.R
===================================================================
--- pkg/R/vineCopulas.R	2013-04-05 10:53:10 UTC (rev 91)
+++ pkg/R/vineCopulas.R	2013-04-11 15:38:43 UTC (rev 92)
@@ -45,7 +45,6 @@
 
 dRVine <- function(u, copula, log=F) {
   RVM <- copula at RVM
-#   class(RVM) <- "RVineMatrix"
   vineLoglik <- RVineLogLik(u, RVM, separate=T)$loglik
   if(log)
     return(vineLoglik)

Modified: pkg/demo/00Index
===================================================================
--- pkg/demo/00Index	2013-04-05 10:53:10 UTC (rev 91)
+++ pkg/demo/00Index	2013-04-11 15:38:43 UTC (rev 92)
@@ -1,2 +1,2 @@
-MRP		The MRP demo gives insight in the code used in the paper: Joint return periods in hydrology: a critical and practical review focusing on synthetic design hydrograph estimation, by Vandenberghe et al. (2012).
-spCopula_estimation		A demo illustrating the estiamtion of a spatial copula for a SpatialPointsDataFrame.
+MRP		The MRP demo gives insight in the code used in the paper: Multivariate return periods in hydrology: a critical and practical review focusing on synthetic design hydrograph estimation, by Gräler et al. (2013), HESS-17-1281-2013.
+spCopula		A demo illustrating the estiamtion of a spatial copula for a SpatialPointsDataFrame.

Modified: pkg/man/condSpVine.Rd
===================================================================
--- pkg/man/condSpVine.Rd	2013-04-05 10:53:10 UTC (rev 91)
+++ pkg/man/condSpVine.Rd	2013-04-11 15:38:43 UTC (rev 92)
@@ -48,8 +48,8 @@
 
 spVineCop <- spVineCopula(spCop, vineCopula(4L))
 
-dists <- runif(4,0,800)
-condVar <- runif(4)
+dists <- c(473, 124, 116, 649)
+condVar <- c(0.29, 0.55, 0.05, 0.41)
 condDensity <- condSpVine(condVar,dists,spVineCop)
 
 curve(condDensity)

Modified: pkg/man/spCopDemo.Rd
===================================================================
--- pkg/man/spCopDemo.Rd	2013-04-05 10:53:10 UTC (rev 91)
+++ pkg/man/spCopDemo.Rd	2013-04-11 15:38:43 UTC (rev 92)
@@ -15,10 +15,10 @@
 \alias{spCop}
 \docType{data}
 \title{
-workspace produced in \code{demo(spcopula_estimation)}
+workspace produced in \code{demo(spCopula)}
 }
 \description{
-This workspace is produced by the call \code{demo(spcopula_estimation)} and used in a couple of examples throughout the package.
+This workspace is produced by the call \code{demo(spCopula)} and used in a couple of examples throughout the package.
 }
 \usage{data(spCopDemo)}
 \references{

Modified: spcopula_0.1-1.tar.gz
===================================================================
(Binary files differ)

Modified: spcopula_0.1-1.zip
===================================================================
(Binary files differ)



More information about the spcopula-commits mailing list