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
"prefer not to say" survey answersHi I am coding survey responses for stata analysis. I have many answers which are "prefer not to say…
Estimating Marginal Effects after Regression in which one Main Effect is Caught by Fixed EffectHi everyone, I am trying to estimate marginal effects after having run a triple interaction (in a l…
"too many base levels specified" after -suest-Dear all, I am getting the error "too many base levels specified" when running the following lines:…
Foreach and estimatesDear Stata users, I am coming with several questions concerning looping. Let's imagine I have 4 du…
Meta analysis of Binary outcomesHi, folks I am new to STATA switching from RevMan to stata for my meta analysis. I have binary outco…
Subscribe to:
Post Comments (Atom)
0 Response to Loop to extract coefficients from regressions of increasing horizons and plotting them
Post a Comment