Learn R Programming

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

fastmatrix (version 0.5-7)

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

2,208

Version

0.5-7

License

GPL-3

Maintainer

Felipe Osorio

Last Published

October 12th, 2023

Functions in fastmatrix (0.5-7)

hadamard

Hadamard product of two matrices
harris.test

Test for variance homogeneity of correlated variables
kronecker.prod

Kronecker product on matrices
krylov

Computes a Krylov matrix
geomean

Geometric mean
dupl.info

Compact information to construct the duplication matrix
dupl.prod

Matrix multiplication envolving the duplication matrix
bezier

Computation of Bezier curve
lu2inv

Inverse from LU factorization
matrix.inner

Compute the inner product between two rectangular matrices
frank

Frank matrix
moments

Central moments
minkowski

Computes the p-norm of a vector
ols.fit

Fitter functions for linear models
scaled.condition

Scaled condition number
power.method

Power method to approximate dominant eigenvalue and eigenvector
jacobi

Solve linear systems using the Jacobi method
kurtosis

Mardia's multivariate skewness and kurtosis coefficients
JarqueBera.test

Jarque-Bera test for univariate normality
rsphere

Generation of deviates uniformly located on a spherical surface
rmnorm

Multivariate normal random deviates
ldl

The LDL decomposition
wilson.hilferty

Wilson-Hilferty transformation
mediancenter

Mediancenter
matrix.norm

Compute the norm of a rectangular matrix
symm.info

Compact information to construct the symmetrizer matrix
cov.weighted

Weighted covariance matrices
symm.prod

Matrix multiplication envolving the symmetrizer matrix
seidel

Solve linear systems using the Gauss-Seidel method
rball

Generation of deviates uniformly distributed in a unitary ball
dupl.cross

Matrix crossproduct envolving the duplication matrix
ols

Fit linear regression model
ols.fit-methods

Fit a linear model
vech

Vectorization the lower triangular part of a square matrix
ridge

Ridge regression
whitening

Whitening transformation
symmetrizer

Symmetrizer matrix
vec

Vectorization of a matrix
helmert

Helmert matrix
is.lower.tri

Check if a matrix is lower or upper triangular
lu-methods

Reconstruct the L, U, or X matrices from an LU object
lu

The LU factorization of a square matrix
sherman.morrison

Sherman-Morrison formula
sweep.operator

Gauss-Jordan sweep operator for symmetric matrices
comm.info

Compact information to construct the commutation matrix
asSymmetric

Force a matrix to be symmetric
Mahalanobis

Mahalanobis distance
array.mult

Array multiplication
circulant

Form a symmetric circulant matrix
comm.prod

Matrix multiplication envolving the commutation matrix
cholupdate

Rank 1 update to Cholesky factorization
corAR1

AR(1) correlation structure
cg

Solve linear systems using the conjugate gradients method
corCS

Compound symmetry correlation structure
commutation

Commutation matrix
bracket.prod

Bracket product
cov.MSSD

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

Duplication matrix
equilibrate

Equilibration of a rectangular or symmetric matrix