Learn R Programming

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

fastmatrix (version 0.5-772)

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 gamma 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,981

Version

0.5-772

License

GPL-3

Maintainer

Felipe Osorio

Last Published

January 17th, 2024

Functions in fastmatrix (0.5-772)

comm.info

Compact information to construct the commutation matrix
WH.normal

Wilson-Hilferty transformation for chi-squared variates
comm.prod

Matrix multiplication envolving the commutation matrix
bracket.prod

Bracket product
commutation

Commutation matrix
array.mult

Array multiplication
corAR1

AR(1) correlation structure
dupl.cross

Matrix crossproduct envolving the duplication matrix
asSymmetric

Force a matrix to be symmetric
corCS

Compound symmetry correlation structure
geomean

Geometric mean
dupl.info

Compact information to construct the duplication matrix
dupl.prod

Matrix multiplication envolving the duplication matrix
hadamard

Hadamard product of two matrices
ldl

The LDL decomposition
lu-methods

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

Equilibration of a rectangular or symmetric matrix
duplication

Duplication matrix
cholupdate

Rank 1 update to Cholesky factorization
frank

Frank matrix
JarqueBera.test

Jarque-Bera test for univariate normality
cov.MSSD

Mean Square Successive Difference (MSSD) estimator of the covariance matrix
cov.weighted

Weighted covariance matrices
kronecker.prod

Kronecker product on matrices
rball

Generation of deviates uniformly distributed in a unitary ball
krylov

Computes a Krylov matrix
is.lower.tri

Check if a matrix is lower or upper triangular
kurtosis

Mardia's multivariate skewness and kurtosis coefficients
jacobi

Solve linear systems using the Jacobi method
rmnorm

Multivariate normal random deviates
harris.test

Test for variance homogeneity of correlated variables
matrix.inner

Compute the inner product between two rectangular matrices
ridge

Ridge regression
rsphere

Generation of deviates uniformly located on a spherical surface
matrix.norm

Compute the norm of a rectangular matrix
ols

Fit linear regression model
ols.fit-methods

Fit a linear model
lu

The LU factorization of a square matrix
lu2inv

Inverse from LU factorization
symmetrizer

Symmetrizer matrix
symm.info

Compact information to construct the symmetrizer matrix
helmert

Helmert matrix
sherman.morrison

Sherman-Morrison formula
vec

Vectorization of a matrix
sweep.operator

Gauss-Jordan sweep operator for symmetric matrices
wilson.hilferty

Wilson-Hilferty transformation
symm.prod

Matrix multiplication envolving the symmetrizer matrix
mchol

The modified Cholesky factorization
mediancenter

Mediancenter
ols.fit

Fitter functions for linear models
minkowski

Computes the p-norm of a vector
power.method

Power method to approximate dominant eigenvalue and eigenvector
moments

Central moments
scaled.condition

Scaled condition number
seidel

Solve linear systems using the Gauss-Seidel method
vech

Vectorization the lower triangular part of a square matrix
whitening

Whitening transformation
cg

Solve linear systems using the conjugate gradients method
circulant

Form a symmetric circulant matrix
Mahalanobis

Mahalanobis distance
bezier

Computation of Bezier curve