-------------
      name:  <unnamed>
       log:  /Users/DSP/Google Drive/UCSC/Teaching/Econ120_F20/Analysis/doFiles/Econ120_F20_Section2.smcl
  log type:  smcl
 opened on:  14 Oct 2020, 01:40:50

.
. use "dtaFiles/farming.dta", clear

.
. // Exporting (nice-looking) sumstat table
. eststo s2_tab1: estpost su age gender edu_years married, d

   | e(count)    e(sum_w)    e(mean)    e(Var)    e(sd)    e(skewn~)
-------------+------------------------------------------------------------------
age   |      1047         1047     42.63992     171.3339     13.08946     .5193416
gender   |      1047         1047      .469914      .249333     .4993325     .1205623
edu_years   |      1040         1040     8.665385     11.00053     3.316705     -.761239
married   |      1044         1044     .8908046      .097365     .3120337    -2.506088

   | e(kurto~)    e(sum)    e(min)    e(max)    e(p1)    e(p5)
-------------+------------------------------------------------------------------
age   |  2.845444        44644           18           90           21           24
gender   |  1.014535          492            0            1            0            0
edu_years   |   3.00167         9012            0           14            0            2
married   |  7.280475          930            0            1            0            0

   | e(p10)    e(p25)    e(p50)    e(p75)    e(p90)    e(p95)
-------------+------------------------------------------------------------------
age   |        26           32           41           51           60           67
gender   |         0            0            0            1            1            1
edu_years   |         4            7            8           12           12           12
married   |         0            1            1            1            1            1

   | e(p99)
-------------+-----------
age   |        75
gender   |         1
edu_years   |        13
married   |         1

. esttab s2_tab1 using "output/Section2_table1_raw.csv", replace cells("mean(fmt(%9.2f)) sd(fmt(%9.2f)) count(fmt(%9.0fc))") nonumber nomtitle noobs plain
(output written to `"output/Section2_table1_raw.csv"')

.
. // Using Stata as calculator
. su revenue_blue revenue_unmarked, d

                    revenue on blue plot
-------------------------------------------------------------
      Percentiles      Smallest
 1%     1300.486              0
 5%     2948.775        604.877
10%     3780.481       756.0963       Obs                 840
25%     5443.893       907.3156       Sum of Wgt.         840

50%     7409.743                      Mean           7631.081
                        Largest       Std. Dev.      2974.044
75%     9678.032       15575.58
90%     11492.66       17390.21       Variance        8844940
95%      12551.2       17995.09       Skewness       .2306481
99%     15121.92       18297.53       Kurtosis        2.97448

                  revenue on unmarked plot
-------------------------------------------------------------
      Percentiles      Smallest
 1%      604.877              0
 5%     1814.631              0
10%     2419.508              0       Obs                 837
25%      4082.92              0       Sum of Wgt.         837

50%      6048.77                      Mean           6257.677
                        Largest       Std. Dev.       3107.03
75%      8165.84       14970.71
90%     10282.91       15273.14       Variance        9653637
95%     11643.88       17238.99       Skewness       .8625552
99%     14517.05       29638.97       Kurtosis       6.384284

. display (7631-6257)/6257
.21959405

.
. // Mean difference test (t-test)
. ttest revenue_blue = revenue_unmarked

Paired t test
---------+--------------------------------------------------------------------
Variable |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
revenu~e |     832    7645.133    103.2956      2979.5    7442.382    7847.884
revenu~d |     832    6234.395    104.2285    3006.408    6029.813    6438.977
---------+--------------------------------------------------------------------
    diff |     832    1410.737    98.55829    2842.856    1217.285     1604.19
---------+--------------------------------------------------------------------
     mean(diff) = mean(revenue_blue - revenue_unmarked)           t =  14.3137
 Ho: mean(diff) = 0                              degrees of freedom =      831

 Ha: mean(diff) < 0           Ha: mean(diff) != 0           Ha: mean(diff) > 0
 Pr(T < t) = 1.0000         Pr(|T| > |t|) = 0.0000          Pr(T > t) = 0.0000

.
. // Referring to (non)missing observations for a variable
. count if missing(training)
  93

. count if !mi(training)
  1,155

.
.         // Another way
.         count if training==.
  93

.         count if training!=.
  1,155

.
. // Generating a binary variable equal to 1 if satisfying a condition
. gen dropped = .
(1,248 missing values generated)

. replace dropped = 1 if !mi(training) & harvest!=1
(367 real changes made)

. replace dropped = 0 if !mi(training) & harvest==1
(788 real changes made)

.
.         // A more streamlined way
.         gen dropped2 = (harvest!=1) if !mi(training)
(93 missing values generated)

.         compare dropped dropped2 // just to check whether the 2 vars are identical

                                        ---------- difference ----------
                            count       minimum      average     maximum
------------------------------------------------------------------------
dropped=dropped2             1155
                       ----------
jointly defined              1155             0            0           0
jointly missing                93
                       ----------
total                        1248

.
. // Testing for differences
. reg ever_anyfert dropped

      Source |       SS           df       MS      Number of obs   =       821
-------------+----------------------------------   F(1, 819)       =      1.35
       Model |  .142946599         1  .142946599   Prob > F        =    0.2462
    Residual |  86.9191728       819  .106128416   R-squared       =    0.0016
-------------+----------------------------------   Adj R-squared   =    0.0004
       Total |  87.0621194       820  .106173316   Root MSE        =    .32577

-------------+----------------------------------------------------------------
 ever_anyfert |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     dropped |    .0320216    .0275913      1.16    0.246     -.0221364     .0861796
       _cons |    .8724728    .0128473     67.91    0.000      .8472554     .8976902
-------------+----------------------------------------------------------------

.
. // Doing this for multiple variables
. local i = 1

. foreach YYY in age gender edu_years married {
  2.         eststo s2_reg_`i': reg `YYY' dropped
  3.         su `yvar' if dropped==0
  4.         estadd scalar nondroppedmean = r(mean)
  5.         local i = `i' + 1
  6. }

      Source |       SS           df       MS      Number of obs   =       996
-------------+----------------------------------   F(1, 994)       =      1.85
       Model |  316.190476         1  316.190476   Prob > F        =    0.1742
    Residual |  169988.143       994  171.014228   R-squared       =    0.0019
-------------+----------------------------------   Adj R-squared   =    0.0009
       Total |  170304.333       995  171.160134   Root MSE        =    13.077

-------------+----------------------------------------------------------------
          age |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     dropped |    -1.31746    .9689007     -1.36    0.174     -3.218786     .5838653
       _cons |    43.15079    .4756147     90.73    0.000      42.21747     44.08412
-------------+----------------------------------------------------------------

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
respondent~d |        788    6829.675    3962.465        101      13506
     groupid |        788    6824.619    3962.272        100      13500
    training |        788    .4720812     .499537          0          1
     harvest |        788           1           0          1          1
  monitoring |        757           1           0          1          1
-------------+---------------------------------------------------------
       added |          0
         age |        756    43.15079    12.83821         19         90
      gender |        756    .4656085    .4991461          0          1
readkiswah~i |        752    .8949468     .306826          0          1
writekiswa~i |        752    .8776596    .3278967          0          1
-------------+---------------------------------------------------------
readandwrite |        751    .8774967    .3280847          0          1
   edu_years |        750       8.732    3.339118          0         14
edu_years_~e |        660         8.9    3.106457          0         14
     married |        753    .8977424    .3031882          0          1
size_house~d |        754    6.949602    2.683402          1         20
-------------+---------------------------------------------------------
  land_owned |        747    3.475571    3.798668          0         45
value_anim~s |        757    39230.54    44053.87          0     597500
 value_tools |        756    4944.435    7799.618          0     163980
value_hous~s |        757    18969.26    20737.97          0     245930
ever_anyfert |        643    .8724728    .3338223          0          1
-------------+---------------------------------------------------------
 ever_hybrid |        637    .9466248    .2249572          0          1
 ever_manure |        642    .7227414    .4479943          0          1
ever_pesti~e |        641    .0280811    .1653337          0          1
lastyr_any~t |        645    .7348837    .4417377          0          1
lastyr_hyb~d |        646    .9179567    .2746434          0          1
-------------+---------------------------------------------------------
lastyr_man~e |        642     .529595    .4995125          0          1
lastyr_pes~e |        632    .0189873    .1365882          0          1
   acres_rof |        722    1.479457     1.47146          0       13.5
revenue_blue |        763      7672.9    3008.429          0   18297.53
revenue_un~d |        761    6237.605    3046.195          0   17238.99
-------------+---------------------------------------------------------
kg_tdfert_~e |        770     12.3539     1.35879          0         25
kg_plantfe~e |        737    11.32225    3.320426          0         25
packets_hy~e |        742    1.376456    .4753537          0         10
kg_tdfert_~d |        768    8.076172    7.176649          0         75
kg_plantfe~d |        732    6.255396    6.360199          0         25
-------------+---------------------------------------------------------
packets_hy~d |        738    1.329417    .5889743          0         10
kg_tdfert_~f |        663    20.17873    35.43888          0        300
kg_plantfe~f |        708    30.09958    71.41813          0       1000
packets_hy~f |        715    5.157692    5.507797          0         60
to~wing_blue |        788    19.28902    26.49476          0        300
-------------+---------------------------------------------------------
to~ting_blue |        788     7.91434    5.195843          0         32
t~tfert_blue |        788    6.740799    5.074727          0         39
to~ding_blue |        788     34.5066    28.07186          0        320
t~dfert_blue |        788    7.074873    6.360274          0         48
total~e_blue |        788    .5507614      2.6625          0         30
-------------+---------------------------------------------------------
tota~nt_blue |        788     7.32868    15.79926          0        168
total_time.. |        788    18.55425    24.85319          0        300
total_time.. |        788    7.645305      5.1519          0         32
total_time.. |        788    4.549492    5.822018          0         80
total_time.. |        788    33.69036    27.42008          0        320
-------------+---------------------------------------------------------
total_time.. |        788    4.926396    6.094526          0         50
t~e_unmarked |        788    2.132614    6.119562          0        120
~nt_unmarked |        788    6.739848     14.7652          0        168
tot~wing_rof |        788    50.78414    70.02405          0        728
tot~ting_rof |        788     11.5203    11.72074          0         84
-------------+---------------------------------------------------------
to~tfert_rof |        788    5.463198    9.675874          0         84
tot~ding_rof |        788     64.4184    98.67568          0       1575
to~dfert_rof |        788    5.546954    9.690887          0         84
total_~e_rof |        788    3.576142    8.807769          0        120
total~nt_rof |        788    6.163071    14.61011          0        168
-------------+---------------------------------------------------------
use_spacin~l |        747    .5568942    .4970853          0          1
tdqty_1orm~p |        775    .0993548     .299331          0          1
 tdqty_12tsp |        775    .8090323    .3933175          0          1
    tdqty_DK |        775           0           0          0          0
td_time_kn~h |        775           0           0          0          0
-------------+---------------------------------------------------------
  spacing_DK |        772    .0660622    .2485518          0          1
spacing_l~20 |        772    .0867876     .281706          0          1
facilitato~e |        712    8.460674     .935996          4         10
facilitato~d |        712    7.630618    1.131229          2         10
facilitato~f |        741    6.438596    3.859431          0         99
-------------+---------------------------------------------------------
  group_blue |        771    8.024643    1.300615          1         10
group_unma~d |        770    7.238961    1.448748          1         10
   group_rof |        750    6.142667    1.983825          0         10
NGO_kick_o~y |        709    .4344147    .4960298          0          1
NGO_keep_y~h |        681    .6490455    .4776195          0          1
-------------+---------------------------------------------------------
     dropped |        788           0           0          0          0
    dropped2 |        788           0           0          0          0
_est_s2_re~1 |        788    .9593909    .1975083          0          1

added scalar:
     e(nondroppedmean) =  .95939086

      Source |       SS           df       MS      Number of obs   =       996
-------------+----------------------------------   F(1, 994)       =      0.00
       Model |  .000203991         1  .000203991   Prob > F        =    0.9772
    Residual |  247.839153       994  .249335164   R-squared       =    0.0000
-------------+----------------------------------   Adj R-squared   =   -0.0010
       Total |  247.839357       995  .249084781   Root MSE        =    .49933

-------------+----------------------------------------------------------------
       gender |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     dropped |    .0010582     .036996      0.03    0.977     -.0715411     .0736575
       _cons |    .4656085    .0181606     25.64    0.000      .4299709      .501246
-------------+----------------------------------------------------------------

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
respondent~d |        788    6829.675    3962.465        101      13506
     groupid |        788    6824.619    3962.272        100      13500
    training |        788    .4720812     .499537          0          1
     harvest |        788           1           0          1          1
  monitoring |        757           1           0          1          1
-------------+---------------------------------------------------------
       added |          0
         age |        756    43.15079    12.83821         19         90
      gender |        756    .4656085    .4991461          0          1
readkiswah~i |        752    .8949468     .306826          0          1
writekiswa~i |        752    .8776596    .3278967          0          1
-------------+---------------------------------------------------------
readandwrite |        751    .8774967    .3280847          0          1
   edu_years |        750       8.732    3.339118          0         14
edu_years_~e |        660         8.9    3.106457          0         14
     married |        753    .8977424    .3031882          0          1
size_house~d |        754    6.949602    2.683402          1         20
-------------+---------------------------------------------------------
  land_owned |        747    3.475571    3.798668          0         45
value_anim~s |        757    39230.54    44053.87          0     597500
 value_tools |        756    4944.435    7799.618          0     163980
value_hous~s |        757    18969.26    20737.97          0     245930
ever_anyfert |        643    .8724728    .3338223          0          1
-------------+---------------------------------------------------------
 ever_hybrid |        637    .9466248    .2249572          0          1
 ever_manure |        642    .7227414    .4479943          0          1
ever_pesti~e |        641    .0280811    .1653337          0          1
lastyr_any~t |        645    .7348837    .4417377          0          1
lastyr_hyb~d |        646    .9179567    .2746434          0          1
-------------+---------------------------------------------------------
lastyr_man~e |        642     .529595    .4995125          0          1
lastyr_pes~e |        632    .0189873    .1365882          0          1
   acres_rof |        722    1.479457     1.47146          0       13.5
revenue_blue |        763      7672.9    3008.429          0   18297.53
revenue_un~d |        761    6237.605    3046.195          0   17238.99
-------------+---------------------------------------------------------
kg_tdfert_~e |        770     12.3539     1.35879          0         25
kg_plantfe~e |        737    11.32225    3.320426          0         25
packets_hy~e |        742    1.376456    .4753537          0         10
kg_tdfert_~d |        768    8.076172    7.176649          0         75
kg_plantfe~d |        732    6.255396    6.360199          0         25
-------------+---------------------------------------------------------
packets_hy~d |        738    1.329417    .5889743          0         10
kg_tdfert_~f |        663    20.17873    35.43888          0        300
kg_plantfe~f |        708    30.09958    71.41813          0       1000
packets_hy~f |        715    5.157692    5.507797          0         60
to~wing_blue |        788    19.28902    26.49476          0        300
-------------+---------------------------------------------------------
to~ting_blue |        788     7.91434    5.195843          0         32
t~tfert_blue |        788    6.740799    5.074727          0         39
to~ding_blue |        788     34.5066    28.07186          0        320
t~dfert_blue |        788    7.074873    6.360274          0         48
total~e_blue |        788    .5507614      2.6625          0         30
-------------+---------------------------------------------------------
tota~nt_blue |        788     7.32868    15.79926          0        168
total_time.. |        788    18.55425    24.85319          0        300
total_time.. |        788    7.645305      5.1519          0         32
total_time.. |        788    4.549492    5.822018          0         80
total_time.. |        788    33.69036    27.42008          0        320
-------------+---------------------------------------------------------
total_time.. |        788    4.926396    6.094526          0         50
t~e_unmarked |        788    2.132614    6.119562          0        120
~nt_unmarked |        788    6.739848     14.7652          0        168
tot~wing_rof |        788    50.78414    70.02405          0        728
tot~ting_rof |        788     11.5203    11.72074          0         84
-------------+---------------------------------------------------------
to~tfert_rof |        788    5.463198    9.675874          0         84
tot~ding_rof |        788     64.4184    98.67568          0       1575
to~dfert_rof |        788    5.546954    9.690887          0         84
total_~e_rof |        788    3.576142    8.807769          0        120
total~nt_rof |        788    6.163071    14.61011          0        168
-------------+---------------------------------------------------------
use_spacin~l |        747    .5568942    .4970853          0          1
tdqty_1orm~p |        775    .0993548     .299331          0          1
 tdqty_12tsp |        775    .8090323    .3933175          0          1
    tdqty_DK |        775           0           0          0          0
td_time_kn~h |        775           0           0          0          0
-------------+---------------------------------------------------------
  spacing_DK |        772    .0660622    .2485518          0          1
spacing_l~20 |        772    .0867876     .281706          0          1
facilitato~e |        712    8.460674     .935996          4         10
facilitato~d |        712    7.630618    1.131229          2         10
facilitato~f |        741    6.438596    3.859431          0         99
-------------+---------------------------------------------------------
  group_blue |        771    8.024643    1.300615          1         10
group_unma~d |        770    7.238961    1.448748          1         10
   group_rof |        750    6.142667    1.983825          0         10
NGO_kick_o~y |        709    .4344147    .4960298          0          1
NGO_keep_y~h |        681    .6490455    .4776195          0          1
-------------+---------------------------------------------------------
     dropped |        788           0           0          0          0
    dropped2 |        788           0           0          0          0
_est_s2_re~1 |        788    .9593909    .1975083          0          1
_est_s2_re~2 |        788    .9593909    .1975083          0          1

added scalar:
     e(nondroppedmean) =  .95939086

      Source |       SS           df       MS      Number of obs   =       989
-------------+----------------------------------   F(1, 987)       =      0.63
       Model |  6.99360763         1  6.99360763   Prob > F        =    0.4267
    Residual |  10918.5797       987  11.0623908   R-squared       =    0.0006
-------------+----------------------------------   Adj R-squared   =   -0.0004
       Total |  10925.5733       988  11.0582726   Root MSE        =     3.326

-------------+----------------------------------------------------------------
    edu_years |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     dropped |   -.1964351    .2470547     -0.80    0.427     -.6812479     .2883776
       _cons |       8.732     .121449     71.90    0.000      8.493672     8.970328
-------------+----------------------------------------------------------------

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
respondent~d |        788    6829.675    3962.465        101      13506
     groupid |        788    6824.619    3962.272        100      13500
    training |        788    .4720812     .499537          0          1
     harvest |        788           1           0          1          1
  monitoring |        757           1           0          1          1
-------------+---------------------------------------------------------
       added |          0
         age |        756    43.15079    12.83821         19         90
      gender |        756    .4656085    .4991461          0          1
readkiswah~i |        752    .8949468     .306826          0          1
writekiswa~i |        752    .8776596    .3278967          0          1
-------------+---------------------------------------------------------
readandwrite |        751    .8774967    .3280847          0          1
   edu_years |        750       8.732    3.339118          0         14
edu_years_~e |        660         8.9    3.106457          0         14
     married |        753    .8977424    .3031882          0          1
size_house~d |        754    6.949602    2.683402          1         20
-------------+---------------------------------------------------------
  land_owned |        747    3.475571    3.798668          0         45
value_anim~s |        757    39230.54    44053.87          0     597500
 value_tools |        756    4944.435    7799.618          0     163980
value_hous~s |        757    18969.26    20737.97          0     245930
ever_anyfert |        643    .8724728    .3338223          0          1
-------------+---------------------------------------------------------
 ever_hybrid |        637    .9466248    .2249572          0          1
 ever_manure |        642    .7227414    .4479943          0          1
ever_pesti~e |        641    .0280811    .1653337          0          1
lastyr_any~t |        645    .7348837    .4417377          0          1
lastyr_hyb~d |        646    .9179567    .2746434          0          1
-------------+---------------------------------------------------------
lastyr_man~e |        642     .529595    .4995125          0          1
lastyr_pes~e |        632    .0189873    .1365882          0          1
   acres_rof |        722    1.479457     1.47146          0       13.5
revenue_blue |        763      7672.9    3008.429          0   18297.53
revenue_un~d |        761    6237.605    3046.195          0   17238.99
-------------+---------------------------------------------------------
kg_tdfert_~e |        770     12.3539     1.35879          0         25
kg_plantfe~e |        737    11.32225    3.320426          0         25
packets_hy~e |        742    1.376456    .4753537          0         10
kg_tdfert_~d |        768    8.076172    7.176649          0         75
kg_plantfe~d |        732    6.255396    6.360199          0         25
-------------+---------------------------------------------------------
packets_hy~d |        738    1.329417    .5889743          0         10
kg_tdfert_~f |        663    20.17873    35.43888          0        300
kg_plantfe~f |        708    30.09958    71.41813          0       1000
packets_hy~f |        715    5.157692    5.507797          0         60
to~wing_blue |        788    19.28902    26.49476          0        300
-------------+---------------------------------------------------------
to~ting_blue |        788     7.91434    5.195843          0         32
t~tfert_blue |        788    6.740799    5.074727          0         39
to~ding_blue |        788     34.5066    28.07186          0        320
t~dfert_blue |        788    7.074873    6.360274          0         48
total~e_blue |        788    .5507614      2.6625          0         30
-------------+---------------------------------------------------------
tota~nt_blue |        788     7.32868    15.79926          0        168
total_time.. |        788    18.55425    24.85319          0        300
total_time.. |        788    7.645305      5.1519          0         32
total_time.. |        788    4.549492    5.822018          0         80
total_time.. |        788    33.69036    27.42008          0        320
-------------+---------------------------------------------------------
total_time.. |        788    4.926396    6.094526          0         50
t~e_unmarked |        788    2.132614    6.119562          0        120
~nt_unmarked |        788    6.739848     14.7652          0        168
tot~wing_rof |        788    50.78414    70.02405          0        728
tot~ting_rof |        788     11.5203    11.72074          0         84
-------------+---------------------------------------------------------
to~tfert_rof |        788    5.463198    9.675874          0         84
tot~ding_rof |        788     64.4184    98.67568          0       1575
to~dfert_rof |        788    5.546954    9.690887          0         84
total_~e_rof |        788    3.576142    8.807769          0        120
total~nt_rof |        788    6.163071    14.61011          0        168
-------------+---------------------------------------------------------
use_spacin~l |        747    .5568942    .4970853          0          1
tdqty_1orm~p |        775    .0993548     .299331          0          1
 tdqty_12tsp |        775    .8090323    .3933175          0          1
    tdqty_DK |        775           0           0          0          0
td_time_kn~h |        775           0           0          0          0
-------------+---------------------------------------------------------
  spacing_DK |        772    .0660622    .2485518          0          1
spacing_l~20 |        772    .0867876     .281706          0          1
facilitato~e |        712    8.460674     .935996          4         10
facilitato~d |        712    7.630618    1.131229          2         10
facilitato~f |        741    6.438596    3.859431          0         99
-------------+---------------------------------------------------------
  group_blue |        771    8.024643    1.300615          1         10
group_unma~d |        770    7.238961    1.448748          1         10
   group_rof |        750    6.142667    1.983825          0         10
NGO_kick_o~y |        709    .4344147    .4960298          0          1
NGO_keep_y~h |        681    .6490455    .4776195          0          1
-------------+---------------------------------------------------------
     dropped |        788           0           0          0          0
    dropped2 |        788           0           0          0          0
_est_s2_re~1 |        788    .9593909    .1975083          0          1
_est_s2_re~2 |        788    .9593909    .1975083          0          1
_est_s2_re~3 |        788    .9517766    .2143739          0          1

added scalar:
     e(nondroppedmean) =  .95177665

      Source |       SS           df       MS      Number of obs   =       993
-------------+----------------------------------   F(1, 991)       =      0.20
       Model |  .019092261         1  .019092261   Prob > F        =    0.6522
    Residual |   93.088662       991  .093934069   R-squared       =    0.0002
-------------+----------------------------------   Adj R-squared   =   -0.0008
       Total |  93.1077543       992  .093858623   Root MSE        =    .30649

-------------+----------------------------------------------------------------
      married |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
     dropped |   -.0102424    .0227187     -0.45    0.652     -.0548246     .0343399
       _cons |    .8977424     .011169     80.38    0.000      .8758248       .91966
-------------+----------------------------------------------------------------

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
respondent~d |        788    6829.675    3962.465        101      13506
     groupid |        788    6824.619    3962.272        100      13500
    training |        788    .4720812     .499537          0          1
     harvest |        788           1           0          1          1
  monitoring |        757           1           0          1          1
-------------+---------------------------------------------------------
       added |          0
         age |        756    43.15079    12.83821         19         90
      gender |        756    .4656085    .4991461          0          1
readkiswah~i |        752    .8949468     .306826          0          1
writekiswa~i |        752    .8776596    .3278967          0          1
-------------+---------------------------------------------------------
readandwrite |        751    .8774967    .3280847          0          1
   edu_years |        750       8.732    3.339118          0         14
edu_years_~e |        660         8.9    3.106457          0         14
     married |        753    .8977424    .3031882          0          1
size_house~d |        754    6.949602    2.683402          1         20
-------------+---------------------------------------------------------
  land_owned |        747    3.475571    3.798668          0         45
value_anim~s |        757    39230.54    44053.87          0     597500
 value_tools |        756    4944.435    7799.618          0     163980
value_hous~s |        757    18969.26    20737.97          0     245930
ever_anyfert |        643    .8724728    .3338223          0          1
-------------+---------------------------------------------------------
 ever_hybrid |        637    .9466248    .2249572          0          1
 ever_manure |        642    .7227414    .4479943          0          1
ever_pesti~e |        641    .0280811    .1653337          0          1
lastyr_any~t |        645    .7348837    .4417377          0          1
lastyr_hyb~d |        646    .9179567    .2746434          0          1
-------------+---------------------------------------------------------
lastyr_man~e |        642     .529595    .4995125          0          1
lastyr_pes~e |        632    .0189873    .1365882          0          1
   acres_rof |        722    1.479457     1.47146          0       13.5
revenue_blue |        763      7672.9    3008.429          0   18297.53
revenue_un~d |        761    6237.605    3046.195          0   17238.99
-------------+---------------------------------------------------------
kg_tdfert_~e |        770     12.3539     1.35879          0         25
kg_plantfe~e |        737    11.32225    3.320426          0         25
packets_hy~e |        742    1.376456    .4753537          0         10
kg_tdfert_~d |        768    8.076172    7.176649          0         75
kg_plantfe~d |        732    6.255396    6.360199          0         25
-------------+---------------------------------------------------------
packets_hy~d |        738    1.329417    .5889743          0         10
kg_tdfert_~f |        663    20.17873    35.43888          0        300
kg_plantfe~f |        708    30.09958    71.41813          0       1000
packets_hy~f |        715    5.157692    5.507797          0         60
to~wing_blue |        788    19.28902    26.49476          0        300
-------------+---------------------------------------------------------
to~ting_blue |        788     7.91434    5.195843          0         32
t~tfert_blue |        788    6.740799    5.074727          0         39
to~ding_blue |        788     34.5066    28.07186          0        320
t~dfert_blue |        788    7.074873    6.360274          0         48
total~e_blue |        788    .5507614      2.6625          0         30
-------------+---------------------------------------------------------
tota~nt_blue |        788     7.32868    15.79926          0        168
total_time.. |        788    18.55425    24.85319          0        300
total_time.. |        788    7.645305      5.1519          0         32
total_time.. |        788    4.549492    5.822018          0         80
total_time.. |        788    33.69036    27.42008          0        320
-------------+---------------------------------------------------------
total_time.. |        788    4.926396    6.094526          0         50
t~e_unmarked |        788    2.132614    6.119562          0        120
~nt_unmarked |        788    6.739848     14.7652          0        168
tot~wing_rof |        788    50.78414    70.02405          0        728
tot~ting_rof |        788     11.5203    11.72074          0         84
-------------+---------------------------------------------------------
to~tfert_rof |        788    5.463198    9.675874          0         84
tot~ding_rof |        788     64.4184    98.67568          0       1575
to~dfert_rof |        788    5.546954    9.690887          0         84
total_~e_rof |        788    3.576142    8.807769          0        120
total~nt_rof |        788    6.163071    14.61011          0        168
-------------+---------------------------------------------------------
use_spacin~l |        747    .5568942    .4970853          0          1
tdqty_1orm~p |        775    .0993548     .299331          0          1
 tdqty_12tsp |        775    .8090323    .3933175          0          1
    tdqty_DK |        775           0           0          0          0
td_time_kn~h |        775           0           0          0          0
-------------+---------------------------------------------------------
  spacing_DK |        772    .0660622    .2485518          0          1
spacing_l~20 |        772    .0867876     .281706          0          1
facilitato~e |        712    8.460674     .935996          4         10
facilitato~d |        712    7.630618    1.131229          2         10
facilitato~f |        741    6.438596    3.859431          0         99
-------------+---------------------------------------------------------
  group_blue |        771    8.024643    1.300615          1         10
group_unma~d |        770    7.238961    1.448748          1         10
   group_rof |        750    6.142667    1.983825          0         10
NGO_kick_o~y |        709    .4344147    .4960298          0          1
NGO_keep_y~h |        681    .6490455    .4776195          0          1
-------------+---------------------------------------------------------
     dropped |        788           0           0          0          0
    dropped2 |        788           0           0          0          0
_est_s2_re~1 |        788    .9593909    .1975083          0          1
_est_s2_re~2 |        788    .9593909    .1975083          0          1
_est_s2_re~3 |        788    .9517766    .2143739          0          1
-------------+---------------------------------------------------------
_est_s2_re~4 |        788    .9555838    .2061489          0          1

added scalar:
     e(nondroppedmean) =  .95558376

.
. estout s2_reg_* using "output/Section2_table2_raw.csv", replace style(tab) delimiter(",") mlabel(,depvars) collabel(none) label ///
>         drop(_cons) stats(nondroppedmean N, labels("Non-dropped mean" "Obs") fmt(%9.2f %9.0fc)) starlevels(* 0.10 ** 0.05 *** 0.01) ///
>         cells("b(fmt(%9.2f) star)" "se(fmt(%9.2f) par)")
(output written to `"output/Section2_table2_raw.csv"')

.
. // Checking attrition balance
. reg dropped training

      Source |       SS           df       MS      Number of obs   =     1,155
-------------+----------------------------------   F(1, 1153)      =      4.94
       Model |  1.06867963         1  1.06867963   Prob > F        =    0.0264
    Residual |  249.317468     1,153   .21623371   R-squared       =    0.0043
-------------+----------------------------------   Adj R-squared   =    0.0034
       Total |  250.386147     1,154  .216972398   Root MSE        =    .46501

-------------+----------------------------------------------------------------
      dropped |      Coef.    Std. Err.       t    P>|t|      [95% Con f. Interval]
-------------+----------------------------------------------------------------
    training |    .0608402    .0273671      2.22    0.026      .0071453      .114535
       _cons |    .2876712    .0192422     14.95    0.000      .2499175     .3254249
-------------+----------------------------------------------------------------

.
. log close
      name:  <unnamed>
       log:  /Users/DSP/Google Drive/UCSC/Teaching/Econ120_F20/Analysis/doFiles/Econ120_F20_Section2.smcl
  log type:  smcl
 closed on:  14 Oct 2020, 01:40:51
-------------