Dear statalist
I have a problem using margins on stata command.
I'm doing some research related to the effect of election on corporate investment.
I generate control variables called victory (which is defined as the numbers of vote that the winner got from the election) and difofvote (vote difference between the winner and the running-up).
My problem is that I want to create another dummy variable called "Close" that sets to one if the vote difference(difofvote) between the winner and the running-up is below the 25th percentile of the (victory) margin distribution. I'm new to use margins, so I'm not sure.
Here are my codes:
reg difofvote victory, allbaselevels
margins, dydx(victory) at((p25) victory)
Can anyone here help me please.
Thank you!
Related Posts with Problem with using margins
forvalues errorI keep getting a "varlist not allowed" error when I write my forvalues loop, but I copied the syntax…
-moments2- updated on SSCThe single-program package -moments2- has been updated on SSC, thanks as usual to Kit Baum. Stata 8.…
Power analysis for spearman rhoHi, I want to conduct a power analysis for spearman, and reading some instructions I have been asked…
Fixed Effects Regressions with Time and Individual Fixed EffectsHello, The following questions are to essentially check whether I am carrying out the correct econo…
How to count how many years of data each company has?Hello, I have a dataset that contains several executive's compensation infromation for each company.…
Subscribe to:
Post Comments (Atom)
0 Response to Problem with using margins
Post a Comment