Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • normalize() interpreted by Stata as a variable in oaxaca_rif

    I'm using Stata 19 on Windows 11. My dataset has 53,525 observations and 152 variables.
    I'm running an Oaxaca decomposition of gender gap in agriculture.
    Some variables of interest are groups of mutually exclusive dummy variables, for which I would like to use the normalize() option: more specifically (see code below), this concerns variables (ote_dum1-otedum8) (y2019-2023) (montagna collina pianura)
    When using the oaxaca command (Jann, 2008) the normalize option works smoothly, I get the results with the normalized variables coefficients.
    On the contrary, when using oaxaca_rif (Rios-Avila, Stata Journal 202) estimation is not performed and I receive:
    variable normalize not found
    r(111);
    This sounds strange, as in the Rios-Avila article he says "The option normalize() and aggregation of subset of variables using the syntax ( name: varlist) are also possible".

    Thank you for any hint on where is the problem.
    Here is the code

    Code:
    oaxaca log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real  no_capagrar_fisso //
    log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam  inherited  //
    anni_stud eta  eta2 zsva_d sau_irr_perc bio  normalize(ote_dum1 ote_dum2 ote_dum3  ote_dum4//
    ote_dum5 ote_dum6 ote_dum7 ote_dum8)  normalize(montagna collina pianura) Abruzzo Alto_Adige//
    Basilicata Calabria Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise //
    Puglia Sardegna Sicilia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021//
    y2022 y2023) , by (fem) vce (robust) noisily relax
    
    oaxaca_rif  log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real  no_capagrar_fisso //
    log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam  inherited //
    anni_stud eta  eta2 zsva_d sau_irr_perc bio  normalize(ote_dum1 ote_dum2 ote_dum3  ote_dum4 //
    ote_dum5 ote_dum6 ote_dum7 ote_dum8)  normalize(montagna collina pianura) Abruzzo Alto_Adige//
    Basilicata Calabria Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise //
    Puglia Sardegna Sicilia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 //
    y2022 y2023), by (fem) rif(q (.25)) noisily relax

  • #2
    A few wild hypotheses, as I can't possibly run either command without access to your data and I am not familiar with either command,

    It does no harm to put spaces before continuation comments. Thus always put a space before //

    Sometimes Stata doesn't see the whole of a long command line because of the way it is treated. Some string processing may not work as expected because of an implicit limit on the length of an input text string. So,

    Code:
    set trace on 
    set traced 1
    before you run the command that failed. You (we) need to see what Stata is seeing when it chokes, The output may be voluminous but what Stata shows just before the command fails may give a clue.

    Comment


    • #3
      I have no idea what is going on re: the commands, but having only two forward slashes is clearly incorrect; if you want to treat these as continuation comments, you need 3, not 2; see
      Code:
      h comment

      Comment


      • #4
        Rich Goldstein That's a very good point -- except that it doesn't explain why the first command works but the second doesn't.

        I'm led to guess that Alessandro Corsi did not use the code given in #1 but used something else and merely edited the code in #1 to use // comments for a Statalist posting.

        At the same time, I overlooked that myself in #2 and the recommendation there should be rephrased in terms of /// not //.

        Alessandro: If the above is true, it is hoped that otherwise your code has not been changed importantly from what you really tried.

        Comment


        • #5
          Thanks, Nick Cox and Rick Goldstein:you are right, I just edited the code for the Statalist posting, the original code had no slashes, so the problem is not there..
          I tried your suggestion to run set trace on and set traced 1, but the result is the same
          Code:
          . oaxaca_rif  log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real  no_capagrar_fi
          > sso log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam  inherited  an
          > ni_stud eta  eta2 zsva_d sau_irr_perc bio  normalize(ote_dum1 ote_dum2 ote_dum3  ote_dum4 ote_du
          > m5 ote_dum6 ote_dum7 ote_dum8)  normalize(montagna collina pianura) Abruzzo Alto_Adige Basilicat
          > a Calabria Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise Puglia Sardeg
          > na Sicilia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 y2022 y2023), 
          > by (fem) rif(q (.25)) noisily relax
          No wgt specified. Using default 0
          No Reweighted Strategy Choosen
          Estimating Standard RIF-OAXACA using RIF:q (.25)
          RIF regression group 1
          variable normalize not found
          r(111);

          Comment


          • #6
            You may need to bump up the trace depth

            Code:
            set traced 2
            and keep going until Stata echoes what it is looking at before it posts the error message.

            Comment


            • #7
              Nick Cox bear with me, I'm rather new to Stata and this is my first post. I did as you suggested and I'm posting the result, but I'm not able to understand what is wrong.
              Code:
              . oaxaca_rif  log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real  no_capagrar_fi
              > sso log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam  inherited  an
              > ni_stud eta  eta2 zsva_d sau_irr_perc bio  normalize(ote_dum1 ote_dum2 ote_dum3  ote_dum4 ote_du
              > m5 ote_dum6 ote_dum7 ote_dum8)  normalize(montagna collina pianura) Abruzzo Alto_Adige Basilicat
              > a Calabria Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise Puglia Sardeg
              > na Sicilia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 y2022 y2023), 
              > by (fem) rif(q (.25)) noisily relax
                --------------------------------------------------------------------------- begin oaxaca_rif ---
                - if replay() {
                  display_ob
                  exit
                  }
                - version 12.0
                - syntax anything [if] [in] [aw fw iw pw] , by(varname) rif(string) [ swp swap Weights(str) rwlo
              > git(str) rwprobit(str) wgt(int -1) cluster(varname) relax Noisily scale(real 1.0) retain(str) re
              > place iseed(str) s2var(varlist) ]
                - tokenize `anything'
                = tokenize log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real  no_capagrar_fis
              > so log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam  inherited  ann
              > i_stud eta  eta2 zsva_d sau_irr_perc bio  normalize(ote_dum1 ote_dum2 ote_dum3  ote_dum4 ote_dum
              > 5 ote_dum6 ote_dum7 ote_dum8)  normalize(montagna collina pianura) Abruzzo Alto_Adige Basilicata
              >  Calabria Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise Puglia Sardegn
              > a Sicilia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 y2022 y2023)
                - local y `1'
                = local y log_rt_az_real
                - macro shift
                - local rest `*'
                = local rest log_capfond_real no_capfondiario log_cap_ag_fiss_real no_capagrar_fisso log_cap_agr
              > _c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam inherited anni_stud eta eta2 
              > zsva_d sau_irr_perc bio normalize(ote_dum1 ote_dum2 ote_dum3 ote_dum4 ote_dum5 ote_dum6 ote_dum7
              >  ote_dum8) normalize(montagna collina pianura) Abruzzo Alto_Adige Basilicata Calabria Campania E
              > milia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise Puglia Sardegna Sicilia Toscana Tr
              > entino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 y2022 y2023)
                - marksample touse
                - fvexpand `rwprobit'
                = fvexpand 
                - local erwprobit `r(varlist)'
                = local erwprobit 
                - fvexpand `rwlogit'
                = fvexpand 
                - local erwlogit `r(varlist)'
                = local erwlogit 
                - tempvar ax1
                - foreach i in `anything' `by' `erwlogit' `erwprobit' `cluster' {
                = foreach i in log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real  no_capagrar
              > _fisso log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam  inherited 
              >  anni_stud eta  eta2 zsva_d sau_irr_perc bio  normalize(ote_dum1 ote_dum2 ote_dum3  ote_dum4 ote
              > _dum5 ote_dum6 ote_dum7 ote_dum8)  normalize(montagna collina pianura) Abruzzo Alto_Adige Basili
              > cata Calabria Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise Puglia Sar
              > degna Sicilia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 y2022 y2023
              > ) fem    {
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=log_rt_az_real
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=log_capfond_real
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=no_capfondiario
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=log_cap_ag_fiss_real
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=no_capagrar_fisso
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=log_cap_agr_c_real
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=no_capagrar_circol
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=log_ore_sal
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=no_oresalariate
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=log_ore_fam
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=inherited
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=anni_stud
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=eta
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=eta2
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=zsva_d
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=sau_irr_perc
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=bio
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=normalize(ote_dum1
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum2
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum3
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum4
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum5
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum6
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum7
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=ote_dum8)
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=normalize(montagna
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=collina
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=pianura)
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Abruzzo
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Alto_Adige
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Basilicata
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Calabria
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Campania
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Emilia_Romagna
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Friuli_VG
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Lazio
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Liguria
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Lombardia
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Marche
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Molise
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Puglia
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Sardegna
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Sicilia
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Toscana
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Trentino
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Umbria
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Valle_Aosta
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=Veneto
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=normalize(y2019
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=y2020
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=y2021
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=y2022
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=y2023)
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - capture drop `ax1'
                = capture drop __000001
                - capture gen `ax1'=`i'
                = capture gen __000001=fem
                - capture replace `touse'=0 if `ax1'==.
                = capture replace __000000=0 if __000001==.
                - }
                - qui:levelsof `by' if `touse', local(idf)
                = qui:levelsof fem if __000000, local(idf)
                - foreach i of local idf {
                - local nx=`nx'+1
                = local nx=+1
                - local g`nx'=`i'
                = local g1=0
                - if `nx'>2 {
                = if 1>2 {
                  display "More than 2 groups in `by' identified. Only 2 groups can be used"
                  exit
                  }
                - }
                - local nx=`nx'+1
                = local nx=1+1
                - local g`nx'=`i'
                = local g2=1
                - if `nx'>2 {
                = if 2>2 {
                  display "More than 2 groups in `by' identified. Only 2 groups can be used"
                  exit
                  }
                - }
                - if "`weight'" == "" {
                = if "" == "" {
                - tempvar eweight
                - gen `eweight' = 1.0
                = gen __000002 = 1.0
                - local weight "aweight"
                - local exp `eweight'
                = local exp __000002
                - local erweight 1
                - }
                - else {
                  local exp = regexr("`exp'", "= ", "")
                  local erweight `exp'
                  }
                - local exp_no_eq = regexr("`exp'", "=", "")
                = local exp_no_eq = regexr("__000002", "=", "")
                - if "`weights'"!="" {
                = if ""!="" {
                  local wgt=`weights'
                  local weights=""
                  }
                - if "`wgt'"=="-1" {
                = if "-1"=="-1" {
                - display "No wgt specified. Using default 0"
              No wgt specified. Using default 0
                - local wgt = "0"
                - }
                - if "`wgt'"!="0" & "`wgt'"!="1" {
                = if "0"!="0" & "0"!="1" {
                  display "For Weighted Oaxaca, one can only use w=1 or w=0"
                  exit
                  }
                - if "`rwlogit'"!="" & "`rwprobit'"!="" {
                = if ""!="" & ""!="" {
                  display "Only one probability model can be set. Choose either Logit or probit for the first st
              > age"
                  exit
                  }
                - if "`rwlogit'"=="" & "`rwprobit'"=="" {
                = if ""=="" & ""=="" {
                - display "No Reweighted Strategy Choosen"
              No Reweighted Strategy Choosen
                - local type="Standard"
                - }
                - else {
                  local type="Reweighted"
                  }
                - if "`swap'"!="" {
                = if ""!="" {
                  local swap=""
                  local swp="swp"
                  }
                - if "`retain'"!="" {
                = if ""!="" {
                  tempvar rifretain
                  qui:egen `rifretain'=rifvar(`y') if `touse', `rif' weight(`exp') by(`by')
                  if "`replace'"!="" {
                  capture:gen double `retain'=`rifretain'
                  capture:replace `retain'=`rifretain'
                  local vnm:variable label `rifretain'
                  label var `retain' "`vnm'"
                  }
                  else {
                  gen double `retain'=`rifretain'
                  local vnm:variable label `rifretain'
                  label var `retain' "`vnm'"
                  }
                  }
                - display "Estimating `type' RIF-OAXACA using RIF:`rif'"
                = display "Estimating Standard RIF-OAXACA using RIF:q (.25)"
              Estimating Standard RIF-OAXACA using RIF:q (.25)
                - if "`type'"=="Standard" {
                = if "Standard"=="Standard" {
                - preserve
                - if "`swp'"!="" {
                = if ""!="" {
                  replace `by'=-`by'
                  local gx=`g1'
                  local g1=`g2'
                  local g2=`gx'
                  }
                - tempvar rif_var
                - qui: egen `rif_var'=rifvar(`y') if `touse'==1, `rif' weight(`exp') by(`by') seed(`iseed')
                = qui: egen __000003=rifvar(log_rt_az_real) if __000000==1, q (.25) weight(__000002) by(fem) see
              > d()
                - qui: replace `rif_var'=`rif_var'*`scale'
                = qui: replace __000003=__000003*1
                - foreach i of local s2var {
                  qui: egen _s2_`i'=rifvar(`i') if `touse'==1, var weight(`exp') by(`by') seed(`iseed')
                  local re `re' _s2_`i'
                  }
                - if "`noisily'"!="" {
                = if "noisily"!="" {
                - local cnt=0
                - qui:levelsof `by', local(grps)
                = qui:levelsof fem, local(grps)
                - foreach i of local grps {
                - local cnt=`cnt'+1
                = local cnt=0+1
                - if `cnt'==1 display in w "RIF regression group 1"
                = if 1==1 display in w "RIF regression group 1"
              RIF regression group 1
                - if `cnt'==2 display in w "RIF regression group 2"
                = if 1==2 display in w "RIF regression group 2"
                - rifhdreg `y' `rest' `re' [`weight'=`exp'] if `touse'==1 & `by'==`i', robust cluster(`cluster')
              >  rif(`rif') iseed(`iseed')
                = rifhdreg log_rt_az_real log_capfond_real no_capfondiario log_cap_ag_fiss_real no_capagrar_fiss
              > o log_cap_agr_c_real no_capagrar_circol log_ore_sal no_oresalariate log_ore_fam inherited anni_s
              > tud eta eta2 zsva_d sau_irr_perc bio normalize(ote_dum1 ote_dum2 ote_dum3 ote_dum4 ote_dum5 ote_
              > dum6 ote_dum7 ote_dum8) normalize(montagna collina pianura) Abruzzo Alto_Adige Basilicata Calabr
              > ia Campania Emilia_Romagna Friuli_VG Lazio Liguria Lombardia Marche Molise Puglia Sardegna Sicil
              > ia Toscana Trentino Umbria Valle_Aosta Veneto normalize(y2019 y2020 y2021 y2022 y2023)  [aweight
              > =__000002] if __000000==1 & fem==0, robust cluster() rif(q (.25)) iseed()
              variable normalize not found
                  tempname bf`cnt' Vf`cnt'
                  matrix `bf`cnt''=e(b)
                  matrix `Vf`cnt''=e(V)
                  }
                  }
                  qui:oaxaca `rif_var' `rest' `re' [`weight'=`exp'] if `touse'==1, by(`by') w(`wgt') robust clus
              > ter(`cluster') `relax'
                  drop `rif_var'
                  local lgd "" `e(legend)' ""
                  tempname b V
                  matrix `b'=e(b)
                  matrix `V'=e(V)
                  if `wgt'==0 {
                  local gc = "x1*b2"
                  }
                  if `wgt'==1 {
                  local gc = "x2*b1"
                  }
                  local N1=e(N_1)
                  local N2=e(N_2)
                  restore
                  }
                ----------------------------------------------------------------------------- end oaxaca_rif ---
              r(111);

              Comment


              • #8
                No need to apologise, and in any case I can't see what's wrong either.
                Last edited by Nick Cox; 14 May 2026, 09:22.

                Comment


                • #9
                  Can you show the results of:

                  Code:
                  which oaxaca
                  which oaxaca_rif
                  Also, are you able to run the following?

                  Code:
                  use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta, clear
                  set seed 05142026
                  tabulate isco, nofreq generate(isco)
                  gen catvar= runiformint(1, 5)
                  tabulate catvar, nofreq generate(d)
                  oaxaca_rif lnwage educ  normalize(isco?) exper normalize(d?) tenure, by(female) rif(q (.25))

                  Comment


                  • #10
                    Here are the results of both:
                    Code:
                    . do "C:\Users\aless\AppData\Local\Temp\STD76d0_000016.tmp"
                    
                    . which oaxaca
                    C:\Users\aless\ado\plus\o\oaxaca.ado
                    *! version 4.0.5  24aug2011  Ben Jann
                    
                    
                    . which oaxaca_rif
                    C:\Users\aless\ado\plus\o\oaxaca_rif.ado
                    *! version 2.2 July 2019  Author Fernando Rios Avila
                    
                    
                    
                    . oaxaca_rif lnwage educ  normalize(isco?) exper normalize(d?) tenure, by(female) rif(q (.25))
                    No wgt specified. Using default 0
                    No Reweighted Strategy Choosen
                    Estimating Standard RIF-OAXACA using RIF:q (.25)
                    Model  : Blinder-Oaxaca RIF-decomposition
                    Type   : Standard
                    RIF    : q (.25)
                    Scale  : 1
                    Group 1: female = 0                              N of obs 1      = 751
                    Group c: x1*b2                                   N of obs C      =          .
                    Group 2: female = 1                              N of obs 2      = 683
                    
                    ------------------------------------------------------------------------------
                          lnwage | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                    -------------+----------------------------------------------------------------
                    overall      |
                         group_1 |   1.220683   .1205265    10.13   0.000     .9844554    1.456911
                         group_2 |   .7255667   .1398974     5.19   0.000     .4513729    .9997605
                      difference |   .4951164   .1846562     2.68   0.007     .1331969    .8570359
                       explained |  -.2427563   .2397333    -1.01   0.311     -.712625    .2271124
                     unexplained |   .7378727   .3879959     1.90   0.057    -.0225854    1.498331
                    -------------+----------------------------------------------------------------
                    explained    |
                            educ |   .1424211   .1384165     1.03   0.304    -.1288703    .4137125
                           isco1 |  -.1746118   .1733777    -1.01   0.314    -.5144258    .1652023
                           isco2 |  -.0403393   .0412811    -0.98   0.328    -.1212488    .0405702
                           isco3 |   -.026282   .0271644    -0.97   0.333    -.0795234    .0269593
                           isco4 |  -.0717528   .0695556    -1.03   0.302    -.2080792    .0645736
                           isco5 |  -.0717618   .0693905    -1.03   0.301    -.2077648    .0642411
                           isco6 |   .0070086   .0080049     0.88   0.381    -.0086807    .0226978
                           isco7 |   .0847875   .0824355     1.03   0.304    -.0767831    .2463581
                           isco8 |   .0348085   .0351094     0.99   0.321    -.0340046    .1036217
                           isco9 |  -.0161487   .0169899    -0.95   0.342    -.0494484    .0171509
                           exper |   -.019249   .0210984    -0.91   0.362    -.0606011    .0221032
                              d1 |   .0013112   .0020767     0.63   0.528    -.0027591    .0053814
                              d2 |  -.0005193   .0052019    -0.10   0.920    -.0107149    .0096763
                              d3 |  -.0038417   .0049817    -0.77   0.441    -.0136057    .0059224
                              d4 |   .0016427   .0038894     0.42   0.673    -.0059804    .0092658
                              d5 |  -.0077536   .0136292    -0.57   0.569    -.0344663     .018959
                          tenure |  -.0824759   .0804557    -1.03   0.305    -.2401661    .0752144
                    -------------+----------------------------------------------------------------
                    unexplained  |
                            educ |  -2.090605   2.850521    -0.73   0.463    -7.677523    3.496314
                           isco1 |   .3180188     .29924     1.06   0.288    -.2684807    .9045183
                           isco2 |   .0778526   .0889717     0.88   0.382    -.0965289     .252234
                           isco3 |  -.0472107   .0827847    -0.57   0.568    -.2094657    .1150443
                           isco4 |  -.1510383   .1115678    -1.35   0.176    -.3697072    .0676306
                           isco5 |  -.0233371   .0378759    -0.62   0.538    -.0975725    .0508984
                           isco6 |  -.0085724   .0120148    -0.71   0.476    -.0321211    .0149762
                           isco7 |  -.0695913   .1132384    -0.61   0.539    -.2915345    .1523518
                           isco8 |  -.0376058   .0455883    -0.82   0.409    -.1269573    .0517457
                           isco9 |  -.0118957   .0172813    -0.69   0.491    -.0457665    .0219751
                           exper |   .2904817   .2123158     1.37   0.171    -.1256496     .706613
                              d1 |   .0177125   .0346684     0.51   0.609    -.0502363    .0856613
                              d2 |  -.0217861   .0579758    -0.38   0.707    -.1354165    .0918443
                              d3 |  -.1074791    .093678    -1.15   0.251    -.2910846    .0761263
                              d4 |  -.0053417   .0443941    -0.12   0.904    -.0923526    .0816692
                              d5 |   .1280567   .1061416     1.21   0.228     -.079977    .3360903
                          tenure |   .2933421    .298469     0.98   0.326    -.2916463    .8783306
                           _cons |   2.186871   2.838048     0.77   0.441    -3.375602    7.749344
                    ------------------------------------------------------------------------------
                    
                    . 
                    end of do-file

                    Comment


                    • #11
                      Looks like the noisily caused the error

                      Code:
                      . use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta, clear
                      (Excerpt from the Swiss Labor Market Survey 1998)
                      
                      . set seed 05142026
                      
                      . tabulate isco, nofreq generate(isco)
                      
                      . gen catvar= runiformint(1, 5)
                      
                      . tabulate catvar, nofreq generate(d)
                      
                      . oaxaca_rif lnwage educ  normalize(isco?) exper normalize(d1 d2 d3 d4 d5) ten
                      > ure, by(female) rif(q (.25))
                      No wgt specified. Using default 0
                      No Reweighted Strategy Choosen
                      Estimating Standard RIF-OAXACA using RIF:q (.25)
                      Model  : Blinder-Oaxaca RIF-decomposition
                      Type   : Standard
                      RIF    : q (.25)
                      Scale  : 1
                      Group 1: female = 0                              N of obs 1      = 751
                      Group c: x1*b2                                   N of obs C      =          .
                      Group 2: female = 1                              N of obs 2      = 683
                      
                      ------------------------------------------------------------------------------
                            lnwage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                      overall      |
                           group_1 |   1.220683   .1205265    10.13   0.000     .9844554    1.456911
                           group_2 |   .7255667   .1398974     5.19   0.000     .4513729    .9997605
                        difference |   .4951164   .1846562     2.68   0.007     .1331969    .8570359
                         explained |  -.2427563   .2397333    -1.01   0.311     -.712625    .2271124
                       unexplained |   .7378727   .3879959     1.90   0.057    -.0225854    1.498331
                      -------------+----------------------------------------------------------------
                      explained    |
                              educ |   .1424211   .1384165     1.03   0.304    -.1288703    .4137125
                             isco1 |  -.1746118   .1733777    -1.01   0.314    -.5144258    .1652023
                             isco2 |  -.0403393   .0412811    -0.98   0.328    -.1212488    .0405702
                             isco3 |   -.026282   .0271644    -0.97   0.333    -.0795234    .0269593
                             isco4 |  -.0717528   .0695556    -1.03   0.302    -.2080792    .0645736
                             isco5 |  -.0717618   .0693905    -1.03   0.301    -.2077648    .0642411
                             isco6 |   .0070086   .0080049     0.88   0.381    -.0086807    .0226978
                             isco7 |   .0847875   .0824355     1.03   0.304    -.0767831    .2463581
                             isco8 |   .0348085   .0351094     0.99   0.321    -.0340046    .1036217
                             isco9 |  -.0161487   .0169899    -0.95   0.342    -.0494484    .0171509
                             exper |   -.019249   .0210984    -0.91   0.362    -.0606011    .0221032
                                d1 |   .0013112   .0020767     0.63   0.528    -.0027591    .0053814
                                d2 |  -.0005193   .0052019    -0.10   0.920    -.0107149    .0096763
                                d3 |  -.0038417   .0049817    -0.77   0.441    -.0136057    .0059224
                                d4 |   .0016427   .0038894     0.42   0.673    -.0059804    .0092658
                                d5 |  -.0077536   .0136292    -0.57   0.569    -.0344663     .018959
                            tenure |  -.0824759   .0804557    -1.03   0.305    -.2401661    .0752144
                      -------------+----------------------------------------------------------------
                      unexplained  |
                              educ |  -2.090605   2.850521    -0.73   0.463    -7.677523    3.496314
                             isco1 |   .3180188     .29924     1.06   0.288    -.2684807    .9045183
                             isco2 |   .0778526   .0889717     0.88   0.382    -.0965289     .252234
                             isco3 |  -.0472107   .0827847    -0.57   0.568    -.2094657    .1150443
                             isco4 |  -.1510383   .1115678    -1.35   0.176    -.3697072    .0676306
                             isco5 |  -.0233371   .0378759    -0.62   0.538    -.0975725    .0508984
                             isco6 |  -.0085724   .0120148    -0.71   0.476    -.0321211    .0149762
                             isco7 |  -.0695913   .1132384    -0.61   0.539    -.2915345    .1523518
                             isco8 |  -.0376058   .0455883    -0.82   0.409    -.1269573    .0517457
                             isco9 |  -.0118957   .0172813    -0.69   0.491    -.0457665    .0219751
                             exper |   .2904817   .2123158     1.37   0.171    -.1256496     .706613
                                d1 |   .0177125   .0346684     0.51   0.609    -.0502363    .0856613
                                d2 |  -.0217861   .0579758    -0.38   0.707    -.1354165    .0918443
                                d3 |  -.1074791    .093678    -1.15   0.251    -.2910846    .0761263
                                d4 |  -.0053417   .0443941    -0.12   0.904    -.0923526    .0816692
                                d5 |   .1280567   .1061416     1.21   0.228     -.079977    .3360903
                            tenure |   .2933421    .298469     0.98   0.326    -.2916463    .8783306
                             _cons |   2.186871   2.838048     0.77   0.441    -3.375602    7.749344
                      ------------------------------------------------------------------------------
                      
                      .
                      .
                      . oaxaca_rif lnwage educ  normalize(isco?) exper normalize(d1 d2 d3 d4 d5) ten
                      > ure, by(female) rif(q (.25)) noi
                      No wgt specified. Using default 0
                      No Reweighted Strategy Choosen
                      Estimating Standard RIF-OAXACA using RIF:q (.25)
                      RIF regression group 1
                      variable normalize not found
                      r(111);
                      
                      end of do-file
                      
                      r(111);

                      Comment


                      • #12
                        Both commands are updated.

                        Code:
                        . which oaxaca
                        C:\Users\amus\ado\plus\o\oaxaca.ado
                        *! version 4.1.1  24apr2023  Ben Jann
                        
                        . which oaxaca_rif
                        C:\Users\amus\ado\plus\o\oaxaca_rif.ado
                        *!version 2.4 Nov 2020 Fernando Rios Avila
                        In my versions, the -noisily- option does not cause an error, but Hua Peng (StataCorp) points out the source of your error. I suggest that you update both commands.

                        Code:
                        ado uninstall oaxaca
                        ado uninstall rif
                        ssc install oaxaca, replace
                        ssc install rif, replace
                        In my versions:

                        Code:
                        . oaxaca_rif lnwage educ  normalize(isco?) exper normalize(d?) tenure, by(female) rif(q (.
                        > 25)) noi
                        No wgt specified. Using default 0
                        No Reweighted Strategy Choosen
                        Estimating Standard RIF-OAXACA using RIF:q (.25)
                        RIF regression group 1
                        
                              Source |       SS           df       MS      Number of obs   =       751
                        -------------+----------------------------------   F(15, 735)      =      1.06
                               Model |  169.207984        15  11.2805323   Prob > F        =    0.3950
                            Residual |  7852.81428       735  10.6841011   R-squared       =    0.0211
                        -------------+----------------------------------   Adj R-squared   =    0.0011
                               Total |  8022.02226       750  10.6960297   Root MSE        =    3.2687
                        
                        ------------------------------------------------------------------------------
                              lnwage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                        -------------+----------------------------------------------------------------
                                educ |   .0676772   .0608851     1.11   0.267    -.0518523    .1872067
                               isco2 |  -.1446463   .5089586    -0.28   0.776    -1.143832    .8545396
                               isco3 |   .0163759    .478455     0.03   0.973    -.9229255    .9556772
                               isco4 |  -1.167269   .5797367    -2.01   0.044    -2.305406    -.029132
                               isco5 |   .1319563   .6493461     0.20   0.839    -1.142838     1.40675
                               isco6 |   .0264962   .9442005     0.03   0.978    -1.827155    1.880148
                               isco7 |   .1072399   .5060465     0.21   0.832     -.886229    1.100709
                               isco8 |   .0346529    .662847     0.05   0.958    -1.266646    1.335952
                               isco9 |   .1111322   .8863438     0.13   0.900    -1.628935      1.8512
                               exper |    .010709   .0137382     0.78   0.436    -.0162617    .0376798
                                  d2 |  -.0042975   .3697704    -0.01   0.991    -.7302295    .7216346
                                  d3 |  -.6558168   .3840622    -1.71   0.088    -1.409806    .0981729
                                  d4 |  -.0000969   .3764017    -0.00   1.000    -.7390474    .7388536
                                  d5 |  -.0424038   .3737707    -0.11   0.910    -.7761892    .6913817
                              tenure |  -.0018105   .0166375    -0.11   0.913    -.0344731    .0308521
                               _cons |   .5124414   .8970686     0.57   0.568    -1.248681    2.273564
                        ------------------------------------------------------------------------------
                        Distributional Statistic: q (.25)
                        Sample Mean    RIF q (.25) :  1.2207
                        RIF regression group 2
                        
                              Source |       SS           df       MS      Number of obs   =       683
                        -------------+----------------------------------   F(15, 667)      =      3.31
                               Model |  622.684138        15  41.5122759   Prob > F        =    0.0000
                            Residual |   8369.7025       667  12.5482796   R-squared       =    0.0692
                        -------------+----------------------------------   Adj R-squared   =    0.0483
                               Total |  8992.38664       682  13.1853176   Root MSE        =    3.5424
                        
                        ------------------------------------------------------------------------------
                              lnwage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
                        -------------+----------------------------------------------------------------
                                educ |   .2454926   .0688244     3.57   0.000      .110354    .3806311
                               isco2 |   3.285444   .8317743     3.95   0.000     1.652233    4.918656
                               isco3 |   4.002273   .7512809     5.33   0.000     2.527112    5.477433
                               isco4 |   4.282636   .7800468     5.49   0.000     2.750993    5.814279
                               isco5 |    4.33645   .7983784     5.43   0.000     2.768812    5.904088
                               isco6 |   4.261599   1.742283     2.45   0.015      .840579     7.68262
                               isco7 |    4.27115   .9747666     4.38   0.000      2.35717     6.18513
                               isco8 |   4.498182   1.405783     3.20   0.001     1.737888    7.258476
                               isco9 |   4.413891   .9691654     4.55   0.000     2.510908    6.316873
                               exper |  -.0099614   .0198226    -0.50   0.615    -.0488835    .0289607
                                  d2 |   .1807056   .4276512     0.42   0.673    -.6589991     1.02041
                                  d3 |   .0287662   .4240852     0.07   0.946    -.8039365    .8614689
                                  d4 |   .1096888   .4436734     0.25   0.805    -.7614759    .9808535
                                  d5 |   -.612237   .4479133    -1.37   0.172    -1.491727    .2672529
                              tenure |  -.0345137   .0241098    -1.43   0.153    -.0818539    .0128265
                               _cons |  -5.569225    1.16328    -4.79   0.000    -7.853356   -3.285094
                        ------------------------------------------------------------------------------
                        Distributional Statistic: q (.25)
                        Sample Mean    RIF q (.25) :  .72591
                        Model  : Blinder-Oaxaca RIF-decomposition
                        Type   : Standard
                        RIF    : q (.25)
                        Scale  : 1
                        Group 1: female = 0 x1*b1                        N of obs 1      = 751
                        Group c: x1*b2                                   N of obs C      =          .
                        Group 2: female = 1 x2*b2                        N of obs 2      = 683
                        
                        ------------------------------------------------------------------------------
                              lnwage | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
                        -------------+----------------------------------------------------------------
                        overall      |
                             group_1 |   1.220684   .1205276    10.13   0.000     .9844542    1.456914
                             group_2 |   .7255667   .1398974     5.19   0.000     .4513727    .9997606
                          difference |   .4951174    .184657     2.68   0.007     .1331964    .8570385
                           explained |  -.2427564   .1635712    -1.48   0.138      -.56335    .0778372
                         unexplained |   .7378739   .2414664     3.06   0.002     .2646085    1.211139
                        -------------+----------------------------------------------------------------
                        explained    |
                                educ |   .1424212   .0505807     2.82   0.005     .0432848    .2415575
                               isco1 |  -.1746119   .0561929    -3.11   0.002    -.2847479   -.0644758
                               isco2 |  -.0403393   .0484191    -0.83   0.405    -.1352391    .0545604
                               isco3 |   -.026282   .0305506    -0.86   0.390    -.0861601     .033596
                               isco4 |  -.0717528   .0474355    -1.51   0.130    -.1647246     .021219
                               isco5 |  -.0717619   .0461875    -1.55   0.120    -.1622876    .0187639
                               isco6 |   .0070086   .0182749     0.38   0.701    -.0288097    .0428268
                               isco7 |   .0847875    .095306     0.89   0.374    -.1020088    .2715839
                               isco8 |   .0348086   .0483734     0.72   0.472    -.0600015    .1296186
                               isco9 |  -.0161487   .0157335    -1.03   0.305    -.0469859    .0146884
                               exper |   -.019249   .0386475    -0.50   0.618    -.0949966    .0564987
                                  d1 |   .0013112    .006338     0.21   0.836    -.0111111    .0137334
                                  d2 |  -.0005193   .0052087    -0.10   0.921    -.0107282    .0096895
                                  d3 |  -.0038417   .0116722    -0.33   0.742    -.0267187    .0190354
                                  d4 |   .0016427   .0044254     0.37   0.710     -.007031    .0103164
                                  d5 |  -.0077536   .0121092    -0.64   0.522    -.0314872      .01598
                              tenure |  -.0824759   .0593892    -1.39   0.165    -.1988766    .0339248
                        -------------+----------------------------------------------------------------
                        unexplained  |
                                educ |  -2.090598   1.083597    -1.93   0.054     -4.21441    .0332134
                               isco1 |    .318019   .0771499     4.12   0.000      .166808      .46923
                               isco2 |   .0778525   .1261075     0.62   0.537    -.1693136    .3250186
                               isco3 |  -.0472105    .112141    -0.42   0.674    -.2670028    .1725819
                               isco4 |  -.1510392   .0523422    -2.89   0.004    -.2536282   -.0484503
                               isco5 |   -.023337   .0361153    -0.65   0.518    -.0941216    .0474476
                               isco6 |  -.0085724   .0322886    -0.27   0.791    -.0718568     .054712
                               isco7 |   -.069591   .1358303    -0.51   0.608    -.3358135    .1966314
                               isco8 |  -.0376057   .0681426    -0.55   0.581    -.1711628    .0959513
                               isco9 |  -.0118957   .0226751    -0.52   0.600    -.0563381    .0325468
                               exper |   .2904832   .3388053     0.86   0.391    -.3735629    .9545293
                                  d1 |   .0177128   .0782637     0.23   0.821    -.1356813    .1711069
                                  d2 |  -.0217858   .0755302    -0.29   0.773    -.1698222    .1262506
                                  d3 |    -.10748   .0651388    -1.65   0.099    -.2351496    .0201896
                                  d4 |  -.0053414   .0722349    -0.07   0.941    -.1469193    .1362364
                                  d5 |   .1280569   .0738223     1.73   0.083    -.0166322     .272746
                              tenure |   .2933421   .2633243     1.11   0.265    -.2227639    .8094482
                               _cons |   2.186865   1.123436     1.95   0.052    -.0150287    4.388758
                        ------------------------------------------------------------------------------
                        Last edited by Andrew Musau; 14 May 2026, 11:00.

                        Comment


                        • #13
                          Thanks. When dropping the noisily option, it works.
                          But I did not succeed in updating oaxaca_rif as suggested. This is what I got:
                          Code:
                          . which oaxaca_rif
                          C:\Users\aless\ado\plus\o\oaxaca_rif.ado
                          *! version 2.2 July 2019  Author Fernando Rios Avila
                          
                          . ado uninstall oaxaca_rif
                          package not found
                          r(111);
                          
                          . ssc install oaxaca_rif, replace
                          ssc install: "oaxaca_rif" not found at SSC, type search oaxaca_rif
                          (To find all packages at SSC that start with o, type ssc describe o)
                          r(601);

                          Comment


                          • #14
                            The package name is rif and oaxaca_rif is a command within it. ssc wants a package name.

                            I think you need

                            Code:
                            ssc install rif, replace

                            Comment


                            • #15
                              I reinstalled rif, and now oaxaca_rif works, i.e., the normalize option is no more taken as a variable.
                              So this solved the problem. Thank you very much for your help

                              Comment

                              Working...
                              X