Learn R Programming

⚠️There's a newer version (0.6-4) of this package.Take me there.

fastmatrix (version 0.5-77)

Fast Computation of some Matrices Useful in Statistics

Description

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 chi squared variables. Furthermore, the package provides interfaces to C code callable by another C code from other R packages.

Copy Link

Version

Install

install.packages('fastmatrix')

Monthly Downloads

3,021

Version

0.5-77

License

GPL-3

Maintainer

Felipe Osorio

Last Published

December 7th, 2023

Functions in fastmatrix (0.5-77)

Mahalanobis

Mahalanobis distance
circulant

Form a symmetric circulant matrix
cov.weighted

Weighted covariance matrices
dupl.cross

Matrix crossproduct envolving the duplication matrix
array.mult

Array multiplication
commutation

Commutation matrix
cholupdate

Rank 1 update to Cholesky factorization
corAR1

AR(1) correlation structure
corCS

Compound symmetry correlation structure
lu-methods

Reconstruct the L, U, or X matrices from an LU object
cov.MSSD

Mean Square Successive Difference (MSSD) estimator of the covariance matrix
cg

Solve linear systems using the conjugate gradients method
lu

The LU factorization of a square matrix
rsphere

Generation of deviates uniformly located on a spherical surface
scaled.condition

Scaled condition number
frank

Frank matrix
duplication

Duplication matrix
geomean

Geometric mean
symm.info

Compact information to construct the symmetrizer matrix
moments

Central moments
kronecker.prod

Kronecker product on matrices
dupl.info

Compact information to construct the duplication matrix
jacobi

Solve linear systems using the Jacobi method
dupl.prod

Matrix multiplication envolving the duplication matrix
vec

Vectorization of a matrix
kurtosis

Mardia's multivariate skewness and kurtosis coefficients
helmert

Helmert matrix
equilibrate

Equilibration of a rectangular or symmetric matrix
ldl

The LDL decomposition
JarqueBera.test

Jarque-Bera test for univariate normality
seidel

Solve linear systems using the Gauss-Seidel method
vech

Vectorization the lower triangular part of a square matrix
whitening

Whitening transformation
sweep.operator

Gauss-Jordan sweep operator for symmetric matrices
hadamard

Hadamard product of two matrices
krylov

Computes a Krylov matrix
harris.test

Test for variance homogeneity of correlated variables
is.lower.tri

Check if a matrix is lower or upper triangular
mediancenter

Mediancenter
matrix.norm

Compute the norm of a rectangular matrix
mchol

The modified Cholesky factorization
minkowski

Computes the p-norm of a vector
lu2inv

Inverse from LU factorization
matrix.inner

Compute the inner product between two rectangular matrices
ridge

Ridge regression
ols.fit-methods

Fit a linear model
ols.fit

Fitter functions for linear models
rmnorm

Multivariate normal random deviates
power.method

Power method to approximate dominant eigenvalue and eigenvector
ols

Fit linear regression model
wilson.hilferty

Wilson-Hilferty transformation
rball

Generation of deviates uniformly distributed in a unitary ball
symm.prod

Matrix multiplication envolving the symmetrizer matrix
symmetrizer

Symmetrizer matrix
sherman.morrison

Sherman-Morrison formula
asSymmetric

Force a matrix to be symmetric
bracket.prod

Bracket product
bezier

Computation of Bezier curve
comm.info

Compact information to construct the commutation matrix
comm.prod

Matrix multiplication envolving the commutation matrix