R/get_coefs.R

Defines functions get_coefs.default get_coefs

#'@importFrom stats coef

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


get_coefs.default = function(model){

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

  if(length(int_index) > 0){
    return(coef(model)[-int_index])
  }else{
    return(coef(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.