Package: fastmatrix 0.5-7721

Felipe Osorio

fastmatrix: Fast Computation of some Matrices Useful in Statistics

Small set of functions to fast computation of some matrices and operations useful in statistics and econometrics. Currently, there are functions for efficient computation of duplication, commutation and symmetrizer matrices with minimal storage requirements. Some commonly used matrix decompositions (LU and LDL), basic matrix operations (for instance, Hadamard, Kronecker products and the Sherman-Morrison formula) and iterative solvers for linear systems are also available. In addition, the package includes a number of common statistical procedures such as the sweep operator, weighted mean and covariance matrix using an online algorithm, linear regression (using Cholesky, QR, SVD, sweep operator and conjugate gradients methods), ridge regression (with optimal selection of the ridge parameter considering several procedures), omnibus tests for univariate normality, functions to compute the multivariate skewness, kurtosis, the Mahalanobis distance (checking the positive defineteness), and the Wilson-Hilferty transformation of gamma variables. Furthermore, the package provides interfaces to C code callable by another C code from other R packages.

Authors:Felipe Osorio [aut, cre], Alonso Ogueda [aut]

fastmatrix_0.5-7721.tar.gz
fastmatrix_0.5-7721.tar.gz(r-4.5-noble)fastmatrix_0.5-7721.tar.gz(r-4.4-noble)
fastmatrix_0.5-7721.tgz(r-4.4-emscripten)fastmatrix_0.5-7721.tgz(r-4.3-emscripten)
fastmatrix.pdf |fastmatrix.html
fastmatrix/json (API)

# Install 'fastmatrix' in R:
install.packages('fastmatrix', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/faosorios/fastmatrix/issues

Uses libs:
  • openblas– Optimized BLAS

fortranopenblas

3.97 score 11 packages 37 scripts 2.5k downloads 72 exports 0 dependencies

Last updated 4 months agofrom:a7a4ce6b5f. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 07 2024
R-4.5-linux-x86_64OKDec 07 2024

Exports:array.multasSymmetricbezierbracket.prodcgcholupdatecirculantcomm.infocomm.prodcommutationconstructXcorAR1corCScov.MSSDcov.weighteddupl.crossdupl.infodupl.prodduplicationequilibrateextractLextractUfrankgeomeanhadamardharris.testhelmertis.lower.triis.luis.upper.trijacobiJarqueBera.testkronecker.prodkrylovkurtosisldllulu.defaultlu2invMahalanobismatrix.innermatrix.normmcholmediancenterminkowskimomentsolsols.fitols.fit.cgols.fit.cholols.fit.qrols.fit.svdols.fit.sweeppower.methodrballridgermnormrspherescaled.conditionseidelsherman.morrisonskewnesssolve.lusweep.operatorsymm.infosymm.prodsymmetrizervecvechWH.normalwhiteningwilson.hilferty

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Array multiplicationarray.mult
Force a matrix to be symmetricasSymmetric
Computation of Bezier curvebezier
Bracket productbracket.prod
Solve linear systems using the conjugate gradients methodcg
Rank 1 update to Cholesky factorizationcholupdate
Form a symmetric circulant matrixcirculant
Compact information to construct the commutation matrixcomm.info
Matrix multiplication envolving the commutation matrixcomm.prod
Commutation matrixcommutation
AR(1) correlation structurecorAR1
Compound symmetry correlation structurecorCS
Mean Square Successive Difference (MSSD) estimator of the covariance matrixcov.MSSD
Weighted covariance matricescov.weighted
Matrix crossproduct envolving the duplication matrixdupl.cross
Compact information to construct the duplication matrixdupl.info
Matrix multiplication envolving the duplication matrixdupl.prod
Duplication matrixduplication
Equilibration of a rectangular or symmetric matrixequilibrate
Frank matrixfrank
Geometric meangeomean
Hadamard product of two matriceshadamard
Test for variance homogeneity of correlated variablesharris.test
Helmert matrixhelmert
Check if a matrix is lower or upper triangularis.lower.tri is.upper.tri
Solve linear systems using the Jacobi methodjacobi
Jarque-Bera test for univariate normalityJarqueBera.test
Kronecker product on matriceskronecker.prod
Computes a Krylov matrixkrylov
Mardia's multivariate skewness and kurtosis coefficientskurtosis skewness
The LDL decompositionldl
The LU factorization of a square matrixis.lu lu lu.default solve.lu
Reconstruct the L, U, or X matrices from an LU objectconstructX extractL extractU
Inverse from LU factorizationlu2inv
Mahalanobis distanceMahalanobis
Compute the inner product between two rectangular matricesmatrix.inner
Compute the norm of a rectangular matrixmatrix.norm
The modified Cholesky factorizationmchol
Mediancentermediancenter
Computes the p-norm of a vectorminkowski
Central momentsmoments
Fit linear regression modelols
Fitter functions for linear modelsols.fit
Fit a linear modelols.fit.cg ols.fit.chol ols.fit.qr ols.fit.svd ols.fit.sweep
Power method to approximate dominant eigenvalue and eigenvectorpower.method
Generation of deviates uniformly distributed in a unitary ballrball
Ridge regressionridge
Multivariate normal random deviatesrmnorm
Generation of deviates uniformly located on a spherical surfacersphere
Scaled condition numberscaled.condition
Solve linear systems using the Gauss-Seidel methodseidel
Sherman-Morrison formulasherman.morrison
Gauss-Jordan sweep operator for symmetric matricessweep.operator
Compact information to construct the symmetrizer matrixsymm.info
Matrix multiplication envolving the symmetrizer matrixsymm.prod
Symmetrizer matrixsymmetrizer
Vectorization of a matrixvec
Vectorization the lower triangular part of a square matrixvech
Wilson-Hilferty transformation for chi-squared variatesWH.normal
Whitening transformationwhitening
Wilson-Hilferty transformationwilson.hilferty