Skip to content

Commit

Permalink
version 1.2-3
Browse files Browse the repository at this point in the history
  • Loading branch information
thothorn authored and cran-robot committed Aug 25, 2023
1 parent 3077f0b commit 77fe6e2
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 26 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mvtnorm
Title: Multivariate Normal and t Distributions
Version: 1.2-2
Date: 2023-06-05
Version: 1.2-3
Date: 2023-08-17
Authors@R: c(person("Alan", "Genz", role = "aut"),
person("Frank", "Bretz", role = "aut"),
person("Tetsuhisa", "Miwa", role = "aut"),
Expand All @@ -24,7 +24,7 @@ Suggests: qrng, numDeriv
License: GPL-2
URL: http://mvtnorm.R-forge.R-project.org
NeedsCompilation: yes
Packaged: 2023-06-07 14:41:38 UTC; hothorn
Packaged: 2023-08-17 08:50:49 UTC; hothorn
Author: Alan Genz [aut],
Frank Bretz [aut],
Tetsuhisa Miwa [aut],
Expand All @@ -36,4 +36,4 @@ Author: Alan Genz [aut],
Torsten Hothorn [aut, cre] (<https://orcid.org/0000-0001-8301-0471>)
Maintainer: Torsten Hothorn <[email protected]>
Repository: CRAN
Date/Publication: 2023-06-08 14:50:02 UTC
Date/Publication: 2023-08-25 14:00:02 UTC
20 changes: 10 additions & 10 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
b02d3ce872a7d644944041e7a92baa0e *DESCRIPTION
a5d77427b67c188957fd7259ed1ade08 *DESCRIPTION
ecd520a67763973a40e5a108897d4f5e *NAMESPACE
95cc7a63663de9d9db50eeb7f6b7f3cc *R/lpmvnorm.R
eec923c2eaf99726daace26a751b8820 *R/ltMatrices.R
a50d041a8243c78c469af528c7a442d7 *R/mvnorm.R
ca05e05ca25ae52b9a8630f2b698fbf7 *R/mvnorm.R
d6fa00cf2de3de94137a324751c699b5 *R/mvt.R
ccd0495f9e9ad30e9f136c5c41cc3a03 *R/noisy-root.R
a58509a76c614fea41250fa767c64a49 *R/tvpack.R
27c3aaad12021a6f55ad66e95df0bab1 *build/partial.rdb
ea778b6ace9c492d13b6cb800ddfe4c9 *build/vignette.rds
debfc95751f416820ca31da3641b3023 *build/partial.rdb
ffa86b244700c8b7d3b929849d93906f *build/vignette.rds
5d3f52c685942a64b550023c19179ddb *cleanup
2a44eee6dc12d03d74f49d257fe871a3 *inst/CITATION
ceb9f3d20b3e0f3ecd95cefd43449da1 *inst/C_API_Example/DESCRIPTION
ca4c35956e7a8aa253e2c52cd49f0d99 *inst/C_API_Example/NAMESPACE
990127bb625b41c7181a653020e3f6a9 *inst/C_API_Example/R/test.R
5c4bbffc1a0108c090cfa2dbb1918d2d *inst/C_API_Example/src/test.c
64fd633725dcd93cdd836e3535f19788 *inst/C_API_Example/tests/test.R
6c348aa2035fca5c8cfe8812d1690552 *inst/NEWS.Rd
9541515ac76c4e6eaf79b65ed03f3865 *inst/NEWS.Rd
c272376114253739752bd13c5eb43cb9 *inst/NEWS.old
73e21a346386350ffebe0b09cafa5ad5 *inst/doc/MVT_Rnews.R
e83251e0ceb0e3a2aec9f3d101e41ea6 *inst/doc/MVT_Rnews.Rnw
0d2f6f5dcd3469c27688a88288bf7db5 *inst/doc/MVT_Rnews.pdf
5f880e37472b0990b69d414acaf25859 *inst/doc/MVT_Rnews.pdf
69479718cce50658d8d5853b25aa8906 *inst/doc/lmvnorm_src.R
723c4102000e9ae408427caad6251acb *inst/doc/lmvnorm_src.Rnw
1a6dcc1acad4e2bfc3272d345c4bbdbe *inst/doc/lmvnorm_src.pdf
d09a3cf2f03837f937f901b8ddd5366d *inst/doc/lmvnorm_src.pdf
e4eae4bc2b387ca2f05f31186261d431 *inst/include/mvtnorm.h
2ac853ab98c7223bbca7e418096966fb *inst/include/mvtnormAPI.h
a8bf3b0a605ca47e04cf69f15dba76b7 *inst/litdb.bib
48f9849d54f39ac94ef6e4a885222e2e *man/Mvnorm.Rd
48d06df1c0ede2af2082380f04f109a0 *man/Mvnorm.Rd
aeea1ca8a79e11a6bc318f348e568e69 *man/Mvt.Rd
9c7f78f788a715989e00991bac0534df *man/algorithms.Rd
eedaca8ee45ebcc103df9269348636dc *man/lpmvnorm.Rd
Expand All @@ -43,11 +43,11 @@ c0e5ecc21173046ba5cf98a12b16599c *src/lpmvnorm.c
47c47d527ea29729305f11c1468abe94 *src/ltMatrices.c
62f4d884327d0b95c0dd1dea23eff5b4 *src/miwa.c
b46cb432899a2857561790e63a41396a *src/miwa.h
2b69721a3badea1cdf161f62f9dd7ec0 *src/mvt.f
b9866a363a76d1fa0ae89a5d88142379 *src/mvt.f
8c4b7e4643cb9f20f61b4752bf4af136 *src/mvtnorm-init.c
e4eae4bc2b387ca2f05f31186261d431 *src/mvtnorm.h
2ac853ab98c7223bbca7e418096966fb *src/mvtnormAPI.h
403b93bd14592201794df6a0a6a2aac6 *src/tvpack.f
866e839b3972fe5c50d7e3787b6fc1ca *src/tvpack.f
a8da8d6e8672b1078e8bd4b93fb61938 *tests/Examples/mvtnorma-Ex.Rout.save
8577b286912ff81f7db670aed3024ba4 *tests/bugfix-tests.R
06757030c4ee95433f5b2af1623cbe73 *tests/bugfix-tests.Rout.save
Expand Down
5 changes: 3 additions & 2 deletions R/mvnorm.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# $Id: mvnorm.R 557 2023-04-24 18:16:23Z thothorn $
# $Id: mvnorm.R 601 2023-07-13 09:37:47Z thothorn $

rmvnorm <- function(n, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)),
method=c("eigen", "svd", "chol"), pre0.9_9994 = FALSE, checkSymmetry = TRUE)
method=c("eigen", "svd", "chol"), pre0.9_9994 = FALSE, checkSymmetry = TRUE,
rnorm = stats::rnorm)
{

if (checkSymmetry && !isSymmetric(sigma, tol = sqrt(.Machine$double.eps),
Expand Down
Binary file modified build/partial.rdb
Binary file not shown.
Binary file modified build/vignette.rds
Binary file not shown.
17 changes: 16 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@
\name{NEWS}
\title{NEWS file for the \pkg{mvtnorm} package}

\section{Changes in Version 1.2-2 (2023-06-05)}{
\section{Changes in Version 1.2-3 (2023-08-17)}{
\subsection{Features}{
\itemize{
\item Allow to change \code{rnorm} in \code{rmvnorm}, feature request
by Ralf Stubner.
}
}
\subsection{Bugfixes}{
\itemize{
\item Fix variable declarations in \code{tvpack.f} as reported by Intel
compilers icx/ipcx/ifx from oneAPI 2023.2.0 and oneMKL 2023.2.0, thanks to BDR
}
}
}

\section{Changes in Version 1.2-2 (2023-06-07)}{
\subsection{Bugfixes}{
\itemize{
\item Fix overflow problem reported by ASAN.
Expand Down
Binary file modified inst/doc/MVT_Rnews.pdf
Binary file not shown.
Binary file modified inst/doc/lmvnorm_src.pdf
Binary file not shown.
5 changes: 4 additions & 1 deletion man/Mvnorm.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
dmvnorm(x, mean = rep(0, p), sigma = diag(p), log = FALSE, checkSymmetry = TRUE)
rmvnorm(n, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)),
method=c("eigen", "svd", "chol"), pre0.9_9994 = FALSE,
checkSymmetry = TRUE)
checkSymmetry = TRUE, rnorm = stats::rnorm)
}
\arguments{
\item{x}{vector or matrix of quantiles. When \code{x} is a matrix, each
Expand Down Expand Up @@ -40,6 +40,9 @@ rmvnorm(n, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)),
covariance matrix is symmetric or not. This will speed up the
computation but may cause unexpected outputs when ill-behaved
\code{sigma} is provided. The default value is \code{TRUE}.}
\item{rnorm}{a function with the same interface as
\code{\link[stats]{rnorm}}. This allows switching to other generators of
standard normal variables.}
}
\details{
\code{dmvnorm} computes the density function of the multivariate normal
Expand Down
21 changes: 16 additions & 5 deletions src/mvt.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*
* $Id: mvt.f 575 2023-05-23 08:16:23Z thothorn $
* $Id: mvt.f 603 2023-08-17 06:39:20Z thothorn $
*
SUBROUTINE MVTDST( N, NU, LOWER, UPPER, INFIN, CORREL, DELTA,
& MAXPTS, ABSEPS, RELEPS, ERROR, VALUE, INFORM )
Expand Down Expand Up @@ -83,11 +83,18 @@ SUBROUTINE MVTDST( N, NU, LOWER, UPPER, INFIN, CORREL, DELTA,

END
*
SUBROUTINE MVSUBR( N, W, NF, F )
SUBROUTINE MVSUBR( N, W, F )
*
* Integrand subroutine
*
INTEGER N, NF, NUIN, INFIN(*), NL
*
* Note that this was originally defined as
* SUBROUTINE MVSUBR( N, W, NF, F )
* but Intel compilers icx/ipcx/ifx from oneAPI 2023.2.0 and oneMKL 2023.2.0
* reported NF as being unused. Removed NF from MVSUBR and later calls to FUNSUB
* 2023/08/17
*
INTEGER N, NUIN, INFIN(*), NL
DOUBLE PRECISION W(*),F(*), LOWER(*),UPPER(*), CORREL(*), DELTA(*)
PARAMETER ( NL = 1000 )
INTEGER INFI(NL), NU, ND, INFORM, NY
Expand Down Expand Up @@ -967,6 +974,8 @@ SUBROUTINE MVKBRV( NDIM, MINVLS, MAXVLS, NF, FUNSUB,
* FUNSUB EXTERNALly declared user defined integrand subroutine.
* It must have parameters ( NDIM, Z, NF, FUNVLS ), where
* Z is a real NDIM-vector and FUNVLS is a real NF-vector.
* TH NOTE: arg NF was removed because it was unused, see MVSUBR
* definition
*
* ABSEPS Required absolute accuracy.
* RELEPS Required relative accuracy.
Expand Down Expand Up @@ -1228,14 +1237,16 @@ SUBROUTINE MVKRSV( NDIM,KL,VALUES,PRIME,VK, NF,FUNSUB, X,R,PR,FS )
IF ( R(J) .GT. 1 ) R(J) = R(J) - 1
X(J) = ABS( 2*R(J) - 1 )
END DO
CALL FUNSUB( NDIM, X, NF, FS )
CALL FUNSUB( NDIM, X, FS )
* This was FUNSUB( NDIM, X, NF, FS )
DO J = 1, NF
VALUES(J) = VALUES(J) + ( FS(J) - VALUES(J) )/( 2*K-1 )
END DO
DO J = 1, NDIM
X(J) = 1 - X(J)
END DO
CALL FUNSUB( NDIM, X, NF, FS )
CALL FUNSUB( NDIM, X, FS )
* This was FUNSUB( NDIM, X, NF, FS )
DO J = 1, NF
VALUES(J) = VALUES(J) + ( FS(J) - VALUES(J) )/( 2*K )
END DO
Expand Down
6 changes: 3 additions & 3 deletions src/tvpack.f
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ SUBROUTINE TVTLRCALL( NU, H, R, EPSI, TVTL )
EXTERNAL TVTMFN, ADONET, BVTL
INTEGER NU, NUC
DOUBLE PRECISION H(3), H1, H2, H3, R(3), R12, R13, R23, EPSI
DOUBLE PRECISION ONE, ZRO, EPS, ZROS(3), HS(3), TVT, TVTL
DOUBLE PRECISION RUA, RUB, AR, RUC, PT, BVTL, PHID, ADONET
DOUBLE PRECISION ONE, ZRO, EPS, TVT, TVTL
DOUBLE PRECISION RUA, RUB, AR, RUC, PT, BVTL, PHID, ADONET, TVTMFN
PARAMETER ( ZRO = 0, ONE = 1 )
COMMON /TVTMBK/ H1, H2, H3, R23, RUA, RUB, AR, RUC, NUC
EPS = MAX( 1D-14, EPSI )
Expand Down Expand Up @@ -367,7 +367,7 @@ DOUBLE PRECISION FUNCTION BVTL( NU, DH, DK, R )
DOUBLE PRECISION GMPH, GMPK, XNKH, XNHK, QHRK, HKN, HPK, HKRN
DOUBLE PRECISION BTNCKH, BTNCHK, BTPDKH, BTPDHK, ONE, EPS
PARAMETER ( ONE = 1, EPS = 1D-15 )
IF ( NU .LE. 0 ) THEN ! NU == 0 (<==> nu = Inf <==> normal distrib
IF ( NU .LE. 0 ) THEN ! NU == 0 means normal distr
BVTL = BVND( -DH, -DK, R )
ELSE IF ( 1 - R .LE. EPS ) THEN
BVTL = STUDNT( NU, MIN( DH, DK ) )
Expand Down

0 comments on commit 77fe6e2

Please sign in to comment.