R/get_vcov.R

Defines functions get_vcov.default get_vcov

#'@importFrom stats coef vcov

get_vcov = function(model){
  UseMethod('get_vcov')
}


get_vcov.default = function(model){

  int_index = grep(pattern='(I|i)ntercept', x=names(coef(model)))

  if(length(int_index) > 0){
    return(vcov(model)[-int_index, -int_index])
  }else{
    return(vcov(model))
  }
}

Try the paramhetero package in your browser

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

paramhetero documentation built on April 26, 2022, 1:06 a.m.