class_docstr: Provides optimization functions used in estimating and conducting
  inference in an AFT model.
  
  Methods
  ------
  
  _opt_wtd_nuis_regress:
      Function optimized over nuisance parameters to compute
      the profile likelihood
  
  _EM_test:
      Uses the modified Em algorithm of Zhou 2005 to maximize the
      likelihood of a parameter vector.
class_docstr_tok: ["Provides","optimization","functions","used","in","estimating","and","conducting","inference","in","an","AFT","model",".","Methods","--","--","--","_opt_wtd_nuis_regress",":","Function","optimized","over","nuisance","parameters","to","compute","the","profile","likelihood","_EM_test",":","Uses","the","modified","Em","algorithm","of","Zhou","2005","to","maximize","the","likelihood","of","a","parameter","vector","."]
docstr: A function that is optimized over nuisance parameters to conduct a
  hypothesis test for the parameters of interest
  
  Parameters
  ----------
  
  params: 1d array
      The regression coefficients of the model.  This includes the
      nuisance and parameters of interests.
  
  Returns
  -------
  llr : float
      -2 times the log likelihood of the nuisance parameters and the
      hypothesized value of the parameter(s) of interest.
docstr_tok: ["A","function","that","is","optimized","over","nuisance","parameters","to","conduct","a","hypothesis","test","for","the","parameters","of","interest","Parameters","--","--","--","--","--","params",":","1d","array","The","regression","coefficients","of","the","model",".","This","includes","the","nuisance","and","parameters","of","interests",".","Returns","--","--","--","-","llr",":","float","-2","times","the","log","likelihood","of","the","nuisance","parameters","and","the","hypothesized","value","of","the","parameter","(","s",")","of","interest","."]
code: def _opt_wtd_nuis_regress(self, test_vals):
      """
      A function that is optimized over nuisance parameters to conduct a
      hypothesis test for the parameters of interest
  
      Parameters
      ----------
  
      params: 1d array
          The regression coefficients of the model.  This includes the
          nuisance and parameters of interests.
  
      Returns
      -------
      llr : float
          -2 times the log likelihood of the nuisance parameters and the
          hypothesized value of the parameter(s) of interest.
      """
      test_params = test_vals.reshape(self.model.nvar, 1)
      est_vect = self.model.uncens_exog * (
          self.model.uncens_endog
          - np.dot(self.model.uncens_exog, test_params)
      )
      eta_star = self._modif_newton(
          np.zeros(self.model.nvar), est_vect, self.model._fit_weights
      )
      denom = np.sum(self.model._fit_weights) + np.dot(
          eta_star, est_vect.T
      )
      self.new_weights = self.model._fit_weights / denom
      return -1 * np.sum(np.log(self.new_weights))
  
imports: import warnings
  import numpy
  from scipy import optimize
  from scipy.stats import chi2
  from statsmodels.regression.linear_model import OLS, WLS
  from statsmodels.tools import add_constant
  from statsmodels.tools.sm_exceptions import IterationLimitWarning
  from .descriptive import _OptFuncts
label_desc: Use image node_id 2 for calling the OptAFT obj's underlying member method code with example usage: obj._opt_wtd_nuis_regress(test_vals) and returns: unknown