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
Variables not working togetherHello, I am relatively new to Stata and I am trying to run a regression and my whitedummy variable …
Muli-dimensional Fixed effects (reghdfe) vs Random-effectHi, I am conducting research on data that requires me to perform multi-dimensional fixed-effects. S…
How to separate data from one variable into two, without missing in STATA?I have a dataset with answers form 2004 and 2016 in the same variable, but I want to separate the an…
Want to Know How to Model for Uncertainty of Latent Variables in Country-Level Data Using xtscc and xtabond2Hello, I have a research project involving country-level panel data where I want to model for uncer…
Rangestat SEHello Guys, I'm trying to run a rolling time-series regression using mata and rangestat. The code t…
Subscribe to:
Post Comments (Atom)
0 Response to Loop to extract coefficients from regressions of increasing horizons and plotting them
Post a Comment