class_docstr: Factor results class
  
  For result summary, scree/loading plots and factor rotations
  
  Parameters
  ----------
  factor : Factor
      Fitted Factor class
  
  Attributes
  ----------
  uniqueness : ndarray
      The uniqueness (variance of uncorrelated errors unique to
      each variable)
  communality : ndarray
      1 - uniqueness
  loadings : ndarray
      Each column is the loading vector for one factor
  loadings_no_rot : ndarray
      Unrotated loadings, not available under maximum likelihood
      analysis.
  eigenvals : ndarray
      The eigenvalues for a factor analysis obtained using
      principal components; not available under ML estimation.
  n_comp : int
      Number of components (factors)
  nbs : int
      Number of observations
  fa_method : str
      The method used to obtain the decomposition, either 'pa' for
      'principal axes' or 'ml' for maximum likelihood.
  df : int
      Degrees of freedom of the factor model.
  
  Notes
  -----
  Under ML estimation, the default rotation (used for `loadings`) is
  condition IC3 of Bai and Li (2012).  Under this rotation, the
  factor scores are iid and standardized.  If `G` is the canonical
  loadings and `U` is the vector of uniquenesses, then the
  covariance matrix implied by the factor analysis is `GG' +
  diag(U)`.
  
  Status: experimental, Some refactoring will be necessary when new
      features are added.
class_docstr_tok: ["Factor","results","class","For","result","summary",",","scree\/loading","plots","and","factor","rotations","Parameters","--","--","--","--","--","factor",":","Factor","Fitted","Factor","class","Attributes","--","--","--","--","--","uniqueness",":","ndarray","The","uniqueness","(","variance","of","uncorrelated","errors","unique","to","each","variable",")","communality",":","ndarray","1","-","uniqueness","loadings",":","ndarray","Each","column","is","the","loading","vector","for","one","factor","loadings_no_rot",":","ndarray","Unrotated","loadings",",","not","available","under","maximum","likelihood","analysis",".","eigenvals",":","ndarray","The","eigenvalues","for","a","factor","analysis","obtained","using","principal","components",";","not","available","under","ML","estimation",".","n_comp",":","int","Number","of","components","(","factors",")","nbs",":","int","Number","of","observations","fa_method",":","str","The","method","used","to","obtain","the","decomposition",",","either","'pa","'","for","'principal","axes","'","or","'ml","'","for","maximum","likelihood",".","df",":","int","Degrees","of","freedom","of","the","factor","model",".","Notes","--","--","-","Under","ML","estimation",",","the","default","rotation","(","used","for","`","loadings","`",")","is","condition","IC3","of","Bai","and","Li","(","2012",")",".","Under","this","rotation",",","the","factor","scores","are","iid","and","standardized",".","If","`","G","`","is","the","canonical","loadings","and","`","U","`","is","the","vector","of","uniquenesses",",","then","the","covariance","matrix","implied","by","the","factor","analysis","is","`","GG","'","+","diag","(","U",")","`",".","Status",":","experimental",",","Some","refactoring","will","be","necessary","when","new","features","are","added","."]
docstr: factor scoring: compute factors for endog
  
  If endog was not provided when creating the factor class, then
  a standarized endog needs to be provided here.
  
  Parameters
  ----------
  method : 'bartlett' or 'regression'
      Method to use for factor scoring.
      'regression' can be abbreviated to `reg`
  transform : bool
      If transform is true and endog is provided, then it will be
      standardized using mean and scale of original data, which has to
      be available in this case.
      If transform is False, then a provided endog will be used unchanged.
      The original endog in the Factor class will
      always be standardized if endog is None, independently of `transform`.
  
  Returns
  -------
  factor_score : ndarray
      estimated factors using scoring matrix s and standarized endog ys
      ``f = ys dot s``
  
  Notes
  -----
  Status: transform option is experimental and might change.
  
  See Also
  --------
  statsmodels.multivariate.factor.FactorResults.factor_score_params
docstr_tok: ["factor","scoring",":","compute","factors","for","endog","If","endog","was","not","provided","when","creating","the","factor","class",",","then","a","standarized","endog","needs","to","be","provided","here",".","Parameters","--","--","--","--","--","method",":","'bartlett","'","or","'regression'","Method","to","use","for","factor","scoring",".","'regression","'","can","be","abbreviated","to","`","reg","`","transform",":","bool","If","transform","is","true","and","endog","is","provided",",","then","it","will","be","standardized","using","mean","and","scale","of","original","data",",","which","has","to","be","available","in","this","case",".","If","transform","is","False",",","then","a","provided","endog","will","be","used","unchanged",".","The","original","endog","in","the","Factor","class","will","always","be","standardized","if","endog","is","None",",","independently","of","`","transform","`",".","Returns","--","--","--","-","factor_score",":","ndarray","estimated","factors","using","scoring","matrix","s","and","standarized","endog","ys","``","f","=","ys","dot","s","``","Notes","--","--","-","Status",":","transform","option","is","experimental","and","might","change",".","See","Also","--","--","--","--","statsmodels.multivariate.factor.FactorResults.factor_score_params"]
code: def factor_scoring(
      self, endog=None, method="bartlett", transform=True
  ):
      """
      factor scoring: compute factors for endog
  
      If endog was not provided when creating the factor class, then
      a standarized endog needs to be provided here.
  
      Parameters
      ----------
      method : 'bartlett' or 'regression'
          Method to use for factor scoring.
          'regression' can be abbreviated to `reg`
      transform : bool
          If transform is true and endog is provided, then it will be
          standardized using mean and scale of original data, which has to
          be available in this case.
          If transform is False, then a provided endog will be used unchanged.
          The original endog in the Factor class will
          always be standardized if endog is None, independently of `transform`.
  
      Returns
      -------
      factor_score : ndarray
          estimated factors using scoring matrix s and standarized endog ys
          ``f = ys dot s``
  
      Notes
      -----
      Status: transform option is experimental and might change.
  
      See Also
      --------
      statsmodels.multivariate.factor.FactorResults.factor_score_params
      """
  
      if transform is False and endog is not None:
          # no transformation in this case
          endog = np.asarray(endog)
      else:
          # we need to standardize with the original mean and scale
          if self.model.endog is not None:
              m = self.model.endog.mean(0)
              s = self.model.endog.std(ddof=1, axis=0)
              if endog is None:
                  endog = self.model.endog
              else:
                  endog = np.asarray(endog)
          else:
              raise ValueError(
                  "If transform is True, then `endog` needs "
                  + "to be available in the Factor instance."
              )
  
          endog = (endog - m) / s
  
      s_mat = self.factor_score_params(method=method)
      factors = endog.dot(s_mat)
      return factors
  
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 6 for calling the FactorResults obj's underlying member method code with example usage: obj.factor_scoring(endog, method, transform) and returns: factors