Learn R Programming

fastmatrix (version 0.5-7721)

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,135

Version

0.5-7721

License

GPL-3

Maintainer

Felipe Osorio

Last Published

September 6th, 2024

Functions in fastmatrix (0.5-7721)

dupl.cross

Matrix crossproduct envolving the duplication matrix
WH.normal

Wilson-Hilferty transformation for chi-squared variates
corAR1

AR(1) correlation structure
corCS

Compound symmetry correlation structure
cov.MSSD

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

Weighted covariance matrices
comm.info

Compact information to construct the commutation matrix
dupl.info

Compact information to construct the duplication matrix
krylov

Computes a Krylov matrix
cholupdate

Rank 1 update to Cholesky factorization
equilibrate

Equilibration of a rectangular or symmetric matrix
kurtosis

Mardia's multivariate skewness and kurtosis coefficients
is.lower.tri

Check if a matrix is lower or upper triangular
jacobi

Solve linear systems using the Jacobi method
geomean

Geometric mean
commutation

Commutation matrix
hadamard

Hadamard product of two matrices
rball

Generation of deviates uniformly distributed in a unitary ball
frank

Frank matrix
comm.prod

Matrix multiplication envolving the commutation matrix
ldl

The LDL decomposition
ridge

Ridge regression
JarqueBera.test

Jarque-Bera test for univariate normality
kronecker.prod

Kronecker product on matrices
scaled.condition

Scaled condition number
seidel

Solve linear systems using the Gauss-Seidel method
lu-methods

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

The modified Cholesky factorization
vech

Vectorization the lower triangular part of a square matrix
mediancenter

Mediancenter
whitening

Whitening transformation
dupl.prod

Matrix multiplication envolving the duplication matrix
minkowski

Computes the p-norm of a vector
moments

Central moments
ols.fit

Fitter functions for linear models
matrix.inner

Compute the inner product between two rectangular matrices
matrix.norm

Compute the norm of a rectangular matrix
duplication

Duplication matrix
harris.test

Test for variance homogeneity of correlated variables
helmert

Helmert matrix
symm.info

Compact information to construct the symmetrizer matrix
symm.prod

Matrix multiplication envolving the symmetrizer matrix
lu

The LU factorization of a square matrix
lu2inv

Inverse from LU factorization
ols

Fit linear regression model
rmnorm

Multivariate normal random deviates
ols.fit-methods

Fit a linear model
symmetrizer

Symmetrizer matrix
vec

Vectorization of a matrix
rsphere

Generation of deviates uniformly located on a spherical surface
power.method

Power method to approximate dominant eigenvalue and eigenvector
sherman.morrison

Sherman-Morrison formula
sweep.operator

Gauss-Jordan sweep operator for symmetric matrices
wilson.hilferty

Wilson-Hilferty transformation
array.mult

Array multiplication
asSymmetric

Force a matrix to be symmetric
Mahalanobis

Mahalanobis distance
bezier

Computation of Bezier curve
cg

Solve linear systems using the conjugate gradients method
bracket.prod

Bracket product
circulant

Form a symmetric circulant matrix