[Yuima-commits] r616 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 11 23:19:36 CEST 2017
Author: lorenzo
Date: 2017-07-11 23:19:36 +0200 (Tue, 11 Jul 2017)
New Revision: 616
Modified:
pkg/yuima/R/setHawkes.R
pkg/yuima/R/simulateForPpr.R
Log:
Modified: pkg/yuima/R/setHawkes.R
===================================================================
--- pkg/yuima/R/setHawkes.R 2017-06-06 14:22:40 UTC (rev 615)
+++ pkg/yuima/R/setHawkes.R 2017-07-11 21:19:36 UTC (rev 616)
@@ -2,7 +2,31 @@
process = "N", dimension = 1, intensity = "lambda",
ExpKernParm1="c", ExpKernParm2 ="a",
const = "nu", measure = NULL, measure.type = NULL){
+ if(dimension==1){
+ if(is.null(measure)){
+ my.rPpr1 <- function(n){
+ res <- t(t(rep(1,n)))
+ return(res)
+ }
+
+ my.dPpr1 <-function(x){
+ res<-1
+ return(res)
+ }
+
+ # yuima.law for the underlying source of randomness
+
+ Law.Ppr1 <- setLaw(rng = my.rPpr1, density = my.dPpr1)
+ measure <- list(df = Law.Ppr1)
+ measure.type <- "code"
+ }
+ }else{
+ if(is.null(measure)){
+ yuima.stop("Missing argument measure: see setHawkes documentation")
+ }
+ }
+
PROCESS <- paste0(process,c(1:dimension))
leng <- length(PROCESS)
Modified: pkg/yuima/R/simulateForPpr.R
===================================================================
--- pkg/yuima/R/simulateForPpr.R 2017-06-06 14:22:40 UTC (rev 615)
+++ pkg/yuima/R/simulateForPpr.R 2017-07-11 21:19:36 UTC (rev 616)
@@ -20,10 +20,17 @@
aux.simulatHawkes<- function(object, nsim, seed,
xinit, true.parameter, space.discretized, increment.W,
increment.L, method, hurst, methodfGn, sampling, subsampling){
+ # Here we can construct specific algorithm for the standard Hawkes process
+ res <- aux.simulatPpr(object, nsim = nsim, seed = seed,
+ xinit = xinit, true.parameter = true.parameter,
+ space.discretized = space.discretized, increment.W = increment.W,
+ increment.L = increment.L, method = method, hurst = hurst,
+ methodfGn = methodfGn, sampling = sampling, subsampling = subsampling)
+ return(res)
+
# object at Kernel@param.Integral at allparam
# simOzaki.aux(gFun=object at gFun@formula,a,cCoeff, Time, numJump)
- ret <-NULL
}
setMethod("simulate", "yuima.Ppr",
More information about the Yuima-commits
mailing list