Skip to content

Commit

Permalink
version 1.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
siacus authored and cran-robot committed Nov 6, 2016
1 parent 26267cd commit fde5004
Show file tree
Hide file tree
Showing 25 changed files with 2,444 additions and 1,955 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: yuima
Type: Package
Title: The YUIMA Project Package for SDEs
Version: 1.2.3
Version: 1.3.6
Depends: R(>= 2.10.0), methods, zoo, stats4, utils, expm, cubature,
mvtnorm
Imports: Rcpp (>= 0.12.1)
Expand All @@ -12,6 +12,6 @@ License: GPL-2
URL: http://R-Forge.R-project.org/projects/yuima/
LinkingTo: Rcpp
NeedsCompilation: yes
Packaged: 2016-10-20 08:24:55 UTC; jago
Packaged: 2016-11-06 13:16:09 UTC; jago
Repository: CRAN
Date/Publication: 2016-10-20 15:59:52
Date/Publication: 2016-11-06 16:15:04
46 changes: 24 additions & 22 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
94d55d512a9ba36caa9b7df079bae19f *COPYING
852a5cdf6ce3b3d0f7d6d31aa03c2470 *DESCRIPTION
b3960a5203d95e83087130e145b13035 *NAMESPACE
240a581d685433ae98e8904901b0dd55 *DESCRIPTION
f664de1a08b6f07d57133be652b87255 *NAMESPACE
fb9cc5446cb96ea93853a6718526e38c *NEWS
86f3ae6987c8a36c75b0be09a879ed5c *R/AllClasses.R
778e4b1f228bb32472ce4604c098b304 *R/AllClasses.R
cb87f3cf36461775646ed9d4cfeeb768 *R/AuxMethodforPPR.R
ecfdd33974bed758ee54d2ec06ce2232 *R/CPoint.R
dd610167315ee57f6b5921a5da017867 *R/CarmaNoise.R
4b3325c594164c1ef9e617555903b7ec *R/CholeskyfGn.R
7f217011b04e1d680505978b7119c8ab *R/ClassCogarch.R
38e16a8c4997f1af3714ff2af56541c2 *R/ClassCogarch.R
22045c6de810bf5059124c5447548b71 *R/DiagnosticCarma.R
2e0bac6f55b108d4008cea8270d6d68f *R/DiagnosticCogarch.R
01a3e835c0cfd35dce4d34d6763b5fa8 *R/FunctionAndOperators.R
6a2b38cdb0ad114f39e5b8db61d123ff *R/MM.COGARCH.R
750bb64140a363acc878ef1eaa2af31a *R/MethodForLaw.R
9f604491f19766f60c180f2dacb746b6 *R/MM.COGARCH.R
6572d692fccc1407df5b668b5bf583a8 *R/MethodForLaw.R
c0d1c8b86b588b042c4c112a9aa239ca *R/NewClasses.R
9f9860764e057859ba0915035eaf5d4e *R/PointProcessClasses.R
83d94c78f7c73bc1a3afef43130179b0 *R/PointProcessClasses.R
03e030f1075484e5246b1b4fbba5831e *R/PseudoLogLikCOGARCH.R
f8d9869b4590bbb582a783c7f7ffa3dc *R/RcppExports.R
732dcc9e15b9c0a4ce729a7825c4f3cf *R/WoodChanfGn.R
Expand All @@ -36,32 +37,32 @@ ee94a80376999cb09d7a5c984b520687 *R/noisy.sampling.R
e920d4330c561d82faa6695675da2d3b *R/phi.test.R
197ae3a057ce2b8309af7c30a30f3337 *R/poisson.random.sampling.R
dccb8679a411fb8e915736c8510f710e *R/qgv.R
b34c7e19de4f05827637660bcc38d0dd *R/qmle.R
dff9ca8db0d36fed206a40a288ce77a0 *R/qmle.R
dcabbf35c3fb6432ad041bd08967cc9c *R/rng.R
1f567847cf9c65fa085f2f9a50d3e8e6 *R/sampling2grid.R
6b59a2f01c61e56fc36165759434a326 *R/setCarma.R
738c1edcc284afdb385274d952665fbf *R/setCarma.R
5426f7206ebb290a6d3fc11729dbb6c7 *R/setCogarch.R
47c93fa21f41a500558879042852a671 *R/setHawkes.R
c2ad88f0c2fe074d063e98c15250a8a4 *R/setMultiModel.R
fcecca27a76849cd88191dfa8599b2b6 *R/setPoisson.R
2ed50a21f290ddd2686983026b0f7999 *R/setPpr.R
ccaa5c2e5b1d63fdcbeef1f54de5c5d8 *R/sim.euler.R
f73eb5a08ae59d0f87a1248030d7b099 *R/setPpr.R
6832818ff7f83ff215965ac3f52c0817 *R/sim.euler.R
d6d8dbbbeb5b8950787d890e953d38ed *R/sim.euler.space.discretized.R
357799e4682e2422e3373bb4390ff035 *R/simCP.R
8085cc8546d7bc91626fbf170354256e *R/simFunctional.R
afbb51978a8d2336f79cc2cfbc2819a5 *R/simulate.R
885b39e9cb5730a79fcabbd236daf9fd *R/simulateForMapsIntegralAndOperator.R
44a080dd5d9e0867f7ca4bf4bb134b12 *R/simulateForPpr.R
d3775856769d8047004e519693653685 *R/simulateMultiProcess.R
c8ea28ab1ecee6862b3fb3c00655e21b *R/simulate.R
9c7ddc7c52c956587e65ae47b8f1b42f *R/simulateForMapsIntegralAndOperator.R
fbcbeabb5fcfbb940e8d016941b84dd4 *R/simulateForPpr.R
06a015c403bf6cdd3b8fbd3ffce113d4 *R/simulateMultiProcess.R
8ef695059bbac2781e15d7dd3bc69db2 *R/spectralcov.R
f506cf2d30a5f912b5221112d7ae8965 *R/subsampling.R
ac8f9649532292ef242a77f4b884e055 *R/toLatex.R
510269f286f311811ea3ecd0cef42a6a *R/yuima.R
edfabacecae0ebb9b40324f1d499b4b9 *R/yuima.characteristic.R
10500011e0cf446a9dc1514395b9fd02 *R/yuima.data.R
6a4223ef8dae8e3b128da32d29e61b20 *R/yuima.data.R
56a8471869f97e9fb2e53ce8d5ce3252 *R/yuima.functional.R
a990f1ebcefcc5a9585ed5dc34d9cbef *R/yuima.law.r
734b6f4332efc8c706d4ff0e713ade97 *R/yuima.model.R
53ea41cbf94943c0827db5628f112c88 *R/yuima.model.R
e3c164669a627b3f16fc6da48e714da5 *R/yuima.sampling.R
c1ee1ff8bddedff2f1dd24eeb10782c3 *R/zzz.R
b516711f126a8aafd4aae9b758da7824 *data/LogSPX.rda
Expand All @@ -71,7 +72,8 @@ c39fee5ae7e8ac95f0d0e32290b8da46 *inst/CITATION
cd8687c920284fc3afb12b9638fa70d2 *inst/COPYRIGHTS
1c61255f47e28af617c8eee89bc652b3 *man/CPoint.Rd
2ff567959c3646587b4eea7855f3fd40 *man/CarmaNoise.Rd
f6cedc6c81529d87e7e7bdad57f28308 *man/Diagnostic.Cogarch.Rd
7d14ee06f14e3f17a0b0f338d58840e5 *man/Diagnostic.Carma.Rd
36a70b3f4695317597d6e0a5ead614f9 *man/Diagnostic.Cogarch.Rd
373a5beea48671dc52cc980da3c9f39f *man/Integral.sde.rd
8b6a11819c8fd0ba2551e37e69ab7a66 *man/Integrand.rd
5b346d986ca45499057fc2ed64d83133 *man/LawMethods.Rd
Expand Down Expand Up @@ -104,21 +106,21 @@ db5127cc4b6ee0cd2ab9f40e52341477 *man/mpv.Rd
1e62c8b5975366714ae0a052acb8b41c *man/phi.test.Rd
7566b9ac61bee8350513827f37448cb7 *man/poisson.random.sampling.Rd
b3165cb5569c8200e1951475a788de29 *man/qgv.Rd
9c147f31ea7284b5c87cbfe3c5f539e0 *man/qmle.Rd
9511ad690c71917c7fbf7049596de694 *man/qmle.Rd
361abb4eb2b5e1fac3c9513b27e7623e *man/rconst.Rd
8c6138f74ca66dc270d591396e7dac79 *man/rng.Rd
dcf545cfcafb3d4db450cb64d0ee46ad *man/setCarma.Rd
ad4ddfb720691c328760854eda4d505b *man/setCharacteristic.Rd
4767b968b3807fbe8b7ea54ecaa54aa4 *man/setCogarch.Rd
3553554d6bd21880a43ca82082b7c212 *man/setData.Rd
4d37f459752021188afac21a56166015 *man/setData.Rd
85e350be0518275991a13c21e6f2723f *man/setFunctional.Rd
ed510f220117dec6286c8a9f45fb8630 *man/setHawkes.Rd
7f0427debb2f32140c82adb8f6b4addf *man/setIntegral.Rd
cf0c9c92d064cf4703baec0b2038d4ae *man/setLaw.Rd
f3f75b82ca19c337b17f67d250c21c01 *man/setMap.Rd
b8f4403135dff3222c09eb340fc8fe10 *man/setModel.Rd
c1679f065c110af4e9520971454fb65b *man/setPoisson.Rd
26133133766927db4dacd14792ab6442 *man/setPpr.Rd
54ed164e2592d48fcb997609b4dd6203 *man/setPpr.Rd
0512596ff48ff056083590f1a6b0fe3f *man/setSampling.Rd
9472c984217193e30caa73d6520b719f *man/setYuima.Rd
ab5b290fd33ce465c9c035d49995ce77 *man/simFunctional.Rd
Expand Down Expand Up @@ -147,7 +149,7 @@ ffbff0dc3f384712fe20d939c8c9bd84 *man/yuima.sampling-class.Rd
2b1a38d3f511eca643f8bb068606f767 *src/Mt.h
e33f564d55ac991fbd073d0a9da4a5b2 *src/PseudoLoglikCOGARCH.c
22589075e50fba99a83c335768e53f24 *src/RcppExports.cpp
ee7fcd7f5abf1295e327b6d2f606ba1f *src/carmafilter.c
9bf5144dbaa6f7c01b99307463cdee07 *src/carmafilter.c
35dad51d480042ba175c1461f7c44f84 *src/cce_functions.c
e6bb05e4b4e54b75f046f52469949dd0 *src/qmlecpp.cpp
5ec50393829fb8f790e61c48d5e780f0 *src/rpts.c
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export(CarmaNoise) # Estimates the Levy in carma model
export(gmm) # Estimation COGARCH(P,Q) using Method Of Moments
export(cogarchNoise)
export(Diagnostic.Cogarch)
export(Diagnostic.Carma)

# Methods
export(rand)# random number generator of a Levy process specified by user
Expand Down
13 changes: 8 additions & 5 deletions R/AllClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ setClass("model.parameter",representation(all="character",
drift="character",
jump="character",
measure="character",
# Insert parameters for starting conditions
# Insert parameters for starting conditions
xinit="character"
)
)
Expand Down Expand Up @@ -104,7 +104,7 @@ setClass("yuima.functional", representation(F = "ANY",
e = "numeric"
)
)


# Class 'yuima'

Expand Down Expand Up @@ -151,7 +151,9 @@ setClass("summary.yuima.carma.qmle",representation(MeanI = "ANY",
logLI = "ANY",
TypeI = "ANY",
NumbI = "ANY",
StatI ="ANY"),
StatI ="ANY",
model = "yuima.carma",
Additional.Info = "ANY"),
contains="summary.mle"
)

Expand All @@ -172,9 +174,10 @@ contains="summary.mle"
setClass("summary.yuima.qmle",
representation(
model = "yuima.model",
threshold = "ANY"),
threshold = "ANY",
Additional.Info = "ANY"),
contains="summary.mle"
)

# The yuima.carma.qmle extends the S4 class "mle". It contains three slots: Estimated Levy,
# The description of the carma model and the mle.
# The description of the carma model and the mle.
3 changes: 2 additions & 1 deletion R/ClassCogarch.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ setClass("cogarch.est",representation(

setClass("summary.cogarch.est",
representation(objFun = "ANY",
objFunVal = "ANY"),
objFunVal = "ANY",
object = "ANY"),
contains="summary.mle"
)

Expand Down
46 changes: 46 additions & 0 deletions R/DiagnosticCarma.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
yuima.PhamBreton.Alg<-function(a){
p<-length(a)
gamma<-a[p:1]
if(p>2){
gamma[p]<-a[1]
alpha<-matrix(NA,p,p)
for(j in 1:p){
if(is.integer(as.integer(j)/2)){
alpha[p,j]<-0
alpha[p-1,j]<-0
}else{
alpha[p,j]<-a[j]
alpha[p-1,j]<-a[j+1]/gamma[p]
}
}
for(n in (p-1):1){
gamma[n]<-alpha[n+1,2]-alpha[n,2]
for(j in 1:n-1){
alpha[n-1,j]<-(alpha[n+1,j+2]-alpha[n,j+2])/gamma[n]
}
alpha[n-1,n-1]<-alpha[n+1,n+1]/gamma[n]
}
gamma[1]<-alpha[2,2]
}
return(gamma)
}


Diagnostic.Carma<-function(carma){

if(!is(carma@model,"yuima.carma"))
yuima.stop("model is not a carma")
if(!is(carma,"mle"))
yuima.stop("object does not belong
to yuima.qmle-class or yuima.carma.qmle-class ")
param<-coef(carma)
info <- carma@model@info
numb.ar<-info@p
name.ar<-paste(info@ar.par,c(numb.ar:1),sep="")
ar.par<-param[name.ar]

statCond<-FALSE
if(min(yuima.PhamBreton.Alg(ar.par[numb.ar:1]))>=0)
statCond<-TRUE
}

39 changes: 35 additions & 4 deletions R/MM.COGARCH.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ gmm<-function(yuima, data = NULL, start, method="BFGS", fixed = list(),

# Data
assign("Data", as.matrix(onezoo(observ)[,1]), envir=env)
assign("deltaData", n/index(observ@zoo.data[[1]])[n], envir=env)
#assign("deltaData", (n-1)/index(observ@zoo.data[[1]])[n], envir=env)
assign("deltaData", 1/yuima@sampling@delta, envir=env)
assign("time.obs",length(env$Data),envir=env)


Expand All @@ -255,7 +256,7 @@ gmm<-function(yuima, data = NULL, start, method="BFGS", fixed = list(),
assign("objFun",objFun, envir=env)

if(aggr.G==TRUE){
if(floor(n/index(observ@zoo.data[[1]])[n])!=env$deltaData){
if(floor(env$deltaData)!=env$deltaData){
yuima.stop("the n/Terminal in sampling information is not an integer. equally.spaced=FALSE is recommended")
}
}
Expand Down Expand Up @@ -1142,7 +1143,8 @@ setMethod("summary", "cogarch.est",
m2logL = 0,
#model = object@model,
objFun = labFun,
objFunVal = obj
objFunVal = obj,
object = object
)
tmp
}
Expand Down Expand Up @@ -1175,6 +1177,20 @@ setMethod("show", "summary.cogarch.est",
cat("\n",paste0(paste("Log.objFun", object@objFun),":"), object@objFunVal, "\n")
}
#cat("objFun", object@min, "\n")
dummy <- Diagnostic.Cogarch(object@object, display = FALSE)
info <- object@object@yuima@model@info
nameMod <- paste0("Cogarch(",info@p,
",", info@q, ") model:", collapse = "")
if(dummy$stationary){
cat("\n", nameMod, "Stationarity conditions are satisfied.\n")
}else{
cat("\n", nameMod, "Stationarity conditions are not satisfied.\n")
}
if(dummy$positivity){
cat("\n", nameMod, "Variance process is positive.\n")
}else{
cat("\n", nameMod, "Variance process is not positive.\n")
}
}
)

Expand All @@ -1198,7 +1214,8 @@ setMethod("summary", "cogarch.est.incr",
logLI = object@logL.Incr,
TypeI = object@yuima@model@measure.type,
NumbI = length(data),
StatI =summary(data)
StatI =summary(data),
object = object
)
tmp
}
Expand Down Expand Up @@ -1230,6 +1247,20 @@ setMethod("show", "summary.cogarch.est.incr",
cat("\nSummary statistics for increments:\n")
print(object@StatI)
cat("\n")
dummy <- Diagnostic.Cogarch(object@object, display = FALSE)
info <- object@object@yuima@model@info
nameMod <- paste0("Cogarch(",info@p,
",", info@q, ") model:", collapse = "")
if(dummy$stationary){
cat("\n", nameMod, "Stationarity conditions are satisfied.\n")
}else{
cat("\n", nameMod, "Stationarity conditions are not satisfied.\n")
}
if(dummy$positivity){
cat("\n", nameMod, "Variance process is positive.\n")
}else{
cat("\n", nameMod, "Variance process is not positive.\n")
}
}
)

Expand Down
8 changes: 4 additions & 4 deletions R/MethodForLaw.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
aux.funForLaw <- function(object, param, my.env, dummy){
param <- unlist(param)
# param <- unlist(param)
name.par <- names(param)
if(length(object@time.var)>=1){
if(object@time.var%in%name.par){
assign(object@time.var,param[object@time.var], envir = my.env)
assign(object@time.var,param[[object@time.var]], envir = my.env)
}else{
yuima.stop("time.var is not assigned")
}
Expand All @@ -15,8 +15,8 @@ aux.funForLaw <- function(object, param, my.env, dummy){
yuima.stop("mismatch arguments")
}
for(i in c(1: length(param))){
cond<-object@param.measure %in% name.par[i]
assign(object@param.measure[cond], param[i], envir = my.env)
cond<-object@param.measure %in% name.par[[i]]
assign(object@param.measure[cond], param[[i]], envir = my.env)
}
}
res <- eval(parse(text=dummy),envir=my.env)
Expand Down
10 changes: 8 additions & 2 deletions R/PointProcessClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ setClass("info.Ppr",
covariates = "character",
var.dt = "character",
additional.info = "character",
Info.measure = "list")
Info.measure = "list",
RegressWithCount = "logical",
IntensWithCount = "logical")
)

setClass("yuima.Ppr",
Expand All @@ -32,7 +34,9 @@ setMethod("initialize",
covariates = character(),
var.dt = character(),
additional.info = character(),
Info.measure = list()){
Info.measure = list(),
RegressWithCount = FALSE,
IntensWithCount = TRUE){
.Object@allparam <- allparam
.Object@allparamPpr <- allparamPpr
.Object@common <- common
Expand All @@ -44,6 +48,8 @@ setMethod("initialize",
.Object@var.dt <- var.dt
.Object@additional.info <- additional.info
.Object@Info.measure <- Info.measure
.Object@RegressWithCount <- RegressWithCount
.Object@IntensWithCount <- IntensWithCount
return(.Object)
}
)
Expand Down

0 comments on commit fde5004

Please sign in to comment.