code: def _offset_constraint(r_matrix, params_est, params_alt):
      """offset to the value of a linear constraint for new params
  
      usage:
      (cm, v) is original constraint
  
      vo = offset_constraint(cm, res2.params, params_alt)
      fs = res2.wald_test((cm, v + vo))
      nc = fs.statistic * fs.df_num
  
      """
      diff_est = r_matrix @ params_est
      diff_alt = r_matrix @ params_alt
      return diff_est - diff_alt
  
imports: import numpy
  from scipy.stats import f
  from scipy.stats import t
  from scipy import stats
  from statsmodels.tools.tools import clean0, fullrank
  from statsmodels.stats.multitest import multipletests
label_desc: Use image node_id 8 for calling a global function with example usage: _offset_constraint(r_matrix, params_est, params_alt) and returns: unknown