code: def test_offset(self):
      np.random.seed(34234)
      time = 50 * np.random.uniform(size=200)
      status = np.random.randint(0, 2, 200).astype(np.float64)
      exog = np.random.normal(size=(200, 4))
  
      for ties in "breslow", "efron":
          mod1 = PHReg(time, exog, status)
          rslt1 = mod1.fit()
          offset = exog[:, 0] * rslt1.params[0]
          exog = exog[:, 1:]
  
          mod2 = PHReg(time, exog, status, offset=offset, ties=ties)
          rslt2 = mod2.fit()
  
          assert_allclose(rslt2.params, rslt1.params[1:])
  
imports: import itertools
  import os
  import numpy
  from statsmodels.duration.hazard_regression import PHReg
  from numpy.testing import assert_allclose, assert_equal, assert_
  import pandas
  import pytest
  from .results import survival_r_results
  from .results import survival_enet_r_results
label_desc: Use image node_id 8 for calling the TestPHReg obj's underlying member method code with example usage: obj.test_offset() without return types