Skip to content

Commit

Permalink
version 1.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
siacus authored and cran-robot committed Jan 27, 2022
1 parent 577a893 commit ba5cc03
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 64 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.15.0
Version: 1.15.2
Depends: R(>= 2.10.0), methods, zoo, stats4, utils, expm, cubature,
mvtnorm
Imports: Rcpp (>= 0.12.1), boot (>= 1.3-2), glassoFast, wavethresh,
Expand All @@ -13,6 +13,6 @@ License: GPL-2
URL: https://yuimaproject.com
LinkingTo: Rcpp, RcppArmadillo
NeedsCompilation: yes
Packaged: 2022-01-04 14:16:51 UTC; jago
Packaged: 2022-01-26 09:31:31 UTC; jago
Repository: CRAN
Date/Publication: 2022-01-12 09:10:02 UTC
Date/Publication: 2022-01-27 10:20:02 UTC
20 changes: 10 additions & 10 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
94d55d512a9ba36caa9b7df079bae19f *COPYING
05dfa726f5113761f15ffb7cf4a45144 *DESCRIPTION
15c2028568528c2e4390a390fc6013b4 *DESCRIPTION
1976c100cd4dedaaf26e90e609235545 *NAMESPACE
51608b9e933aaf556f9a898b1e7eff2f *NEWS
050fc01ddf4030dbcdafabb7f86cd760 *NEWS
5142e55d1bab0b3d632328024ea4581b *R/AllClasses.R
a57282007ddeb97e5a975ab60fe1d12b *R/AuxMethodforPPR.R
4b22fa1f5201199bc7d2afc39b2f41e7 *R/CPoint.R
Expand Down Expand Up @@ -81,7 +81,7 @@ edfabacecae0ebb9b40324f1d499b4b9 *R/yuima.characteristic.R
28a257804b7d08a3fb47100a5c536234 *R/yuima.model.R
e3c164669a627b3f16fc6da48e714da5 *R/yuima.sampling.R
48a7ba9f63b106e188f6c3dc19d836eb *R/zzz.R
b27055119917a0b42d2d20ab4cf9dcab *build/partial.rdb
0302a4260d695fbfc6b4440a8191acb3 *build/partial.rdb
b516711f126a8aafd4aae9b758da7824 *data/LogSPX.rda
bce7107dc324a66a94865b56f9e3bbf3 *data/MWK151.rda
ba391af8d40ef453c6d0a726d4170ffa *inst/AUTHORS
Expand Down Expand Up @@ -121,15 +121,15 @@ bd223b80e104b53712e49c4ddf73ed1a *man/aeSkewness.Rd
9759b6e2349eb3e5cc8a79f9ae5d78c7 *man/asymptotic_term.Rd
4daeedaf39d685b5c336cf866146b29c *man/bns.test.Rd
d3a8b9c61dcbd7bba509401886329b9c *man/carma.info-class.Rd
076bca6c903c4d40d4563eb753951e45 *man/cce.Rd
6e7a7e71c48ba3560fec770b819964c0 *man/cce.factor.Rd
f2ed2aebdf7b5626d145602feb27a8d9 *man/cce.Rd
e42edb1b3dbe1492dfc9d6f96994e39f *man/cce.factor.Rd
66d9893fcc3f99afadfb0285fff7ecaf *man/cogarch.est.incr.rd
9a8ac5d2c7a8925aebf561fb96b06f72 *man/cogarch.est.rd
eae56a5cb6a4dce72101ebd9afe3a572 *man/cogarch.info-class.Rd
bd8202a738aeedfafa15fd891d7275bf *man/cogarchNoise.Rd
847e9639fc232531b7644607f47f7cd4 *man/get.counting.data.Rd
fcaeb71b9c9285267d393b0622c2dc63 *man/gmm.rd
d61e78f7c5db6d40fb39752b9ee49a38 *man/hyavar.Rd
7826693880c9e0bca23250497859ac2c *man/hyavar.Rd
1c4e78ccd1e4a859b30ed7600d758644 *man/info.Map.Rd
5ec241c530c61c6b64937fc723f69d8a *man/info.Ppr.Rd
e28475ce9e4377e6900539f473898483 *man/lambdaFromData.Rd
Expand All @@ -144,17 +144,17 @@ e4ce21b5f4969a9a997728b81e32eb44 *man/llag.test.Rd
854eef2bdc9e5c4fbe61e78c5f671843 *man/model.parameter-class.Rd
fda773476c997202e83b3f558bd61514 *man/mpv.Rd
5c3df9c78cc7e083e70187c05d3deb4f *man/noisy.sampling.Rd
922bc8163ab8ab470a3258e6562d298c *man/ntv.Rd
f6a56ac89bf4e8bff4f4ad608594dba0 *man/ntv.Rd
752e82c9d403d3dde64b101211cab048 *man/param.Integral.rd
7dbc6098c44225ce1a677dd108b87c06 *man/param.Map.Rd
1e62c8b5975366714ae0a052acb8b41c *man/phi.test.Rd
6af7650d27a9e8fc3ff62352314607f3 *man/phi.test.Rd
7566b9ac61bee8350513827f37448cb7 *man/poisson.random.sampling.Rd
2261c711e5281f9214ffac31251a49d1 *man/pz.test.Rd
b3165cb5569c8200e1951475a788de29 *man/qgv.Rd
3fbfcbcd23e305959aac4bf42d7f2226 *man/qmle.Rd
ec481a2f0db4d1e9b3f2ad141c5da5f9 *man/qmleLevy.Rd
361abb4eb2b5e1fac3c9513b27e7623e *man/rconst.Rd
edde878d586d934630b953ba47da07fd *man/rng.Rd
5eda25ce188b12d84ef562e78bd13157 *man/rng.Rd
dcf545cfcafb3d4db450cb64d0ee46ad *man/setCarma.Rd
ad4ddfb720691c328760854eda4d505b *man/setCharacteristic.Rd
4b3d6fa5dbd44faeaa7e52fba2534b42 *man/setCogarch.Rd
Expand Down Expand Up @@ -210,7 +210,7 @@ b4d2d444be716ac9cec996a6fc4aedb6 *src/RcppExports.cpp
937b6c5f3651edb957df0ec67698ad0f *src/ae.cpp
9bf5144dbaa6f7c01b99307463cdee07 *src/carmafilter.c
d741728bfa91609fe064b30541ae1cc1 *src/cce_functions.c
3c341548ab4907ddf8e3f2d80b915ac1 *src/euler.c
47aea558482b3a9ca2619eddc68564dc *src/euler.c
4c06820c7b26b2f4dae030676c8343f1 *src/minusquasilogl_W1andW2.cpp
fee76cbf3ef99e0b1108c34f536ae0a8 *src/pseudoLogLikCogarchIrregularGrid.cpp
e6bb05e4b4e54b75f046f52469949dd0 *src/qmlecpp.cpp
Expand Down
90 changes: 51 additions & 39 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
2012/10/05: add mpv.R, bns.test.R, mpv.Rd, bns.test.Rd
2012/12/13: add noisy.sampling.R, noisy.sampling.Rd
modify bns.test.R, cce.R, llag.R, mpv.R, bns.test.Rd, cce.Rd, llag.Rd, mpv.Rd
modify bns.test.R, cce.R, llag.R, mpv.R, bns.test.Rd, cce.Rd,
llag.Rd, mpv.Rd
2012/12/19: modify cce.R
2012/12/19: modify cce.R, noisy.sampling.R
2012/12/22: modify cce.R
2013/02/06: modify rng.R
2013/02/11: modify cce.R
2013/04/13: modify asymptotic_term_second.R, asymptotic_term_third.R, asymptotic_term_third_function.R, cce.R, llag.R
2013/04/13: modify asymptotic_term_second.R, asymptotic_term_third.R,
asymptotic_term_third_function.R, cce.R, llag.R
2013/04/13: modify qmle.R
2013/04/14: modify qmle.R
2013/04/14: modify adaBayes.R
2013/04/14: modify bns.test.Rd, mpv.Rd
2013/10/28: add cce_functions.c
modify cce.R, llag.R, sim.euler.R, bns.test.Rd, cce.Rd, llag.Rd, mpv.Rd, noisy.sampling.Rd
modify cce.R, llag.R, sim.euler.R, bns.test.Rd, cce.Rd,
llag.Rd, mpv.Rd, noisy.sampling.Rd
2013/10/28: modify llag.R
2013/10/30: modify cce.R, cce_functions.c
2013/11/21: modify llag.R
2013/11/22: modify cce.R, cce_functions.c
2014/04/28: modified qmle, added carma, modified lasso
2014/05/04: modified show method, setYuima sets the sampling from the data if sampling is missing
2014/07/07: modified llag.R, llag.Rd, cce_functions.c; estimated cross-correlation functions are converted to values in [-1,1]
2014/05/04: modified show method, setYuima sets the sampling from the data
if sampling is missing
2014/07/07: modified llag.R, llag.Rd, cce_functions.c; estimated
cross-correlation functions are converted to values in [-1,1]
2014/07/31: fixed setSampling and print methods
2014/09/08: fixed a bug in cce_functions.c
2014/09/23: added Compound Poisson simulator
Expand All @@ -33,53 +38,60 @@
fixed a bug in llag.R
modified cce.Rd, cce_functions.c
2015/05/14: fixed a bug in cce_functions.c
2015/09/01: fixed a bug in cce_functions.c
add some contents to the examples of cce
2015/10/10: modified llag.R, cce.Rd, llag.Rd, mpv.Rd, noisy.sampling.Rd, cce_functions.c
added mllag.R, mllag.Rd (multiple lead-lag detector);
spectralcov.R, spectralcov.Rd (spectral covariance estimator)
2015/09/01: fixed a bug in cce_functions.c; add some contents to the examples of cce
2015/10/10: modified llag.R, cce.Rd, llag.Rd, mpv.Rd, noisy.sampling.Rd,
cce_functions.c; added mllag.R, mllag.Rd (multiple lead-lag detector);
spectralcov.R, spectralcov.Rd (spectral covariance estimator)
2016/01/14: modified rng.R, rng.Rd, adaBayes.Rd, qmle.Rd, setModel.Rd, spectralcov.Rd
2016/05/26: added rpts and rnts in rng.R and the corresponding c language file
2016/07/08: fixed some bugs in llag.R and cce_functions.c
2016/10/04: modified setMultiModel.R, sim.euler.R and yuima.model.R to generate nts and pts process
2016/12/16: added rGIG, rGH, dGIG and dGH in rng.R and the corresponding c language file YU
2016/10/04: modified setMultiModel.R, sim.euler.R and yuima.model.R to generate
nts and pts process
2016/12/16: added rGIG, rGH, dGIG and dGH in rng.R and the corresponding c language
file YU
2017/01/25: modified sim.euler.R and added euler.c to implement the Euler-Maruyama scheme by the C code (only the diffusion case)
2017/02/23: modified sim.euler.R and removed euler.c due to a memory corruption
fix a bug in sim.euler.R
2017/02/23: modified sim.euler.R and removed euler.c due to a memory
corruption, fixed a bug in sim.euler.R
2017/03/27: added IC.R and qmleLevy.R
2017/04/12: fix a bug in sim.euler.R
(re-)added euler.c
2017/04/12: fix a bug in sim.euler.R, (re-)added euler.c
2017/04/27: modified qmleLevy.R, qmleLevy.Rd, IC.Rd
2017/09/09: boot package is imported
added llag.test.R, llag.test.Rd
modified llag.R, bns.test.Rd, llag.Rd, mllag.Rd, hyavar.Rd, cce.Rd, cce_functions.c
modified llag.R, bns.test.Rd, llag.Rd, mllag.Rd, hyavar.Rd,
cce.Rd, cce_functions.c
2018/01/16: a bug in computation of asymptotic variances in llag is fixed
the default value of tol of llag is changed to 1e-7
modified llag.R, llag.Rd, cce_functions.c
2018/04/12: a bug in cce is fixed
2018/10/30: modified IC.R, IC.Rd
2018/12/4: a bug in euler.c is fixed
modified cce.R, hyavar.R, llag.R, sim.euler.R
2019/4/8: modified adaBayes.R
2019/7/19: added cce.factor.R, cce.factor.Rd
modified llag.test.Rd, bns.test.Rd, hyavar.R, mpv.Rd, mllag.Rd, llag.Rd, cce.Rd, spectralcov.R, JBtest.Rd, snr.Rd
2020/2/6: fixed length(class(matrix))>2 issue. Code for simPoi fastened.
2020/3/5: should have fixed qmleLevy if() condition and rhck PROTECT problems
2020/4/25: modified IC.R, IC.Rd, and adaBayes.R
2020/4/28: new functions simBmllag and wllag are added
the default value of tol of llag is changed to 1e-6
the wavethresh package is imported for implementation of wllag
fixed length(class(matrix))>2 issue
cce.factor.Rd, IC.Rd and llag.Rd are revised
2021/2/5: modified adaBayes.R and adaBayes.Rd
2021/2/26: modified qmle.R and qmle.Rd
2021/3/13: fixed a bug in qmle when joint = TRUE and the parameter space is one-dimensional
2021/3/15: fixed a bug in qmle when yuima@model@parameter@measure is character(0) and yuima@model@measure.type is "CP"
2021/8/16: fixed a bug in simulate when the jump intensity is not a parameter
2021/9/24: fixed a bug regarding the "fixed" argument in qmle
2018/12/04: a bug in euler.c is fixed
modified cce.R, hyavar.R, llag.R, sim.euler.R
2019/04/08: modified adaBayes.R
2019/07/19: added cce.factor.R, cce.factor.Rd
modified llag.test.Rd, bns.test.Rd, hyavar.R, mpv.Rd, mllag.Rd,
llag.Rd, cce.Rd, spectralcov.R, JBtest.Rd, snr.Rd
2020/02/06: fixed length(class(matrix))>2 issue. Code for simPoi fastened.
2020/03/05: should have fixed qmleLevy if() condition and rhck PROTECT problems
2020/04/25: modified IC.R, IC.Rd, and adaBayes.R
2020/04/28: new functions simBmllag and wllag are added
the default value of tol of llag is changed to 1e-6
the wavethresh package is imported for implementation of wllag
fixed length(class(matrix))>2 issue
cce.factor.Rd, IC.Rd and llag.Rd are revised
2021/02/05: modified adaBayes.R and adaBayes.Rd
2021/02/26: modified qmle.R and qmle.Rd
2021/03/13: fixed a bug in qmle when joint = TRUE and the parameter
space is one-dimensional
2021/03/15: fixed a bug in qmle when yuima@model@parameter@measure is character(0)
and yuima@model@measure.type is "CP"
2021/08/16: fixed a bug in simulate when the jump intensity is not a parameter
2021/09/24: fixed a bug regarding the "fixed" argument in qmle
2021/11/23: fixed a bug regarding the "psd" argument in lmm
2021/11/28: added ntv.R, pz.test.R, lm.jumptest.R, ntv.Rd, pz.test.Rd, lm.jumptest.Rd
modified mpv.Rd, bns.test.Rd
2021/12/15: added ae.R, ae.cpp, ae.Rd, aeCharacteristic.Rd, aeDensity.Rd, aeExpectation.Rd, aeKurtosis.Rd, aeMarginal.Rd
aeMean.Rd, aeMoment.Rd, aeSd.Rd, aeSkewness.Rd, yuima.ae-class.Rd, updated NAMESPACE, updated yuima_init.c,
updated DESCRIPTION to add package calculus in Imports
2021/12/15: added ae.R, ae.cpp, ae.Rd, aeCharacteristic.Rd, aeDensity.Rd,
aeExpectation.Rd, aeKurtosis.Rd, aeMarginal.Rd
aeMean.Rd, aeMoment.Rd, aeSd.Rd, aeSkewness.Rd,
yuima.ae-class.Rd, updated NAMESPACE, updated yuima_init.c,
updated DESCRIPTION to add package calculus in Imports
2021/01/25: fixed a protection issue in euler.c
Binary file modified build/partial.rdb
Binary file not shown.
3 changes: 2 additions & 1 deletion man/cce.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ The second-order correction will be provided in a future version of the package.
\code{\link{setModel}}, \code{\link{setData}}, \code{\link{hyavar}}, \code{\link{lmm}}, \code{\link{cce.factor}}
}
\examples{
\dontrun{
## Set a model
diff.coef.1 <- function(t, x1 = 0, x2 = 0) sqrt(1+t)
diff.coef.2 <- function(t, x1 = 0, x2 = 0) sqrt(1+t^2)
Expand Down Expand Up @@ -477,7 +478,7 @@ cce(noisy.psample,method="RK")$covmat
## Nonparametric QMLE: consistent
cce(noisy.psample,method="QMLE")$covmat
}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
Expand Down
2 changes: 2 additions & 0 deletions man/cce.factor.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ Yuta Koike with YUIMA project Team
\code{\link{cce}}, \code{\link{lmm}}, \code{\link{glassoFast}}
}
\examples{
\dontrun{
set.seed(123)
## Simulating a factor process (Heston model)
Expand Down Expand Up @@ -314,6 +315,7 @@ norm(est$premat.y - pmat, type = "2")
# after implementing PCA (the scree plot is depicted)
# Try: est <- cce.factor(yuima2, PCA = TRUE)
}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ts}% use one of RShowDoc("KEYWORDS")
3 changes: 2 additions & 1 deletion man/hyavar.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Construction of kernel-type estimators for off-diagonal components is implemente
\code{\link{setData}}, \code{\link{cce}}
}
\examples{
\dontrun{
## Set a model
diff.coef.1 <- function(t, x1 = 0, x2 = 0) sqrt(1+t)
diff.coef.2 <- function(t, x1 = 0, x2 = 0) sqrt(1+t^2)
Expand Down Expand Up @@ -178,7 +179,7 @@ z <- atanh(cor.est) # the Fisher z transformation of the estimated correlation
se.z <- se.cor/(1 - cor.est^2) # standard error for z (calculated by the delta method)
## 95\% confidence interval for correlation via the Fisher z transformation
c(lower = tanh(z + qnorm(0.025) * se.z), upper = tanh(z + qnorm(0.975) * se.z))

}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
Expand Down
2 changes: 2 additions & 0 deletions man/ntv.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Yuta Koike with YUIMA Project Team
\code{\link{mpv}}, \code{\link{cce}}, \code{\link{bns.test}}, \code{\link{lm.jumptest}}, \code{\link{pz.test}}
}
\examples{
\dontrun{
set.seed(123)

# One-dimensional case
Expand Down Expand Up @@ -140,6 +141,7 @@ medrv(yuima) # medRV (true value = c(1, 1))
minrv.test(yuima) # test is performed component-wise
medrv.test(yuima) # test is performed component-wise
}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory (show via RShowDoc("KEYWORDS")):
\keyword{ts}
Expand Down
3 changes: 2 additions & 1 deletion man/phi.test.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ phi.test(yuima, H0, H1, phi, print=FALSE,...)
}
\author{The YUIMA Project Team}
\examples{
\dontrun{
model<- setModel(drift="t1*(t2-x)",diffusion="t3")
T<-10
n<-1000
Expand All @@ -44,7 +45,7 @@ phi.test(X, H0=h0, phi=phi1, start=h0, lower=list(t1=0.1, t2=0.1, t3=0.1),
phi.test(X, H0=h1, phi=phi1, start=h0, lower=list(t1=0.1, t2=0.1, t3=0.1),
upper=list(t1=2,t2=2,t3=2),method="L-BFGS-B")
}
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ts}
2 changes: 1 addition & 1 deletion man/rng.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ H??rmann, W., & Leydold, J. (2014). Generating generalized inverse Gaussian rand
\doi{10.1111/1467-9469.00045}

Jorgensen, B. (2012). Statistical properties of the generalized inverse Gaussian distribution (Vol. 9). Springer Science & Business Media.
\href{https://www.springer.com/la/book/9780387906652}{https://www.springer.com/la/book/9780387906652}
\href{https://link.springer.com/la/book/9780387906652}{https://link.springer.com/la/book/9780387906652}

Michael, J. R., Schucany, W. R., & Haas, R. W. (1976). Generating random variates using transformations with multiple roots. The American Statistician, 30(2), 88-90.
\doi{10.1080/00031305.1976.10479147}
Expand Down
24 changes: 16 additions & 8 deletions src/euler.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ SEXP euler(SEXP x0, SEXP t0, SEXP R, SEXP dt, SEXP dW, SEXP modeltime, SEXP mode
PROTECT(t0 = AS_NUMERIC(t0));
REAL(tpar)[0] = REAL(t0)[0]; /* initial time */

PROTECT(b0 = allocVector(REALSXP, d));
PROTECT(sigma0 = allocVector(REALSXP, d*r));
//PROTECT(b0 = allocVector(REALSXP, d));
//PROTECT(sigma0 = allocVector(REALSXP, d*r));
PROTECT(b0 = allocVector(VECSXP, 1));
PROTECT(sigma0 = allocVector(VECSXP, 1));

PROTECT(xpar = allocVector(REALSXP, 1));

Expand Down Expand Up @@ -79,12 +81,18 @@ SEXP euler(SEXP x0, SEXP t0, SEXP R, SEXP dt, SEXP dW, SEXP modeltime, SEXP mode
PROTECT(sigma0 = AS_NUMERIC(eval(diffusion, rho)));
*/
/* PROTECT(b0 = allocVector(REALSXP, d)); */
b0 = AS_NUMERIC(eval(drift, rho));
//b0 = AS_NUMERIC(eval(drift, rho));
//b0 = PROTECT(AS_NUMERIC(eval(drift, rho)));
/* PROTECT(sigma0 = allocVector(REALSXP, d*r)); */
sigma0 = AS_NUMERIC(eval(diffusion, rho));
//sigma0 = AS_NUMERIC(eval(diffusion, rho));
//sigma0 = PROTECT(AS_NUMERIC(eval(diffusion, rho)));
SET_VECTOR_ELT(b0, 0, eval(drift, rho));
SET_VECTOR_ELT(sigma0, 0, eval(diffusion, rho));

b = REAL(b0);
sigma = REAL(sigma0);
//b = REAL(b0);
//sigma = REAL(sigma0);
b = REAL(VECTOR_ELT(b0, 0));
sigma = REAL(VECTOR_ELT(sigma0, 0));

for (j = 0; j < d; j++) {
rX[j + (i + 1) * d] = rX[j + i * d] + b[j] * rdt[i];
Expand All @@ -98,8 +106,8 @@ SEXP euler(SEXP x0, SEXP t0, SEXP R, SEXP dt, SEXP dW, SEXP modeltime, SEXP mode
/*rX[i + 1] = rX[i] + *REAL(eval(drift, rho)) * REAL(dt)[i] + *REAL(eval(diffusion, rho)) * REAL(dW)[i];*/

REAL(tpar)[0] += rdt[i];


}
UNPROTECT(1); /* xpar */
UNPROTECT(2); /* b0, sigma0 */
Expand Down

0 comments on commit ba5cc03

Please sign in to comment.