Dear Statalisters;
I need to run the same regression for 5000 different samples.
I have a separate file for each sample, for example, sample1.dta, sample2.dta... sample5000.dta
then I do the loop for the regression using
forvalues i=1/5000{
use sample1.dta,clear
reg y x1 x2
}
Now I need to store the coefficient of x1 in each of the 5000 regressions in a single file (either stata or excel ) to plot a graph on that.
Could you please suggest a sufficient way to do that?
Thanks very much in advanced
Related Posts with Storing coefficients when running same regression for different sample
Randomly draw one value of a var without duplicatesHi, I have a panel dataset, with each person being repeated for mon-sat, depending on how many time…
Need help with tricking -coefplot-, thanks to restricted data issues (Ben Jann user written command)Dear Statalist: I have been using the user-written -coefplot- (authored by Ben Jann). It's great. I…
Substring strvar into observations, not variablesDear Stata community, I have the following string variable r1etab that has multiple observations sep…
Why the program does not recognize my variables in egen syntax?Dear all experts, I try to calculate the average of some variables for each observation. My code is…
Backward stepwise selection for mixed-effect logistic regressionDear colleagues, Is there a package that can do backward stepwise selection for mixed-effect logist…
Subscribe to:
Post Comments (Atom)
0 Response to Storing coefficients when running same regression for different sample
Post a Comment