[I am using STATA 15.0] I am trying to run ANCOVA regression and store the results using eststo and esttab. I have three different dependent variables (Xb Yb Zb), three different independent variables (Xf1 Yf1 Zf1), and a set of control variables (A B C D). My 1st regression specification is: eststo: reg Xb Xf1 A B C D, cluster (id). My 2nd regression specification is: eststo: reg Yb Yf1 A B C D, cluster (id), and the 3rd one is: eststo: reg Zb Zf1 A B C D, cluster (id). I was trying to run 3 regressions using loop; however, I failed. Can anyone please help me with how should I write the loop command? Thank you in advance.
Related Posts with Loop over different dependent and independent variables
Log4j vulnerability (CVE-2021-44228 and subsequent CVE-2021-45046)Thank you James Hassell (StataCorp) for placing a comment regarding the Log4j vulnerability in Stata…
Is not a two-way plot typeHello, I keep getting the error not a twoway plot type. Was wondering if anyone had any suggestions…
Create 2 new variables from existing variables: one date, and one with value equal to another variable's name Code: * Example generated by -dataex-. For more info, type help dataex clear input float(study_id r…
Foreach Loops for excel graph exportI could not figure out how to delete this post but no longer need it …
problem with collect layoutHello Statalisters, I'm having an issue obtaining the table that I want using collect with mi estim…
Subscribe to:
Post Comments (Atom)
0 Response to Loop over different dependent and independent variables
Post a Comment