R/mySolve.R

Defines functions mySolve

Documented in mySolve

# Function to handle singulare matrices in GLARMA runs

mySolve <- function(A) {
  ErrCode <- 0
  Ainv <- try(solve(A), TRUE)
  if (any(is.na(Ainv))){
    ErrCode <- 1
    Ainv <- A
  }
  
  list(Ainv = Ainv, ErrCode = ErrCode)
} 

Try the glarma package in your browser

Any scripts or data that you put into this service are public.

glarma documentation built on Feb. 9, 2018, 6:08 a.m.