[Yuima-commits] r641 - pkg/yuima/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun May 13 15:10:39 CEST 2018
Author: lorenzo
Date: 2018-05-13 15:10:39 +0200 (Sun, 13 May 2018)
New Revision: 641
Modified:
pkg/yuima/R/qmle.R
pkg/yuima/R/setCarma.R
Log:
Fixed Bug Carma yuima.law
Modified: pkg/yuima/R/qmle.R
===================================================================
--- pkg/yuima/R/qmle.R 2018-05-13 09:46:01 UTC (rev 640)
+++ pkg/yuima/R/qmle.R 2018-05-13 13:10:39 UTC (rev 641)
@@ -233,8 +233,14 @@
}
if(yuima at model@measure.type=="code"){
- tmp <- regexpr("\\(", yuima at model@measure$df$exp)[1]
- measurefunc <- substring(yuima at model@measure$df$exp, 1, tmp-1)
+ if(class(yuima at model@measure$df)=="yuima.law"){
+ measurefunc <- "yuima.law"
+ }
+ else{
+
+ tmp <- regexpr("\\(", yuima at model@measure$df$exp)[1]
+ measurefunc <- substring(yuima at model@measure$df$exp, 1, tmp-1)
+ }
if(!is.na(match(measurefunc,codelist))){
yuima.warn("carma(p,q): the qmle for a carma(p,q) driven by a non-Negative Levy will be implemented as soon as possible")
NoNeg.Noise<-TRUE
@@ -512,8 +518,13 @@
#SMI: 2/9/214 jump
if(length(measure.par)>0){
-
- args <- unlist(strsplit(suppressWarnings(sub("^.+?\\((.+)\\)", "\\1",yuima at model@measure$df$expr,perl=TRUE)), ","))
+ # "yuima.law" LM 13/05/2018
+
+ if(class(yuima at model@measure$df)=="yuima.law"){
+ args <- yuima at model@parameter at measure
+ }else{
+ args <- unlist(strsplit(suppressWarnings(sub("^.+?\\((.+)\\)", "\\1",yuima at model@measure$df$expr,perl=TRUE)), ","))
+ }
idx.intensity <- numeric(0)
for(i in 1:length(measure.par)){
if(sum(grepl(measure.par[i],yuima at model@measure$intensity)))
Modified: pkg/yuima/R/setCarma.R
===================================================================
--- pkg/yuima/R/setCarma.R 2018-05-13 09:46:01 UTC (rev 640)
+++ pkg/yuima/R/setCarma.R 2018-05-13 13:10:39 UTC (rev 641)
@@ -332,9 +332,9 @@
Model_Carma<-setModel(drift=drift_Carma,
diffusion = NULL,
hurst=mydots$hurst,
- jump.coeff=jump_Carma,
+ jump.coeff=as.matrix(jump_Carma),
measure=eval(mydots$measure),
- measure.type=mydots$measure.type,
+ measure.type=eval(mydots$measure.type),
jump.variable=mydots$jump.variable,
time.variable=mydots$time.variable,
state.variable=c(Carma.var,Y_coeff),
More information about the Yuima-commits
mailing list