code: def generate_nested_linear():
      # Number of clusters (clusters have 10 values, partitioned into 2
      # subclusters of size 5).
      nclust = 200
  
      # Regression coefficients
      beta = np.array([1, -2, 1], dtype=np.float64)
  
      # Top level cluster variance component
      v1 = 1
  
      # Subcluster variance component
      v2 = 0.5
  
      # Error variance component
      v3 = 1.5
  
      p = len(beta)
  
      OUT = open("gee_nested_linear_1.csv", "w", encoding="utf-8")
  
      for i in range(nclust):
          x = np.random.normal(size=(10, p))
          y = np.dot(x, beta)
  
          y += np.sqrt(v1) * np.random.normal()
          y[0:5] += np.sqrt(v2) * np.random.normal()
          y[5:10] += np.sqrt(v2) * np.random.normal()
          y += np.sqrt(v3) * np.random.normal(size=10)
  
          for j in range(10):
              OUT.write("%d, %.3f," % (i, y[j]))
              OUT.write(",".join(["%.3f" % b for b in x[j, :]]) + "\n")
  
      OUT.close()
  
file_path: statsmodels/statsmodels/genmod/tests/results/gee_generate_tests.py
imports: import numpy
  from scipy.stats.distributions import norm
label_desc: Use image node_id 3 for calling a global function with example usage: generate_nested_linear() without return types