Announcement

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

  • Simple OLS model

    Hello, I am working to analyse the study: Contract farming and rural transformation: Evidence from a field experiment in Benin by Arouna et al (2021). Available at: https://doi.org/10.1016/j.jdeveco.2021.102626

    I am currently trying to reproduce Panel B OLS (1) and (2) of Table 5: Treatment effects on farming contract [T-C] by using a simple OLS model provided by researchers. It shows the treatment effect of the contract on yield (kg/ha).

    The code I have typed in Stata is below:

    // For OLS (1) which does not include household covariates
    reg ryield treated
    xi: regress arrond treated
    di 479.3533 + _b[treated]

    // For OLS (2), which includes household covariates
    reg ryield treated
    reg treated hhsize_15 age_15 rice_exp_15 sex_15 primeduc_15 agric_15 rice_forma_15 assoc_15 arrond
    di 479.3533 + _b[hhsize_15] + _b[age_15] + _b[rice_exp_15] + _b[sex_15] + _b[primeduc_15] + _b[agric_15] + _b[rice_forma_15] + _b[assoc_15] + _b[arrond] // OLS(2)

    Compared to Table 5, I got similar outcomes of treatment effect but not the same. In addition, I could not get any similar standard errors and r-squared. Do you recognise any mistakes in the command I used? I assume I am not correctly adding arrondissement fixed effect or idiosyncratic error term orthnogonal to treatment.

    I am new to Stata and I am looking forward to hearing back kind response! Thank you.

  • #2
    Not sure why you are regressing the fixed effect arrond on treated.

    The model in the paper includes a fixed effect (arrondissement) and the SE are clustered at the farmer group level.

    Code:
    areg yield treated , absorb(arrond) cluster(farmergroup)
    areg yield treated X, absorb(arrond) cluster(farmergroup)
    
    reghdfe yield treated , absorb(arrond) cluster(farmergroup)
    reghdfe yield treated X, absorb(arrond) cluster(farmergroup)

    Comment


    • #3
      The paper provides the do file. They are using randomized inference to test treated coefficient based on the distribution of the coefficient (not the t).

      But you see the model is basically:

      reg ryield treated i.arond, cluster(groupement)

      if you absorb the FE, then the SE will be slightly different.

      Code:
      /* Panel B: yield */
      /* OLS */
      ritest treated _b[treated], cluster(groupement) strata(depart arrond) reps(1000) seed(0) nodots saving(ri_ryield_1, replace): ///
          reg ryield treated $arond, vce(cl groupement)
              outreg2 using "CTb_jde.doc", ///
              title (Table 5b: Treatment effects on yield) ctitle (OLS) ///
              drop(_a*) se dec(3) label replace nocons ///
              addtext(Arrondissement FE, Yes, Household Covariates, No)

      Comment


      • #4
        Hello George Ford

        Thank you for your reply!

        The command:
        areg ryield treated, absorb(arrond) cluster(groupement)

        worked well. However, I am not sure what it means by the x of the following command:

        reg ryield treated X, absorb(arrond) cluster(groupement)

        In addition, for OLS (2), I have applied your command which looks like below:

        areg ryield treated hhsize_15 age_15 rice_exp_15 sex_15 primeduc_15 agric_15 rice_forma_15 assoc_15, absorb(arrond) cluster(groupement)

        Although the treatment effect and SE look the same to the original paper, the R-squared is different. Do you recognise any mistake I have made? I am looking forward to hearing back from you.

        Comment


        • #5
          In addition, could you please tell me the difference between areg and reghdfe?

          Can I use are for OLS (1) and reghdf for OLS (2)?

          Comment


          • #6
            Mari:
            you should take a look at -areg- and regress entries in Stata .pdf manual and see the different ways theu calculate the R-sq.
            As per its helpfile, the community-contributed module -reghdfe- allows the calculation of -xtreg,fe- with n-way fixed effects.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              By X is mean your X regressors.

              Not sure about the R2, but there are several ways to calculate it.

              areg allows you to absorb a single fixed effect. (you can also do it with reg, absorb).

              reghdfe allows for multiple, high dimensional fixed effects. I use it pretty much exclusively for fixed effect regression.

              I've been able to replicate the results exactly with either areg or reghdfe (R2 too) using their provided code/data.

              Comment


              • #8
                George Ford Thank you for your response. I have tried again, and the command worked well for both OLS(1) and (2). Thank you for your support!

                Comment


                • #9
                  Carlo Lazzaro Thank you for your suggestion! It will help me a lot.

                  Comment

                  Working...
                  X