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
Getting summary statistics for several vars in a single MSword tableMay be this is too much of an expectation, but I've been thinking of asking whether there is any com…
cross sectional by each year and each industryHi all! I am new to Stata, but I need to run quite a complicated regression. Please help me. I have…
Randomly select control variables and perform 100 regressions?I have a treatment group of 100 observations and a control group of 100,000 observations. I need to …
trajectories of bp over time and annualized slopesHi all, First, I would like to apologize because my question is probably a general question of bios…
Program/loop help for replacing values of ordinal variablesHello everyone, I am attempting to write a program/loop for a series of 4 ordinal, variables. For …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with using margins
Post a Comment