-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# matrixNormal 0.1.0 2021-Dec-29 - `pmatnorm`: Included argument `keepAttr` to pass to `mvtnorm::pmvtnorm()` v.1.1-2: logical allowing users to attach error and message to the return value. See . - `rmatnorm`: - Added argument `checkSymmetry = FALSE` to `mvtnorm::rmvnorm()` as the matrices are already checked for symmetry. See . - U and V are incorrectly switched, (thanks, @prockenschaub, <#1>) - Added warning to earlier versions of R - Changed reference cited. - Made argument method clearer - Documentation clarification, thanks \#1 # matrixNormal 0.0.5 2021-Apr-1 ## Bug Fixes - Minor Change: Changed lazy data to FALSE in description file to remove notes on CRAN check in R 4.0.5. # matrixNormal 0.0.4 2020-08-26 - New `vech()` function: performs half-vectorization on a symmetric matrix. This is the vector-form of the lower triangular matrix only. Unlike other functions on CRAN, vech() inherits any names from the matrix. ## Bug Fixes - `dmatrixnorm`: Clarified by replacing the name of argument `use.log` with `log` for consistency in argument name with mvtnorm and stats package. - `is.symmetric()`, `is.positive.definite()`, `is.positive.semi.definite()`: - if A is not symmetric, these functions NOW return FALSE instead of stopping the function. Restructured helper `find.eval()`. - if A contains a missing value (`NA`), these functions NOW return NA. - `rmatrixnorm`: Added the first argument `s` to draw many random samples. Only 1 sample is still drawn; the argument currently has no effect but acts as a placeholder in future releases. - Clarified documentation. - Added session information and version details to the vignette. The updated versions of the packages listed do not affect the results of matrixNormal functions.
- Loading branch information
1 parent
64132e0
commit 466f887
Showing
24 changed files
with
1,872 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
Package: matrixNormal | ||
Version: 0.0.1 | ||
Date: 2019-05-22 | ||
Version: 0.0.5 | ||
Type: Package | ||
Title: The Matrix Normal Distribution | ||
Authors@R: person("Paul", "Hargarten", email = "hargartenp@vcu.edu", role = c("aut", "cre")) | ||
Depends: R (>= 3.5.0) | ||
Imports: | ||
mvtnorm (>= 1.0.8), | ||
utils (>= 3.5.0) | ||
Suggests: | ||
matrixcalc (>= 1.0.3), | ||
roxygen2, | ||
stats (>= 3.5.0), | ||
spelling, | ||
testthat (>= 2.0.1), | ||
knitr, | ||
rmarkdown | ||
Authors@R: person("Paul M.", "Hargarten", email = "hargartenp@vcu.edu", role = c("aut", "cre")) | ||
Depends: R (>= 3.5.0), stats, utils | ||
Imports: mvtnorm (>= 1.0.8) | ||
Suggests: | ||
formatR, | ||
knitr, | ||
LaplacesDemon (>= 16.1.1), | ||
matrixcalc (>= 1.0-3), | ||
matrixsampling (>= 1.1.0), | ||
MBSP (>= 1.0), | ||
rmarkdown, | ||
roxygen2, | ||
sessioninfo, | ||
spelling, | ||
testthat | ||
Description: Computes densities, probabilities, and random deviates of the Matrix Normal (Iranmanesh et al. (2010) <doi:10.7508/ijmsi.2010.02.004>). Also includes simple but useful matrix functions. See the vignette for more information. | ||
License: GPL-3 | ||
Encoding: UTF-8 | ||
LazyData: true | ||
LazyData: false | ||
BugReports: https://github.com/phargarten2/matrixNormal/issues | ||
RoxygenNote: 6.1.1 | ||
RoxygenNote: 7.1.1 | ||
Language: en-US | ||
VignetteBuilder: knitr |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
output: github_document | ||
--- | ||
# matrixNormal 0.1.0 2021-Dec-29 | ||
|
||
* `pmatnorm`: Included argument `keepAttr` to pass to `mvtnorm::pmvnorm()` v.1.1-2: logical allowing users to attach error and message to the return value. | ||
|
||
* `rmatnorm`: | ||
+ Added argument `checkSymmetry = FALSE` to `mvtnorm::rmvnorm()` as the matrices are already checked for symmetry. | ||
+ U and V are incorrectly switched, (thanks, @prockenschaub, https://github.com/phargarten2/matrixNormal/issues/1) | ||
- Added warning to earlier versions of R | ||
- Changed reference cited. | ||
- Made argument method clearer | ||
|
||
* Documentation clarification, thanks @1 | ||
|
||
* Vignette clarification, thanks @#1. | ||
|
||
# matrixNormal 0.0.5 2021-Apr-1 | ||
|
||
## Bug Fixes | ||
* Minor Change: Changed lazy data to FALSE in description file to remove notes on CRAN check in R 4.0.5. | ||
|
||
# matrixNormal 0.0.4 2020-08-26 | ||
* New `vech()` function: performs half-vectorization on a symmetric matrix. This is the vector-form of the lower triangular matrix only. Unlike other functions on CRAN, vech() inherits any names from the matrix. | ||
|
||
## Bug Fixes | ||
* `dmatrixnorm`: Clarified by replacing the name of argument `use.log` with `log` for consistency in argument name with mvtnorm and stats package. | ||
* `is.symmetric()`, `is.positive.definite()`, `is.positive.semi.definite()`: | ||
+ if A is not symmetric, these functions NOW return FALSE instead of stopping the function. Restructured helper `find.eval()`. | ||
+ if A contains a missing value (`NA`), these functions NOW return NA. | ||
* `rmatrixnorm`: Added the first argument `s` to draw many random samples. Only 1 sample is still drawn; the argument currently has no effect but acts as a placeholder in future releases. | ||
* Clarified documentation. | ||
* Added session information and version details to the vignette. The updated versions of the packages listed do not affect the results of matrixNormal functions. | ||
|
||
|
||
# matrixNormal 0.0.2 2019-12-5 | ||
* The documentation is clarified. | ||
* Submitted to CRAN but failed to be released. | ||
|
||
# matrixNormal 0.0.1 2019-07-09 | ||
* Vignette is added, replacing the package R file. Included the use and uniqueness of matrixNormal distribution. Also included an example that uses the package. Added additional packages to be imported in Documentation. | ||
* Documentation clarified. | ||
* Minor Changes in Examples: | ||
** Changed order of examples in rmatnorm() for reproducibility | ||
** Made clearer in using the dataset package in pmatnorm() example | ||
** Removed installation of matrixcalc package in is.symmetric.matrix examples. | ||
* `is.positive.definite()`, `is.positive.semi.definite()` returns NA if the matrix contains missing value (bug fix). | ||
* `pmatnorm()`, `dmatnorm()`, `rmatnorm()` now throws error if the parameters of the matrix Normal Distribution `M`, `U`, or `V` contain any missing values. | ||
* `rmatnorm()` now returns a matrix with rownames from U and the colnames from V. | ||
* In `rmatnorm()`, `pre0.9_9994` that was passed from `rmvnorm()` function in **mvtnorm library** is removed, because it is not needed. This argument was introduced in mvtnorm library to fix a bug in version 0.9-9993, but matrixNormal uses a version of at least 1.0.8. This argument is just not needed, and if pre0.9_9994 is set to TRUE, nothing will happen. | ||
|
||
# matrixNormal 0.0.0.9000 | ||
* This is a new submission. | ||
* Added a `NEWS.md` file to track changes to the package. | ||
* First Release of the Package | ||
* Successfully passed windows check. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,88 @@ | ||
# matrixNormal 0.0.1 | ||
* Documentation updates: ADDED vignette, removed package R file. Included the use and uniqueness of matrixNormal distribution. Also included an example that uses the package. Added datasets package to be imported in Documentation. | ||
* is_symmetric() | ||
* rmatnorm(): Removed argument pre0.9_9994 that was passed from rmvnorm() function in mvtnorm library. This argument was introduced in mvtnorm library to fix a bug in version 0.9-9993, but matrixNormal uses the version at least 1.0.8. This argument simply is not needed. The origin of this argument was to fix bug in the mvtnorm library, but matrixNormal uses a version of mvtnorm library greater than update. This argument is just not needed, and if pre0.9_9994 is set to TRUE, nothing will happen. | ||
* pmatnorm(), dmatnorm(), rmatnorm(): Added error if parameters of the matrix Normal Distribution -- M, U, or V -- contain any missing values. This makes the issue clearer to the user, but the function couldn't run anyway) | ||
* rmatnorm() now returns a matrix with rownames from U and the colnames from V. | ||
|
||
* Minor Changes in Examples | ||
** Changed order of examples in rmatnorm() for reproducibility | ||
** Made clearer in using the dataset package in pmatnorm() example | ||
** Removed installation of matrixcalc package in is.symmetric.matrix examples. | ||
# matrixNormal 0.1.0 2021-Dec-29 | ||
|
||
- `pmatnorm`: Included argument `keepAttr` to pass to | ||
`mvtnorm::pmvtnorm()` v.1.1-2: logical allowing users to attach | ||
error and message to the return value. See . | ||
|
||
- `rmatnorm`: | ||
|
||
- Added argument `checkSymmetry = FALSE` to `mvtnorm::rmvnorm()` | ||
as the matrices are already checked for symmetry. See . | ||
- U and V are incorrectly switched, (thanks, @prockenschaub, | ||
<https://github.com/phargarten2/matrixNormal/issues/1>) | ||
- Added warning to earlier versions of R | ||
- Changed reference cited. | ||
- Made argument method clearer | ||
|
||
- Documentation clarification, thanks \#1 | ||
|
||
# matrixNormal 0.0.5 2021-Apr-1 | ||
|
||
## Bug Fixes | ||
|
||
- Minor Change: Changed lazy data to FALSE in description file to | ||
remove notes on CRAN check in R 4.0.5. | ||
|
||
# matrixNormal 0.0.4 2020-08-26 | ||
|
||
- New `vech()` function: performs half-vectorization on a symmetric | ||
matrix. This is the vector-form of the lower triangular matrix only. | ||
Unlike other functions on CRAN, vech() inherits any names from the | ||
matrix. | ||
|
||
## Bug Fixes | ||
|
||
- `dmatrixnorm`: Clarified by replacing the name of argument `use.log` | ||
with `log` for consistency in argument name with mvtnorm and stats | ||
package. | ||
- `is.symmetric()`, `is.positive.definite()`, | ||
`is.positive.semi.definite()`: | ||
- if A is not symmetric, these functions NOW return FALSE instead | ||
of stopping the function. Restructured helper `find.eval()`. | ||
- if A contains a missing value (`NA`), these functions NOW return | ||
NA. | ||
- `rmatrixnorm`: Added the first argument `s` to draw many random | ||
samples. Only 1 sample is still drawn; the argument currently has no | ||
effect but acts as a placeholder in future releases. | ||
- Clarified documentation. | ||
- Added session information and version details to the vignette. The | ||
updated versions of the packages listed do not affect the results of | ||
matrixNormal functions. | ||
|
||
# matrixNormal 0.0.2 2019-12-5 | ||
|
||
- The documentation is clarified. | ||
- Submitted to CRAN but failed to be released. | ||
|
||
# matrixNormal 0.0.1 2019-07-09 | ||
|
||
- Vignette is added, replacing the package R file. Included the use | ||
and uniqueness of matrixNormal distribution. Also included an | ||
example that uses the package. Added additional packages to be | ||
imported in Documentation. | ||
- Documentation clarified. | ||
- Minor Changes in Examples: \*\* Changed order of examples in | ||
rmatnorm() for reproducibility \*\* Made clearer in using the | ||
dataset package in pmatnorm() example \*\* Removed installation of | ||
matrixcalc package in is.symmetric.matrix examples. | ||
- `is.positive.definite()`, `is.positive.semi.definite()` returns NA | ||
if the matrix contains missing value (bug fix). | ||
- `pmatnorm()`, `dmatnorm()`, `rmatnorm()` now throws error if the | ||
parameters of the matrix Normal Distribution `M`, `U`, or `V` | ||
contain any missing values. | ||
- `rmatnorm()` now returns a matrix with rownames from U and the | ||
colnames from V. | ||
- In `rmatnorm()`, `pre0.9_9994` that was passed from `rmvnorm()` | ||
function in **mvtnorm library** is removed, because it is not | ||
needed. This argument was introduced in mvtnorm library to fix a bug | ||
in version 0.9-9993, but matrixNormal uses a version of at least | ||
1.0.8. This argument is just not needed, and if pre0.9\_9994 is set | ||
to TRUE, nothing will happen. | ||
|
||
# matrixNormal 0.0.0.9000 | ||
* This is a new submission. | ||
* Added a `NEWS.md` file to track changes to the package. | ||
* First Release of the Package | ||
* Successfully passed windows check. | ||
|
||
|
||
- This is a new submission. | ||
- Added a `NEWS.md` file to track changes to the package. | ||
- First Release of the Package | ||
- Successfully passed windows check. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,37 @@ | ||
#'Generating Special Matrices | ||
#' Generating Special Matrices | ||
#' | ||
#'@family matrix | ||
#'@keywords matrix identity ones | ||
#' @family matrix | ||
#' @keywords matrix identity ones | ||
#' | ||
#'@name special.matrix | ||
#' @name special.matrix | ||
#' | ||
#'@description Creates Identity Matrix I and Matrix of Ones J. | ||
#' @description Creates an Identity Matrix \emph{I} and a Matrix of Ones \emph{J}. \itemize{ | ||
#' \item \code{I}(): Creates an identity matrix where the number of columns is n. This is a diagonal matrix with all equal to one (1). An identity matrix is usually written as \emph{I}. Names of rows and columns (\code{dimnames}) are included. | ||
#' \item \code{J}(): Creates a matrix of ones with any number of rows and columns. Names of rows and columns (\code{dimnames}) are included. | ||
#' } | ||
#' | ||
#'@details | ||
#'Create an Identity Matrix where the number of columns is n. This is a diagonal matrix with all equal to one (1). An identity matrix is usually written as I. To make an identity matrix with r rows and columns, use \code{I}. | ||
#' @param n Number of rows in \emph{I} or \emph{J}. | ||
#' @param m Number of columns in \emph{J}. Default: Same as number of rows. | ||
#' | ||
#'A J matrix is a general matrix of any number of rows and columns, but in which all elements in the matrix are equal to one (1). \code{J} will make a n x m J matrix, given the number or rows, n, and number of columns, m. Names of rows and columns (dimnames) are included. | ||
#' | ||
#'@param n number of rows in I or J. | ||
#'@param m number of columns in J. Default: same as number of rows. | ||
#' | ||
#'@examples | ||
#' #To create an identity matrix of order 12 | ||
#' @examples | ||
#' # To create an identity matrix of order 12 | ||
#' I(2) | ||
#' #To make a matrix of 6 rows and 10 columns of all ones | ||
#' J(6,10) | ||
#' #To make a matrix of unity, dimensions 6 x 6 . | ||
#' # To make a matrix of 6 rows and 10 columns of all ones | ||
#' J(6, 10) | ||
#' # To make a matrix of unity, dimensions 6 x 6. | ||
#' J(6) | ||
|
||
#'@rdname special.matrix | ||
#'@export I | ||
I <- function(n){ | ||
#Identity Matrix where number of columns is n. | ||
#' @rdname special.matrix | ||
#' @export I | ||
I <- function(n) { | ||
# Identity Matrix where number of columns is n. | ||
D <- diag(1, n) | ||
dimnames(D) <- list(1:n, 1:n) | ||
return(D) | ||
} | ||
|
||
#'@rdname special.matrix | ||
#'@export J | ||
J<- function(n, m=n){ | ||
#A matrix of ones with n rows and m columns. | ||
matrix(c(1),nrow=n,ncol=m, dimnames = list(1:n, 1:m)) | ||
#' @rdname special.matrix | ||
#' @export J | ||
J <- function(n, m = n) { | ||
# A matrix of ones with n rows and m columns. | ||
matrix(c(1), nrow = n, ncol = m, dimnames = list(1:n, 1:m)) | ||
} | ||
|
||
|
||
|
Oops, something went wrong.