Package: fastmatrix 0.5-772

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.pdf |fastmatrix.html
fastmatrix/json (API)

# Install fastmatrix in R:
install.packages('fastmatrix', repos = c('', ''))

Peer review:

Bug tracker:

Uses libs:
  • openblas– Optimized BLAS



72 exports 17 stars 3.64 score 0 dependencies 18 dependents

Last updated 5 months agofrom:2393c30b57d94f05ad6a5e09b1ebed1811690c9c



Readme and manuals

Help Manual

Help pageTopics
Array multiplicationarray.mult
Force a matrix to be symmetricasSymmetric
Computation of Bezier curvebezier
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
Matrix multiplication envolving the commutation
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
Matrix multiplication envolving the duplication
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
Computes a Krylov matrixkrylov
Mardia's multivariate skewness and kurtosis coefficientskurtosis skewness
The LDL decompositionldl
The LU factorization of a square lu lu.default
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
Computes the p-norm of a vectorminkowski
Central momentsmoments
Fit linear regression modelols
Fitter functions for linear
Fit a linear
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
Matrix multiplication envolving the symmetrizer
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