Learn R Programming

LRQMM (version 1.2.2)

spginv: Generalized Inverse of a Sparse Matrix

Description

Calucated invesre of the generilzed sparse matrix with sparsesvd function in sparcesvd package and ginv function in MASS package.

Usage

spginv(x)

Arguments

x

a sparse real matrix in Matrix package format

Value

a inverse generalized sparse matrix

Details

see sparsesvd function in sparcesvd package and ginv function in MASS package.

References

[1]Alavian, S. R. (2019). Creating LRQMM package for predicting the breeding value of animals by corrected mixed quantile regression (Unpublished master's thesis). Ferdowsi University Of Mashhad. Mashhad. Iran.[Persian].

Examples

Run this code
# NOT RUN {
M <- rbind(
  c(20, 10, 15,  0,  2),
  c(10,  5,  8,  1,  0),
  c( 0,  1,  2,  6,  3))
M <- Matrix::Matrix(M, sparse=TRUE)
spginv (M)
# }

Run the code above in your browser using DataLab