docstr: Rotation towards target matrix example
  http://www.stat.ucla.edu/research/gpa
docstr_tok: ["Rotation","towards","target","matrix","example","http",":","\/\/www.stat.ucla.edu\/research\/gpa"]
code: def test_orthogonal_target(self):
      """
      Rotation towards target matrix example
      http://www.stat.ucla.edu/research/gpa
      """
      A = self.get_A()
      H = self.str2matrix(
          """
            .8 -.3
            .8 -.4
            .7 -.4
            .9 -.4
            .8  .5
            .6  .4
            .5  .4
            .6  .3
          """
      )
      vgQ = lambda L=None, A=None, T=None: vgQ_target(H, L=L, A=A, T=T)
      L, phi, T, table = GPA(A, vgQ=vgQ, rotation_method="orthogonal")
      table_required = self.str2matrix(
          """
          0.00000   0.05925  -0.61244   1.00000
          1.00000   0.05444  -1.14701   0.12500
          2.00000   0.05403  -1.68194   0.12500
          3.00000   0.05399  -2.21689   0.12500
          4.00000   0.05399  -2.75185   0.12500
          5.00000   0.05399  -3.28681   0.12500
          6.00000   0.05399  -3.82176   0.12500
          7.00000   0.05399  -4.35672   0.12500
          8.00000   0.05399  -4.89168   0.12500
          9.00000   0.05399  -5.42664   0.12500
          """
      )
      L_required = self.str2matrix(
          """
          0.84168  -0.37053
          0.83191  -0.44386
          0.79096  -0.44611
          0.80985  -0.37650
          0.77040   0.52371
          0.65774   0.47826
          0.58020   0.46189
          0.63656   0.35255
          """
      )
      self.assertTrue(np.allclose(table, table_required, atol=1e-05))
      self.assertTrue(np.allclose(L, L_required, atol=1e-05))
      ff = lambda L=None, A=None, T=None: ff_target(H, L=L, A=A, T=T)
      L2, phi, T2, table = GPA(A, ff=ff, rotation_method="orthogonal")
      self.assertTrue(np.allclose(L, L2, atol=1e-05))
      self.assertTrue(np.allclose(T, T2, atol=1e-05))
      vgQ = lambda L=None, A=None, T=None: vgQ_target(
          H, L=L, A=A, T=T, rotation_method="oblique"
      )
      L, phi, T, table = GPA(A, vgQ=vgQ, rotation_method="oblique")
      ff = lambda L=None, A=None, T=None: ff_target(
          H, L=L, A=A, T=T, rotation_method="oblique"
      )
      L2, phi, T2, table = GPA(A, ff=ff, rotation_method="oblique")
      self.assertTrue(np.allclose(L, L2, atol=1e-05))
      self.assertTrue(np.allclose(T, T2, atol=1e-05))
  
imports: import unittest
  import numpy
  from statsmodels.multivariate.factor_rotation._wrappers import rotate_factors
  from statsmodels.multivariate.factor_rotation._gpa_rotation import ff_partial_target, vgQ_partial_target, ff_target, vgQ_target, CF_objective, orthomax_objective, oblimin_objective, GPA
  from statsmodels.multivariate.factor_rotation._analytic_rotation import target_rotation
label_desc: Use image node_id 9 for calling the TestGPARotation obj's underlying member method code with example usage: obj.test_orthogonal_target() without return types