Hi
I want to construct a loop that extracts the slope coefficients on two explanatory variables from regressions of increasing horizons. Subsequently, I want to plot these coefficients.
For example:
my first regression is :
reg f.firm_profit firm_sale firm_expense, vce(cluster firm)
the second will be :
reg f2.firm_profit firm_sale firm_expense, vce(cluster firm)
The third will be:
reg F3.firm_profit firm_sale firm_expense, vce(cluster firm)
....and so on for up to F30 (30 forecast horizons)
I need the slope coefficients on firm_sale and firm_expense from each regression and then plot these (the Y axis represents the slope coeffcient values and the X axis represents the horizon)
Can anyone please help me to construct this loop and plot the coefficients?
Thank you so much
Related Posts with Loop to extract coefficients from regressions of increasing horizons and plotting them
Converting string values to numericI would appreciate a hand with concise code to convert variable values that are listed alphabeticall…
How to store rho's and sigma2 in selmlog?I'm using selmlog and want to store the rho's and sigma2 reported in its output. I've tried storing …
Labelling groupsCan someone please tell me why this is an invalid syntax and I can't label my age groups please? ge…
Comparing dates in 2 variables and 2 observationsHello, Beginner Stata user here. So I have two date variables in 13Nov2019 type format, which are a…
T test between coefficients in categorical variablesHello there, my regression is: WageHour Var1##Var2 I want to check all the p-values between the…
Subscribe to:
Post Comments (Atom)
0 Response to Loop to extract coefficients from regressions of increasing horizons and plotting them
Post a Comment