R/mySolve.R

# 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 May 2, 2019, 6:33 a.m.