class_docstr: Factor analysis
  
  Parameters
  ----------
  endog : array_like
      Variables in columns, observations in rows.  May be `None` if
      `corr` is not `None`.
  n_factor : int
      The number of factors to extract
  corr : array_like
      Directly specify the correlation matrix instead of estimating
      it from `endog`.  If provided, `endog` is not used for the
      factor analysis, it may be used in post-estimation.
  method : str
      The method to extract factors, currently must be either 'pa'
      for principal axis factor analysis or 'ml' for maximum
      likelihood estimation.
  smc : True or False
      Whether or not to apply squared multiple correlations (method='pa')
  endog_names : str
      Names of endogenous variables.  If specified, it will be used
      instead of the column names in endog
  nobs : int
      The number of observations, not used if endog is present. Needs to
      be provided for inference if endog is None.
  missing : 'none', 'drop', or 'raise'
      Missing value handling for endog, default is row-wise deletion 'drop'
      If 'none', no nan checking is done. If 'drop', any observations with
      nans are dropped. If 'raise', an error is raised.
  
  
  Notes
  -----
  **Experimental**
  
  Supported rotations: 'varimax', 'quartimax', 'biquartimax',
  'equamax', 'oblimin', 'parsimax', 'parsimony', 'biquartimin',
  'promax'
  
  If method='ml', the factors are rotated to satisfy condition IC3
  of Bai and Li (2012).  This means that the scores have covariance
  I, so the model for the covariance matrix is L * L' + diag(U),
  where L are the loadings and U are the uniquenesses.  In addition,
  L' * diag(U)^{-1} L must be diagonal.
  
  References
  ----------
  .. [*] Hofacker, C. (2004). Exploratory Factor Analysis, Mathematical
     Marketing. http://www.openaccesstexts.org/pdf/Quant_Chapter_11_efa.pdf
  .. [*] J Bai, K Li (2012).  Statistical analysis of factor models of high
     dimension.  Annals of Statistics. https://arxiv.org/pdf/1205.6617.pdf
class_docstr_tok: ["Factor","analysis","Parameters","--","--","--","--","--","endog",":","array_like","Variables","in","columns",",","observations","in","rows",".","May","be","`","None","`","if","`","corr","`","is","not","`","None","`",".","n_factor",":","int","The","number","of","factors","to","extract","corr",":","array_like","Directly","specify","the","correlation","matrix","instead","of","estimating","it","from","`","endog","`",".","If","provided",",","`","endog","`","is","not","used","for","the","factor","analysis",",","it","may","be","used","in","post-estimation",".","method",":","str","The","method","to","extract","factors",",","currently","must","be","either","'pa'","for","principal","axis","factor","analysis","or","'ml","'","for","maximum","likelihood","estimation",".","smc",":","True","or","False","Whether","or","not","to","apply","squared","multiple","correlations","(","method='pa","'",")","endog_names",":","str","Names","of","endogenous","variables",".","If","specified",",","it","will","be","used","instead","of","the","column","names","in","endog","nobs",":","int","The","number","of","observations",",","not","used","if","endog","is","present",".","Needs","to","be","provided","for","inference","if","endog","is","None",".","missing",":","'none","'",",","'drop","'",",","or","'raise'","Missing","value","handling","for","endog",",","default","is","row-wise","deletion","'drop'","If","'none","'",",","no","nan","checking","is","done",".","If","'drop","'",",","any","observations","with","nans","are","dropped",".","If","'raise","'",",","an","error","is","raised",".","Notes","--","--","-","*","*","Experimental","*","*","Supported","rotations",":","'varimax","'",",","'quartimax","'",",","'biquartimax","'",",","'equamax","'",",","'oblimin","'",",","'parsimax","'",",","'parsimony","'",",","'biquartimin","'",",","'promax'","If","method='ml","'",",","the","factors","are","rotated","to","satisfy","condition","IC3","of","Bai","and","Li","(","2012",")",".","This","means","that","the","scores","have","covariance","I",",","so","the","model","for","the","covariance","matrix","is","L","*","L","'","+","diag","(","U",")",",","where","L","are","the","loadings","and","U","are","the","uniquenesses",".","In","addition",",","L","'","*","diag","(","U",")","^","{","-1","}","L","must","be","diagonal",".","References","--","--","--","--","--","..","[","*","]","Hofacker",",","C.","(","2004",")",".","Exploratory","Factor","Analysis",",","Mathematical","Marketing",".","http",":","\/\/www.openaccesstexts.org\/pdf\/Quant_Chapter_11_efa.pdf","..","[","*","]","J","Bai",",","K","Li","(","2012",")",".","Statistical","analysis","of","factor","models","of","high","dimension",".","Annals","of","Statistics",".","https",":","\/\/arxiv.org\/pdf\/1205.6617.pdf"]
docstr: estimate Factor model using Maximum Likelihood
          
docstr_tok: ["estimate","Factor","model","using","Maximum","Likelihood"]
code: def _fit_ml(self, start, em_iter, opt_method, opt):
      """estimate Factor model using Maximum Likelihood"""
  
      # Starting values
      if start is None:
          load, uniq = self._fit_ml_em(em_iter)
          start = self._pack(load, uniq)
      elif len(start) == 2:
          if len(start[1]) != start[0].shape[0]:
              msg = "Starting values have incompatible dimensions"
              raise ValueError(msg)
          start = self._pack(start[0], start[1])
      else:
          raise ValueError("Invalid starting values")
  
      def nloglike(par):
          return -self.loglike(par)
  
      def nscore(par):
          return -self.score(par)
  
      # Do the optimization
      if opt is None:
          opt = _opt_defaults
      r = minimize(
          nloglike, start, jac=nscore, method=opt_method, options=opt
      )
      if not r.success:
          warnings.warn("Fitting did not converge")
      par = r.x
      uniq, load = self._unpack(par)
  
      if uniq.min() < 1e-10:
          warnings.warn("Some uniquenesses are nearly zero")
  
      # Rotate solution to satisfy IC3 of Bai and Li
      load = self._rotate(load, uniq)
  
      self.uniqueness = uniq
      self.communality = 1 - uniq
      self.loadings = load
      self.mle_retvals = r
  
      return FactorResults(self)
  
imports: import warnings
  import numpy
  from numpy.linalg import eigh, inv, norm, matrix_rank
  import pandas
  from scipy.optimize import minimize
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.base.model import Model
  from statsmodels.iolib import summary2
  from statsmodels.graphics.utils import _import_mpl
  from .factor_rotation import rotate_factors, promax
label_desc: Use image node_id 10 for calling the Factor obj's underlying member method code with example usage: obj._fit_ml(start, em_iter, opt_method, opt) and returns: FactorResults, unknown, unknown