code: def test_ged(self, seed):
      dist = GeneralizedError(seed=seed)
      nu = 1.7
      ll1 = dist.loglikelihood(np.array([nu]), self.resids, self.sigma2)
  
      sigma = np.sqrt(self.sigma2)
      x = self.resids
  
      c = (2 ** (-2 / nu) * gamma(1 / nu) / gamma(3 / nu)) ** 0.5
      pdf = nu / (c * gamma(1 / nu) * 2 ** (1 + 1 / nu) * sigma)
      pdf *= np.exp(-(1 / 2) * np.abs(x / (c * sigma)) ** nu)
      ll2 = np.log(pdf).sum()
      assert_almost_equal(ll1, ll2)
      lls1 = dist.loglikelihood(
          np.array([nu]), self.resids, self.sigma2, individual=True
      )
      assert_almost_equal(lls1, np.log(pdf))
  
      assert_equal(dist.num_params, 1)
  
      bounds = dist.bounds(self.resids)
      assert_equal(len(bounds), 1)
  
      a, _ = dist.constraints()
      assert_equal(a.shape, (2, 1))
  
      assert_array_equal(
          dist.starting_values(self.resids), np.array([1.5])
      )
  
      with pytest.raises(ValueError):
          dist.simulate(np.array([0.9]))
      simulator = dist.simulate(1.5)
      rvs = simulator(1000)
      assert rvs.shape[0] == 1000
      assert str(hex(id(dist))) in dist.__repr__()
      assert dist.parameter_names() == ["nu"]
  
file_path: arch/arch/tests/univariate/test_distribution.py
imports: import numpy
  from numpy.random import RandomState, default_rng
  from numpy.testing import assert_almost_equal, assert_array_equal, assert_equal
  import pytest
  from scipy.special import gamma, gammaln
  import scipy.stats
  from arch.univariate.distribution import GeneralizedError, Normal, SkewStudent, StudentsT
label_desc: Use image node_id 5 for calling the TestDistributions obj's underlying member method code with example usage: obj.test_ged(seed) without return types