class_docstr: A class for conducting inference on multivariate means and correlation.
  
  Parameters
  ----------
  endog : ndarray
      Data to be analyzed
  
  Attributes
  ----------
  endog : ndarray
      Data to be analyzed
  
  nobs : float
      Number of observations
class_docstr_tok: ["A","class","for","conducting","inference","on","multivariate","means","and","correlation",".","Parameters","--","--","--","--","--","endog",":","ndarray","Data","to","be","analyzed","Attributes","--","--","--","--","--","endog",":","ndarray","Data","to","be","analyzed","nobs",":","float","Number","of","observations"]
docstr: Returns -2 x log-likelihood ratio and  p-value for the
  correlation coefficient between 2 variables
  
  Parameters
  ----------
  corr0 : float
      Hypothesized value to be tested
  
  return_weights : bool
      If true, returns the weights that maximize
      the log-likelihood at the hypothesized value
docstr_tok: ["Returns","-2","x","log-likelihood","ratio","and","p-value","for","the","correlation","coefficient","between","2","variables","Parameters","--","--","--","--","--","corr0",":","float","Hypothesized","value","to","be","tested","return_weights",":","bool","If","true",",","returns","the","weights","that","maximize","the","log-likelihood","at","the","hypothesized","value"]
code: def test_corr(self, corr0, return_weights=0):
      """
      Returns -2 x log-likelihood ratio and  p-value for the
      correlation coefficient between 2 variables
  
      Parameters
      ----------
      corr0 : float
          Hypothesized value to be tested
  
      return_weights : bool
          If true, returns the weights that maximize
          the log-likelihood at the hypothesized value
      """
      nobs = self.nobs
      endog = self.endog
      if endog.shape[1] != 2:
          raise NotImplementedError(
              "Correlation matrix not yet implemented"
          )
      nuis0 = np.array(
          [
              endog[:, 0].mean(),
              endog[:, 0].var(),
              endog[:, 1].mean(),
              endog[:, 1].var(),
          ]
      )
  
      x0 = np.zeros(5)
      weights0 = np.array([1.0 / nobs] * int(nobs))
      args = (corr0, endog, nobs, x0, weights0)
      llr = optimize.fmin(
          self._opt_correl, nuis0, args=args, full_output=1, disp=0
      )[1]
      p_val = chi2.sf(llr, 1)
      if return_weights:
          return llr, p_val, self.new_weights.T
      return llr, p_val
  
imports: import numpy
  from scipy import optimize
  from scipy.stats import chi2, skew, kurtosis
  from statsmodels.base.optimizer import _fit_newton
  import itertools
  from statsmodels.graphics import utils
label_desc: Use image node_id 4 for calling the DescStatMV obj's underlying member method code with example usage: obj.test_corr(corr0, return_weights) and returns: llr,  p_val, llr,  p_val,  self