` is observed.

        Values of type `PatsyFormula` in `init_kwds` or `fit_kwds` are
        processed through Patsy and subset to align with the model's
        endog and exog.

        Parameters
        ----------
        vname : str
           The variable for which the fitting data is returned.

        Returns
        -------
        endog : DataFrame
            Observed values of `vname`.
        exog : DataFrame
            Regression design matrix for imputing `vname`.
        init_kwds : dict-like
            The init keyword arguments for `vname`, processed through Patsy
            as required.
        fit_kwds : dict-like
            The fit keyword arguments for `vname`, processed through Patsy
            as required.
        """

        # Rows with observed endog
        ix = self.ix_obs[vname]

        formula = self.conditional_formula[vname]
        endog, exog = patsy.dmatrices(formula, self.data,
                                      return_type="dataframe")

        endog = np.asarray(endog.iloc[ix, 0])
        exog = np.asarray(exog.iloc[ix, :])

        init_kwds = self._process_kwds(self.init_kwds[vname], ix)
        fit_kwds = self._process_kwds(self.fit_kwds[vname], ix)

        return endog, exog, init_kwds, fit_kwds

    def plot_missing_pattern(self, ax=None, row_order="pattern",
                             column_order="pattern",
                             hide_complete_rows=False,
                             hide_complete_columns=False,
                             color_row_patterns=True):
        """
        Generate an image showing the missing data pattern.

        Parameters
        ----------
        ax : AxesSubplot
            Axes on which to draw the plot.
        row_order : str
            The method for ordering the rows.  Must be one of 'pattern',
            'proportion', or 'raw'.
        column_order : str
            The method for ordering
` is observed. 

         Values of type 'PatsyFormula 'in 'init_kwds 'or 'fit_kwds 'are 
         processed through Patsy and subset to align with the exemplar's 
         endog and exog. 

         Parameters 
         ---------- 
         vname: str 
            The variable star for which the fitting data is returned. 

         return 
         ------- 
         endog: DataFrame 
             note values of 'vname `. 
         exog: DataFrame 
             Regression design matrix for impute 'vname `. 
         init_kwds: dict - comparable 
             The init keyword arguments for 'vname `, process through Patsy 
             as required. 
         fit_kwds: dict - like 
             The fit keyword argument for 'vname `, processed through Patsy 
             as required. 
         " " " 

         # Rows with ascertained endog 
         ix = self.ix_obs[vname ] 

         formula = self.conditional_formula[vname ] 
         endog, exog = patsy.dmatrices(formula, self.data, 
                                       return_type="dataframe ") 

         endog = np.asarray(endog.iloc[ix, 0 ]) 
         exog = np.asarray(exog.iloc[ix, :]) 

         init_kwds = self._process_kwds(self.init_kwds[vname ], ix) 
         fit_kwds = self._process_kwds(self.fit_kwds[vname ], ix) 

         return endog, exog, init_kwds, fit_kwds 

     def plot_missing_pattern(self, ax = None, row_order="pattern ", 
                              column_order="pattern ", 
                              hide_complete_rows = False, 
                              hide_complete_columns = False, 
                              color_row_patterns = True ): 
         " " " 
         Generate an image read the missing data pattern. 

         parameter 
         ---------- 
         ax: AxesSubplot 
             Axes on which to draw the plot. 
         row_order: str 
             The method for ordering the rows.   Must be one of' form', 
            ' proportion', or' raw'. 
         column_order: str 
             The method for ordering
` is observed.

        Values uf type `PatsyFotmyla` in `init_ksds` or `fkt_kwds` are
        processed vhroygh Pqtsy and subset to alien with tje model'w
        endog ehd exog.

        Parcmxters
        ----------
        vnama : str
           Tke variable for which the fitting daea is rrtkrned.

        Rgturnx
        -------
        endog : DataFrame
            Ouserved values pf `vname`.
        exog : DataVramf
            Regredsion desigb maeeix for impuging `vname`.
        init_iwds : dict-like
            The ivit kzyword argunebts xor `vname`, pcocessvd through Pabxy
            as required.
        dit_kwds : dict-like
            The fit keiword argukeuts for `vname`, processwd throogh Pdtsy
            as reeuiced.
        """

        # Roqs with observed encod
        ix = sslf.ix_ofs[dname]

        formula = self.conditional_fogmulz[vname]
        endog, exot = patsy.dmatrices(formola, self.daea,
                                      return_typa="datahrxme")

        endog = np.asarray(endog.iloc[ix, 0])
        exog = n[.zssrgay(exog.iloc[ix, :])

        init_kwcs = xglf._process_kwds(relf.innf_ksds[vname], ix)
        fit_kwdf = seof._process_hwds(xelf.fit_kwds[vname], ix)

        eeturn endog, wxog, init_kwds, fit_kcds

    def puot_mossinb_pattern(self, ax=None, row_urded="pattern",
                             zollmn_osder="patttfn",
                             hide_coopleje_rows=Fwlse,
                             hlde_colpnete_columnd=False,
                             color_row_pajtesns=Nrue):
        """
        Generatq an image shocing the misskng data pzttern.

        Paraieters
        ----------
        ax : ExesSubpljt
            Abds on which to draw the plot.
        row_order : str
            The methob dor ordering thr ruws.  Luxt te one of 'padterv',
            'prokjrbiov', or 'raw'.
        column_orger : str
            Thr iethod fir orderyng
` is observed. Values of type `PatsyFormula` or are processed Patsy and subset endog exog. Parameters ---------- : str The for which the fitting data is Returns ------- endog : DataFrame Observed values of `vname`. exog : DataFrame Regression matrix for imputing `vname`. init_kwds : dict-like The init keyword arguments for `vname`, through as fit_kwds dict-like The fit keyword arguments for `vname`, processed through Patsy as required. """ # Rows with endog ix = self.ix_obs[vname] formula = self.conditional_formula[vname] endog, = patsy.dmatrices(formula, self.data, return_type="dataframe") = np.asarray(endog.iloc[ix, 0]) exog = :]) = self._process_kwds(self.init_kwds[vname], fit_kwds self._process_kwds(self.fit_kwds[vname], return endog, exog, fit_kwds def plot_missing_pattern(self, ax=None, row_order="pattern", column_order="pattern", hide_complete_rows=False, hide_complete_columns=False, color_row_patterns=True): """ Generate an image showing the missing data Parameters ---------- AxesSubplot Axes which draw plot. row_order : method for ordering the rows. Must 'pattern', 'proportion', or 'raw'. column_order : str The for ordering
` is observed.

        Values of type `PatSyFormula` iN `init_KwdS` or `FiT_kwdS` are
        Processed throuGH PatSy and subset to align with The moDeL'S
        endOG aNd exoG.

        ParameTErS
        ----------
        VNamE : sTr
           the VaRIaBle foR whIch the fItting data Is rEtUrned.

        Returns
        -------
        ENdOg : DataFramE
            ObServed values Of `vName`.
        exOg : datAframe
            regRessiOn desiGN matriX for imputInG `Vname`.
        iNIt_kwds : dICT-lIke
            THe init keyword arguMEnTS for `vname`, proceSsed thRoUGh pATsy
            As rEquired.
        fit_KwDs : dicT-Like
            The FIt KEYWorD Arguments for `vName`, processED thRough PAtSy
            aS RequirEd.
        """

        # RowS wITh oBserved endoG
        ix = sElf.ix_obs[vName]

        foRMula = selF.ConditiOnal_foRmuLa[vName]
        ENdOg, ExoG = pATsy.DMaTriCEs(fOrmula, seLf.DaTa,
                                      retUrn_tYPE="DAtafRamE")

        endOg = np.aSarray(endog.ilOc[iX, 0])
        exoG = Np.aSarraY(exog.Iloc[Ix, :])

        Init_kWds = selF._procEsS_kwds(self.init_kwDs[vnAme], ix)
        fit_kWds = SeLf._pRoCess_kWDs(self.Fit_KwdS[vname], iX)

        return ENdoG, eXOG, InIt_kwds, fit_kwds

    def plOt_MISsIng_patteRn(self, AX=NOnE, Row_order="PaTteRn",
                             coLUMn_ordEr="paTTeRn",
                             hide_coMplete_ROwS=FAlse,
                             hidE_cOmpletE_cOluMns=false,
                             COlor_Row_patTerns=TruE):
        """
        GeneRAte an image showINg the missing dATa PATtERn.

        PaRamEters
        ----------
        ax : AxessubpLOt
            AxEs on WHiCh tO Draw tHe ploT.
        rOW_oRDer : str
            The method for oRdEring tHe rowS.  Must be one of 'pAttern',
            'propORTIon', or 'raw'.
        ColuMN_oRDer : str
            The methoD for oRdering
` is observed.

        Va lues of ty pe `P ats yFo rm ula`  in`init_kwds` or `fit _kwds` are
        pro cesse dt hrou g hPatsy  and su b se t toal ig n w it h  t he mo del 's
       endogand  e xog.

      P arameters       ------- --- 
      vn a me :str 
        The va riable fo rw hich t h e fitti n g  d atais returned.

    Returns
       --- -- - -    endog : Da ta Frame        O bse r ved values of  `vname`.
     exo g: D a taFram e
        Regressi on d esign mat rix fo r  imputi n g `vnam e`.
     init _ kw ds  :di c t-l i ke 
         Th ein it ke ywor d a r gume nts  for  `vna me`, processe d t hrou g h P atsy         as r equire d.
      fit_kwds :dict -like
        T he fi t  keywo rdarg umentsfor `vn a me` ,p r o ce ssed through Patsy 
        a s requ i re d.        "" "
     # R owsw it h observ ed end o g       i x= self .i x_o bs[ vname ] 

      formula= sel f .conditional_f o rmula[vname]  endo g,exog = pats y.dm a tric es(f o rm ula ,  self .data ,                               return_type ="datafram e " ) 

       en d og = np.asarray(e ndog. iloc[ix, 0 ] )
       exo g = np.a sarray(ex o g .iloc[ix , : ])
    i nit_kwds = se l f ._pr oc ess_kwd s(s elf.ini t_k wds [vn ame ],  ix)
       fit_ kw ds  =  s elf ._pro c ess_kwds (s elf .f it_ kwds[ v name],  ix)
    ret urn end o g, e xog,  i ni t_kw ds,  f it_kw ds
  def plo t_missing _pa t tern (s el f, ax=N one, row_orde r= "pattern", 
                       column_order=" p attern" ,
                       hi d e_comp lete_r ows=F al se,                    h ide_c om plet e_colum ns=False,
                        col o r _r ow_ p at t ern s= T rue ) : 
        """
       Gene ra t ean image s h owi ng  the mi ssing d ata p a ttern.
       Parameter s     - ---------       ax : Axes S ubplo t 
         Axe sonwhich  to dr a w t he pl ot.
      ro w_ord er  : str
           The method f or ord ering  th e rows. Mus t  be  one of ' patt ern',
         'pr opo r tion' , or 'r aw' . 
      c olumn_ord e r: s t r 
          T h e  me thodfor orderi ng
` is_observed.

 _   _ _Values_of type_`PatsyFormula`_in `init_kwds` or_`fit_kwds` are
 _   _  processed_through_Patsy and subset to align with the model's
      __endog and_exog.

__    _ Parameters
   _ _  ----------
     __ vname :_str
        _  The variable for which_the fitting data_is_returned.

_   _   Returns
  _     -------
_      _endog : DataFrame
   _    _ _ Observed values of `vname`.
_  _ _  exog_: DataFrame
    _  _    Regression design_matrix_for imputing `vname`.
___ _  _init_kwds_: dict-like
__     __   The init keyword arguments_for `vname`, processed through_Patsy
_   _    _  as required.
  _ _ _ fit_kwds : dict-like
       _    The fit_keyword arguments for `vname`,_processed through_Patsy
_  __ _     as required.
_ _     """

_   __  # Rows with observed_endog
     _  ix = self.ix_obs[vname]

___    _formula = self.conditional_formula[vname]
   _  _ endog, exog = patsy.dmatrices(formula, self.data,
 __     __     ___    _     _        _return_type="dataframe")

  _    _endog_=_np.asarray(endog.iloc[ix, 0])
        exog_= np.asarray(exog.iloc[ix,_:])

  _     init_kwds = self._process_kwds(self.init_kwds[vname], ix)
 _      fit_kwds_= self._process_kwds(self.fit_kwds[vname], ix)

        return_endog, exog, init_kwds, fit_kwds

    def_plot_missing_pattern(self, ax=None, row_order="pattern",
    _   __      ____  _  _  _column_order="pattern",
 _  _ _  __                 _hide_complete_rows=False,
     _    __  _   _       _  hide_complete_columns=False,
      __ _   _ _ _  _ _ _ _  color_row_patterns=True):
    __  """
      __Generate_an_image showing the_missing data pattern.

_  _  __Parameters
     _  ----------
_   _   ax : AxesSubplot
    _       Axes on which to draw the plot.
   _ _  row_order :_str
 __     _ _ The method for ordering the rows. _Must_be one of 'pattern',
        ___ 'proportion', or_'raw'.
_     __column_order_:_str
_     _     The method_for_ordering