Dear all,
I use user written command oaxaca_rif by Rios-Avila (Rios-Avila, F. 2020. Recentered influence functions (RIFs) in Stata: RIF regression and RIF decomposition. Stata Journal, 20(1), 51-94. https://doi.org/10.1177/1536867X20909690). I estimate the same model in two years by different deciles. I want to test for each decile if the explained and unexplained parts of decomposition changed between two years. Could anyone help me how to make a loop, since I don't want to write and to run 10 times separately the same program? I want to estimate decomposition and to test the equality of coefficients for q(10), q(20), q(30),..., q(90).
webuse nlswork, clear
program dob,eclass
oaxaca_rif ln_wage age grade tenure if year==80, by(union) rif(q(50)) rwprobit(age grade tenure) nose
matrix b0=_b[Unexplained:Pure_Unexplained]
oaxaca_rif ln_wage age grade tenure if year==88, by(union) rif(q(50)) rwprobit(age grade tenure) nose
matrix b1=_b[Unexplained:Pure_Unexplained]
matrix b= b0,b1
matrix colname b = b0 b1
ereturn post b
end
bootstrap:dob
test _b[b0]==_b[b1]
Thank you in adavance.
Best wishes,
Aleksandra
Related Posts with make loop for different deciles with eclass program
Questions about contour plotsI have three problems when plotting a contour graph in Stata 16.0 for Windows (revision 02 Jul 2019)…
create new value based on variable nameHi all, I have a dataset with variable names from taxdebt_20120101 to taxdebt_20131231 with the las…
What model best suitable for data with dependent variable being a proportion with values from 0 to 1, both inclusive?Dear All, I have two questions on what models and Stata commands to use regarding the following two…
How to calculate AIC(Akaike's information criterion) for restricted cubic splineI would like to calculate the AICs (Akaike's information criterion) to find out which one is more ap…
STATA Boot Camp?Hello Statalist, I was wondering if anyone knew of any stata boot camps where one could immerse the…
Subscribe to:
Post Comments (Atom)
0 Response to make loop for different deciles with eclass program
Post a Comment