fit_model <- function(test_mean, data, method, method_args){
  default_method_args <- list(formula = test_mean, data = data,
                              na.action = na.fail)
  
  method_args <- combine_lists(method_args, default_method_args)
  
  if(identical(method, "lm") || identical(method, "glm")){
    method_args[["x"]] <- TRUE
    method_args[["y"]] <- TRUE
  }
  
  m <- do.call(get(method), args = method_args)
  
  return(m)
}