Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: how to force same excluded groups across regression models


From   Megan Sheahan <[email protected]>
To   [email protected]
Subject   st: how to force same excluded groups across regression models
Date   Mon, 10 Oct 2011 09:38:29 -0700

Hello,

I am attempting to run the same model as pooled OLS, fixed effects,
and CRE. There are a number of interaction terms in my model with
categorical variables. When Stata runs these three models, it chooses
different groups to exclude in the FE model than in the OLS and CRE
models, making the output difficult to compare. For example, I am
interacting three zone groups and four soil groups with N. The CRE and
OLS models keep all three zones and omit the fourth soil group. The FE
model omits the first zone and keeps all four soil groups. Is there
any way to tell Stata to exclude the same groups across regression
models? I tried the following command, but it did not fix the problem:
char varname[omit].

For reference, here is the syntax for the three models:

/* POOLED OLS */ regress yield_ha c.N_ha#zone_comb
c.N_ha#c.N_ha#zone_comb c.N_ha#c.P_ha#zone_comb
c.N_ha#soil_group_megan c.N_ha#c.rain_stress#zone_comb seed_ha
c.seed_ha#c.seed_ha hectares c.hectares#c.hectares masset_ha
c.masset_ha#c.masset_ha rain_stress i.manure i.hybrid
c.rain_stress#hybrid i.legume i.crop_per_field i.dist i.FAO_class
i.year if prod_func == 1, cluster(hhid)

/* FE */ xtreg yield_ha c.N_ha#zone_comb c.N_ha#c.N_ha#zone_comb
c.N_ha#c.P_ha#zone_comb c.N_ha#soil_group_megan
c.N_ha#c.rain_stress#zone_comb seed_ha c.seed_ha#c.seed_ha hectares
c.hectares#c.hectares masset_ha c.masset_ha#c.masset_ha rain_stress
i.manure i.hybrid c.rain_stress#hybrid i.legume i.crop_per_field
i.dist i.FAO_class i.year if prod_func == 1, fe i(hhid) cluster(hhid)

/* CRE, WITH POOLED OLS STRUCTURE */ regress yield_ha c.N_ha#zone_comb
c.N_ha#c.N_ha#zone_comb c.N_ha#c.P_ha#zone_comb
c.N_ha#soil_group_megan c.N_ha#c.rain_stress#zone_comb seed_ha
c.seed_ha#c.seed_ha hectares c.hectares#c.hectares masset_ha
c.masset_ha#c.masset_ha rain_stress i.manure i.hybrid
c.rain_stress#hybrid i.legume i.crop_per_field i.dist i.FAO_class
i.year mN_ha mP_ha mseed_ha mhectares mrain_stress mmanure mhybrid
mlegume mcrop_per_field if prod_func == 1, cluster(hhid)

Many thanks in advance for your suggestions.

Megan
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index