R/stdEr.maxLik.R

Defines functions stdEr.maxLik

Documented in stdEr.maxLik

stdEr.maxLik <- function(x, eigentol=1e-12, ...) {
   ## if(!inherits(x, "maxLik"))
   ##    stop("'stdEr.maxLik' called on a non-'maxLik' object")
   ## Here we should actually coerce the object to a 'maxLik' object, dropping all the subclasses...
   ## Instead, we force the program to use maxLik-related methods
   if(!is.null(vc <- vcov(x, eigentol=eigentol))) {
      s <- sqrt(diag(vc))
      names(s) <- names(coef(x))
      return(s)
   }
   # if vcov is not working, return NULL
   return(NULL)
}

Try the maxLik package in your browser

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

maxLik documentation built on July 27, 2021, 1:07 a.m.