class_docstr: Semiparametric partially linear model, ``Y = Xb + g(Z) + e``.
  
  Parameters
  ----------
  endog : array_like
      The dependent variable
  exog : array_like
      The linear component in the regression
  exog_nonparametric : array_like
      The nonparametric component in the regression
  var_type : str
      The type of the variables in the nonparametric component;
  
          - c: continuous
          - o: ordered
          - u: unordered
  
  k_linear : int
      The number of variables that comprise the linear component.
  
  Attributes
  ----------
  bw : array_like
      Bandwidths for the nonparametric component exog_nonparametric
  b : array_like
      Coefficients in the linear component
  nobs : int
      The number of observations.
  k_linear : int
      The number of variables that comprise the linear component.
  
  Methods
  -------
  fit
      Returns the fitted mean and marginal effects dy/dz
  
  Notes
  -----
  This model uses only the local constant regression estimator
  
  References
  ----------
  See chapter on Semiparametric Models in [1]
docstr: Similar to the cross validation leave-one-out estimator.
  
  Modified to reflect the linear components.
  
  Parameters
  ----------
  params : array_like
      Vector consisting of the coefficients (b) and the bandwidths (bw).
      The first ``k_linear`` elements are the coefficients.
  
  Returns
  -------
  L : float
      The value of the objective function
  
  References
  ----------
  See p.254 in [1]
docstr_tok: ["Similar","to","the","cross","validation","leave-one-out","estimator",".","Modified","to","reflect","the","linear","components",".","Parameters","--","--","--","--","--","params",":","array_like","Vector","consisting","of","the","coefficients","(","b",")","and","the","bandwidths","(","bw",")",".","The","first","``","k_linear","``","elements","are","the","coefficients",".","Returns","--","--","--","-","L",":","float","The","value","of","the","objective","function","References","--","--","--","--","--","See","p.254","in","[","1","]"]
code: def cv_loo(self, params):
      """
      Similar to the cross validation leave-one-out estimator.
  
      Modified to reflect the linear components.
  
      Parameters
      ----------
      params : array_like
          Vector consisting of the coefficients (b) and the bandwidths (bw).
          The first ``k_linear`` elements are the coefficients.
  
      Returns
      -------
      L : float
          The value of the objective function
  
      References
      ----------
      See p.254 in [1]
      """
      params = np.asarray(params)
      b = params[0 : self.k_linear]
      bw = params[self.k_linear :]
      LOO_X = LeaveOneOut(self.exog)
      LOO_Y = LeaveOneOut(self.endog).__iter__()
      LOO_Z = LeaveOneOut(self.exog_nonparametric).__iter__()
      Xb = np.dot(self.exog, b)[:, None]
      L = 0
      for ii, X_not_i in enumerate(LOO_X):
          Y = next(LOO_Y)
          Z = next(LOO_Z)
          Xb_j = np.dot(X_not_i, b)[:, None]
          Yx = Y - Xb_j
          G = self.func(
              bw,
              endog=Yx,
              exog=-Z,
              data_predict=-self.exog_nonparametric[ii, :],
          )[0]
          lt = Xb[ii, :]  # .sum()  # linear term
          L += (self.endog[ii] - lt - G) ** 2
  
      return L
  
imports: import numpy
  from scipy import optimize
  from scipy.stats.mstats import mquantiles
  from statsmodels.nonparametric.api import KDEMultivariate, KernelReg
  from statsmodels.nonparametric._kernel_base import gpke, LeaveOneOut, _get_type_pos, _adjust_shape
label_desc: Use image node_id 3 for calling the SemiLinear obj's underlying member method code with example usage: obj.cv_loo(params) and returns: L